/* Most Active Page Styles */

/* Uses global .container and .dashboard-header from layout.css */

.most-active-container {
    padding: 20px;
}

/* Last updated - positioned above table */
.last-updated {
    text-align: right;
    margin-bottom: 15px;
    padding: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.update-icon {
    font-size: 1rem;
}

.table-container {
    overflow-x: auto;
    border-radius: 12px;
    background: var(--bg-primary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
}

.most-active-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.most-active-table thead {
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    box-shadow: none;
}

.most-active-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    transition: all 0.2s ease;
}

.most-active-table th:first-child {
    border-top-left-radius: 8px;
}

.most-active-table th:last-child {
    border-top-right-radius: 8px;
}

/* Remove previous header column dividers and hover gradients */

.most-active-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.most-active-table tbody tr:hover td {
    background-color: var(--bg-card-hover);
}

.most-active-table tbody tr:last-child {
    border-bottom: none;
}

.most-active-table td {
    padding: 18px 16px;
    vertical-align: middle;
    /* Remove vertical column borders for cleaner hover effect */
    border-right: none;
    background-color: var(--bg-card);
}

.most-active-table td:last-child {
    border-right: none;
}

/* Rounded corners on last row to match card-like table style */
.most-active-table tr:last-child td:first-child {
    border-bottom-left-radius: 8px;
}

.most-active-table tr:last-child td:last-child {
    border-bottom-right-radius: 8px;
}

/* Column-specific styles */
.symbol-cell {
    font-weight: 700;
    font-family: var(--font-family);
    color: var(--primary);
    font-size: 1.1rem;
}

.name-cell {
    font-weight: 500;
    color: var(--text-primary);
    max-width: 200px;
}

.price-cell {
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-family);
}

.change-cell,
.change-percent-cell {
    font-weight: 600;
    font-family: var(--font-family);
}

.change-cell.positive,
.change-percent-cell.positive {
    color: var(--success);
}

.change-cell.negative,
.change-percent-cell.negative {
    color: var(--error);
}

.volume-cell,
.avg-volume-cell {
    font-family: var(--font-family);
    color: var(--text-secondary);
    text-align: right;
}

/* Also align the volume headers to the right for consistency */
.most-active-table th:nth-child(6),
.most-active-table th:nth-child(7) {
    text-align: right;
}

.actions-cell {
    text-align: right;
    white-space: nowrap;
}

.view-options-btn {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 0.4rem;
    border: 1px solid rgba(6, 182, 212, 0.45);
    color: var(--primary);
    background: rgba(6, 182, 212, 0.06);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
}

.view-options-btn:hover {
    background: rgba(6, 182, 212, 0.14);
    border-color: var(--primary);
}

/* Loading container */
.loading-container {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-container p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin: 0;
}

/* Error container */
.error-container {
    text-align: center;
    padding: 40px 20px;
}

.error-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    color: var(--error);
    font-size: 1.1rem;
}

.error-icon {
    font-size: 1.5rem;
}

.retry-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.retry-btn:hover {
    background: var(--primary-dark);
}

/* Responsive design */
@media (max-width: 768px) {
    .most-active-container {
        padding: 16px;
    }
    
    .most-active-table {
        font-size: 0.85rem;
    }
    
    .most-active-table th,
    .most-active-table td {
        padding: 12px 8px;
    }
    
    .name-cell {
        max-width: 120px;
    }
}

@media (max-width: 480px) {
    .most-active-container {
        padding: 12px;
    }
    
    .most-active-table {
        font-size: 0.8rem;
    }
    
    .most-active-table th,
    .most-active-table td {
        padding: 10px 6px;
    }
    
    .symbol-cell {
        font-size: 1rem;
    }
}
