/* Ultra-Premium Price History Styles */
.price-history-section {
    margin: 48px 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.price-history-toggle {
    width: 100%;
    padding: 20px 28px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 16px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #111827;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.price-history-toggle:hover {
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
}

.toggle-icon {
    font-size: 14px;
    color: #9ca3af;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.price-history-content {
    margin-top: 24px;
    padding: 32px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 20px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    animation: slideDown 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.price-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 24px;
    border-radius: 16px;
    text-align: left;
    transition: transform 0.2s ease;
    position: relative;
    overflow: hidden;
}

/* Vivid but Soft FinTech Colors */
.stat-lowest {
    background: #ecfdf5;
    /* Mint 50 */
    border: 1px solid rgba(16, 185, 129, 0.1);
}

.stat-item:nth-child(2) {
    /* Average */
    background: #eff6ff;
    /* Blue 50 */
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.stat-highest {
    background: #fff1f2;
    /* Rose 50 */
    border: 1px solid rgba(244, 63, 94, 0.1);
}

.stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    font-feature-settings: "tnum";
}

/* Specific Text Colors */
.stat-lowest .stat-label {
    color: #047857;
}

.stat-lowest .stat-value {
    color: #065f46;
}

.stat-item:nth-child(2) .stat-label {
    color: #1d4ed8;
}

.stat-item:nth-child(2) .stat-value {
    color: #1e40af;
}

.stat-highest .stat-label {
    color: #be123c;
}

.stat-highest .stat-value {
    color: #9f1239;
}

.price-chart-container {
    position: relative;
    height: 350px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px dashed rgba(0, 0, 0, 0.04);
}

/* Loading & Error States */
.price-history-loading,
.price-history-error {
    text-align: center;
    padding: 80px 20px;
    color: #6b7280;
    font-size: 15px;
    font-weight: 500;
}

.price-history-error {
    color: #ef4444;
    background: #fef2f2;
    border-radius: 12px;
}

.price-history-loading:after {
    content: " ";
    display: block;
    width: 32px;
    height: 32px;
    margin: 16px auto;
    border-radius: 50%;
    border: 3px solid #e5e7eb;
    border-color: #3b82f6 transparent #3b82f6 transparent;
    animation: lds-dual-ring 1s linear infinite;
}

@keyframes lds-dual-ring {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .price-stats {
        gap: 16px;
    }

    .stat-item {
        padding: 20px;
    }

    .stat-value {
        font-size: 24px;
    }
}

/* Mobile Stack */
@media (max-width: 640px) {
    .price-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-item {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 16px 20px;
    }

    .stat-label {
        font-size: 12px;
    }

    .stat-value {
        font-size: 20px;
    }

    .price-chart-container {
        height: 280px;
    }

    .price-history-content {
        padding: 20px;
    }
}