/**
 * Trending Funds Widget Styles
 * Phase 2: Liquid glass morphism design
 */

.trending-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
}

.trending-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.trending-period-selector {
    display: flex;
    gap: 8px;
}

.period-btn {
    padding: 6px 14px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.period-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.period-btn.active {
    background: rgba(0, 212, 255, 0.15);
    border-color: rgba(0, 212, 255, 0.5);
    color: #00d4ff;
}

.trending-count {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-weight: 600;
}

.trending-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    max-height: 450px;
    padding-right: 8px;
}

/* Trending Item */
.trending-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: rgba(255, 100, 50, 0.05);
    border: 1px solid rgba(255, 100, 50, 0.15);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.trending-item:hover {
    background: rgba(255, 100, 50, 0.1);
    border-color: rgba(255, 100, 50, 0.3);
    transform: translateX(4px);
}

.trending-rank {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 48px;
}

.rank-icon {
    font-size: 24px;
}

.rank-number {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    font-weight: 700;
}

.trending-info {
    flex: 1;
    min-width: 0;
}

.trending-name {
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trending-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

.trending-separator {
    color: rgba(255, 255, 255, 0.3);
}

.trending-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.trending-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
}

.trending-stat svg {
    color: rgba(0, 212, 255, 0.6);
}

.trending-score {
    padding: 4px 10px;
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 12px;
    color: #ffc107;
    font-size: 12px;
    font-weight: 700;
}

/* Special styling for top 3 */
.trending-item:nth-child(1) {
    background: rgba(255, 215, 0, 0.08);
    border-color: rgba(255, 215, 0, 0.3);
}

.trending-item:nth-child(1):hover {
    background: rgba(255, 215, 0, 0.15);
    border-color: rgba(255, 215, 0, 0.5);
}

.trending-item:nth-child(2) {
    background: rgba(192, 192, 192, 0.08);
    border-color: rgba(192, 192, 192, 0.3);
}

.trending-item:nth-child(2):hover {
    background: rgba(192, 192, 192, 0.15);
    border-color: rgba(192, 192, 192, 0.5);
}

.trending-item:nth-child(3) {
    background: rgba(205, 127, 50, 0.08);
    border-color: rgba(205, 127, 50, 0.3);
}

.trending-item:nth-child(3):hover {
    background: rgba(205, 127, 50, 0.15);
    border-color: rgba(205, 127, 50, 0.5);
}

/* Empty State */
.trending-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.trending-empty svg {
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 20px;
}

.trending-empty h4 {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.trending-empty p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    margin: 0;
}

/* Scrollbar */
.trending-list::-webkit-scrollbar {
    width: 6px;
}

.trending-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.trending-list::-webkit-scrollbar-thumb {
    background: rgba(255, 100, 50, 0.3);
    border-radius: 3px;
}

.trending-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 100, 50, 0.5);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .trending-item {
        padding: 12px;
    }

    .trending-rank {
        min-width: 40px;
    }

    .rank-icon {
        font-size: 20px;
    }

    .trending-name {
        font-size: 13px;
    }

    .trending-meta {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .trending-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .trending-stats {
        align-items: center;
    }

    .trending-score {
        font-size: 11px;
        padding: 3px 8px;
    }
}

/* Accessibility */
.trending-item:focus-visible {
    outline: 2px solid #00d4ff;
    outline-offset: 2px;
}

.period-btn:focus-visible {
    outline: 2px solid #00d4ff;
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .trending-item,
    .period-btn {
        transition: none;
    }

    .trending-item:hover {
        transform: none;
    }
}
