/* Total Credits Badge */
.d-none {
    display: none !important;
}

.total-credits-container {
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.total-credits-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--color-bg);
    border: var(--border-clay-sm) solid rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-clay-sm);
    padding: 8px 10px;
    min-height: 44px;
    cursor: pointer;
    transition: all var(--transition-smooth);
    box-shadow:
        6px 6px 12px rgba(30, 41, 59, 0.15),
        -6px -6px 12px rgba(255, 255, 255, 0.7),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    font-family: 'Nunito', sans-serif;
}

.total-credits-badge[aria-expanded="true"] {
    box-shadow:
        2px 2px 4px rgba(30, 41, 59, 0.1),
        -2px -2px 4px rgba(255, 255, 255, 0.6),
        inset 4px 4px 8px rgba(30, 41, 59, 0.1),
        inset -4px -4px 8px rgba(255, 255, 255, 0.8);
    transform: none;
    border-color: #FDBCB4;
}

.total-credits-badge:hover,
.total-credits-badge:focus {
    transform: translateY(-2px);
    box-shadow:
        8px 8px 16px rgba(30, 41, 59, 0.2),
        -8px -8px 16px rgba(255, 255, 255, 0.8),
        inset 0 0 0 1px rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 1);
    border-color: #FDBCB4;
}

.total-credits-badge:focus-visible {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
}

.total-credits-icon {
    width: 18px;
    height: 18px;
    color: #F59E0B;
    flex-shrink: 0;
}

.total-credits-badge .total-credits-label {
    display: none;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748B;
    white-space: nowrap;
}

.total-credits-badge .total-credits-value {
    font-size: 0.875rem;
    font-weight: 700;
    color: #334155;
    white-space: nowrap;
}

@media (max-width: 479px) {
    .total-credits-badge {
        padding: 6px 8px;
        min-width: 44px;
        min-height: 44px;
        gap: 3px;
        border-width: 2px;
        border-radius: 12px;
    }

    .total-credits-icon {
        width: 16px;
        height: 16px;
    }

    .total-credits-badge .total-credits-value {
        font-size: 0.75rem;
    }

    .nav-actions {
        gap: 4px !important;
    }
}

@media (min-width: 480px) {
    .total-credits-badge .total-credits-label {
        display: inline;
    }

    .total-credits-badge {
        gap: 6px;
        padding: 8px 12px;
    }

    .total-credits-icon {
        width: 20px;
        height: 20px;
    }
}

@media (min-width: 768px) {
    .total-credits-badge {
        padding: 8px 14px;
        gap: 8px;
    }

    .total-credits-badge .total-credits-label {
        font-size: 0.8125rem;
    }

    .total-credits-badge .total-credits-value {
        font-size: 0.9375rem;
    }
}

.mobile-total-credits {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
    border: 2px solid rgba(251, 191, 36, 0.3);
    border-radius: 14px;
    text-decoration: none;
    font-family: 'Nunito', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #92400E;
    transition: all 200ms ease-out;
    margin-bottom: 4px;
    box-shadow:
        4px 4px 8px rgba(30, 41, 59, 0.08),
        -2px -2px 6px rgba(255, 255, 255, 0.6);
}

.mobile-total-credits:hover {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    border-color: rgba(251, 191, 36, 0.5);
    transform: translateX(4px);
}

.mobile-total-credits:active {
    transform: translateX(2px);
    box-shadow:
        2px 2px 4px rgba(30, 41, 59, 0.1),
        -1px -1px 3px rgba(255, 255, 255, 0.5);
}

.mobile-total-credits-icon {
    width: 22px;
    height: 22px;
    color: #D97706;
    flex-shrink: 0;
}

.mobile-total-credits-value {
    font-weight: 800;
    font-size: 1.0625rem;
    color: #78350F;
    margin-left: auto;
}

.total-credits-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #F8FAFC;
    border: 3px solid rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    box-shadow:
        12px 12px 24px rgba(30, 41, 59, 0.15),
        -12px -12px 24px rgba(255, 255, 255, 0.8),
        inset 0 0 0 1px rgba(255, 255, 255, 0.6);
    min-width: 320px;
    max-width: 360px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px) scale(0.96);
    transition: all 200ms ease-out;
    z-index: 1000;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.total-credits-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

@media (min-width: 768px) {
    .total-credits-dropdown {
        min-width: 380px;
        padding: 20px;
        gap: 16px;
    }
}

@media (max-width: 767px) {
    .total-credits-dropdown {
        display: none !important;
    }
}

.credits-membership-card {
    background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
    border: 2px solid rgba(147, 197, 253, 0.4);
    border-radius: 16px;
    padding: 16px;
    box-shadow:
        4px 4px 8px rgba(30, 64, 175, 0.08),
        -2px -2px 6px rgba(255, 255, 255, 0.9),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.credits-membership-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 8px;
}

.credits-membership-plan {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 1.375rem;
    color: #1E3A8A;
    letter-spacing: 0;
}

.credits-membership-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.credits-action-link,
.credits-breakdown-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: 'Nunito', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #F59E0B;
    text-decoration: none;
    transition: all 150ms ease-out;
    align-self: flex-start;
    padding: 6px 10px;
    border-radius: 8px;
}

.credits-action-link {
    font-size: 0.875rem;
    color: #3B82F6;
    padding: 0;
    gap: 2px;
}

.credits-action-link:hover {
    color: #1D4ED8;
}

.credits-breakdown-link:hover {
    background: rgba(251, 191, 36, 0.1);
    color: #D97706;
}

.credits-action-link:focus-visible,
.credits-breakdown-link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.credits-membership-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.credits-valid-until,
.credits-auto-renew {
    font-family: 'Nunito', sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #64748B;
}

.credits-auto-renew:not(:empty)::before {
    content: '\2022';
    margin-right: 4px;
    color: #94A3B8;
}

.credits-total-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.credits-total-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.credits-total-label {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: #1E293B;
    letter-spacing: 0;
}

.credits-total-value {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 1.75rem;
    color: #F59E0B;
    letter-spacing: 0;
}

.credits-chevron {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    transition: transform 150ms ease-out;
}

.credits-breakdown-link:hover .credits-chevron {
    transform: translateX(2px);
}

.credits-breakdown-card {
    background: #F8FAFC;
    border: 2px solid rgba(148, 163, 184, 0.25);
    border-radius: 16px;
    padding: 16px;
    box-shadow:
        inset 3px 3px 6px rgba(30, 41, 59, 0.06),
        inset -3px -3px 6px rgba(255, 255, 255, 0.8);
}

.credits-breakdown-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: #475569;
    margin-bottom: 12px;
}

.credits-breakdown-amount {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 10px;
}

.credits-used {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: #64748B;
    letter-spacing: 0;
}

.credits-separator {
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    font-size: 1.25rem;
    color: #94A3B8;
}

.credits-progress-bar {
    height: 8px;
    background: #E2E8F0;
    border-radius: 4px;
    overflow: hidden;
    box-shadow:
        inset 2px 2px 4px rgba(30, 41, 59, 0.1),
        inset -2px -2px 4px rgba(255, 255, 255, 0.8);
}

.credits-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FCD34D 0%, #F59E0B 50%, #D97706 100%);
    border-radius: 4px;
    transition: width 300ms ease-out;
    box-shadow:
        0 1px 3px rgba(217, 119, 6, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

@media (max-width: 374px) {
    .total-credits-container {
        display: none !important;
    }
}
