/* CSS for Coins List & Market Data */

/* Table Styles */
.price-flash {
    background-color: rgba(240, 185, 11, 0.3);
    transition: background-color 1s ease-out;
}

.coin-symbol {
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
}

.coin-symbol:hover {
    color: var(--accent-color);
}

.coins-table tr {
    transition: background-color 0.2s ease;
}

.coins-table tr.selected {
    background: rgba(240, 185, 11, 0.1);
    border-left: 3px solid var(--accent-color);
}

.price-change-positive {
    color: var(--success-color);
}

.price-change-negative {
    color: var(--error-color);
}

/* Sortable Columns */
.sortable {
    position: relative;
    cursor: pointer;
}

.sortable:after {
    content: '';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
}

.sortable.sort-asc:after {
    border-bottom: 4px solid var(--text-secondary);
    border-top: none;
}

.sortable.sort-desc:after {
    border-top: 4px solid var(--text-secondary);
    border-bottom: none;
}

/* Loading and Error States */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--accent-color);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-message {
    background-color: rgba(246, 70, 93, 0.2);
    color: var(--error-color);
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
    text-align: center;
    display: none;
}

/* Filter Controls */
.symbol-filter-container {
    position: relative;
    display: flex;
    align-items: center;
}

.clear-symbol-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    width: 16px;
    height: 16px;
    display: none;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.clear-symbol-btn:hover {
    color: var(--text-primary);
}

.filter-group input:focus,
.filter-group select:focus {
    border-color: var(--accent-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(240, 185, 11, 0.2);
}

.refresh-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #666;
}

/* Responsive Adjustments */
@media (max-width: 900px) {
    .coins-table th,
    .coins-table td {
        padding: 6px 4px;
        font-size: 13px;
    }
    
    .coin-symbol {
        font-size: 13px;
    }
}

@media (max-width: 600px) {
    .coins-table th,
    .coins-table td {
        padding: 4px 2px;
        font-size: 12px;
    }
}