/* ============================================================
   WALLET WIDGET STYLES - HEADER DROPDOWN
   ============================================================ */

.wallet-dropdown-section {
    padding: 0;
    margin-bottom: 0;
}

.wallet-info-container {
    padding: 6px 14px 8px 14px;
    background: linear-gradient(180deg, #fdff87 0%, #11B9A1 100%);
    color: #09242B;
    border-radius: 8px 8px 0 0;
    border: 3px solid white;
    border-bottom: none;
    position: relative;
}

.wallet-info-header-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.wallet-info-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    position: relative;
}

.wallet-info-toggle {
    background: rgba(9, 36, 43, 0.15);
    border: 1px solid rgba(9, 36, 43, 0.25);
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding: 0;
    position: absolute;
    right: -8px;
    bottom: -38px;
}

.wallet-info-toggle:hover {
    background: rgba(9, 36, 43, 0.25);
}

.wallet-info-toggle.active .wallet-info-carat {
    transform: rotate(180deg);
}

.wallet-info-carat {
    transition: transform 0.2s ease;
    stroke: white;
    fill: white;
    color: white;
}

.wallet-info-dropdown {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-top: 8px;
    animation: dropdownPeek 8s ease-in-out 3s infinite;
}

.wallet-info-dropdown.show {
    max-height: 200px;
    animation: none;
}

@keyframes dropdownPeek {
    0%, 88% {
        max-height: 0;
    }
    90% {
        max-height: 15px;
    }
    92% {
        max-height: 0;
    }
    94% {
        max-height: 15px;
    }
    96%, 100% {
        max-height: 0;
    }
}

.wallet-info-label {
    font-size: 10px;
    font-weight: 600;
    opacity: 0.95;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex: 1;
    line-heigcht: 1.2;
}

.wallet-info-balance-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.wallet-info-icon {
    font-size: 32px;
    font-weight: normal;
    background: none;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.wallet-info-balance {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    flex: 1;
    color: white;
    text-shadow: 2px 2px 4px #09242B;
}

/* Mobile adjustments for icon and balance */
@media (max-width: 768px) {
    .wallet-info-icon {
        font-size: 38px;
        font-weight: normal;
        background: none;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
        animation: pulseYellowGlow 2s ease-in-out infinite;
    }
    
    .wallet-info-balance-wrapper {
        margin-left: -5px;
    }
    
    @keyframes pulseYellowGlow {
        0%, 100% {
            filter: drop-shadow(0 0 8px rgba(255, 255, 0, 1)) drop-shadow(0 0 16px rgba(255, 255, 0, 1));
        }
        50% {
            filter: drop-shadow(0 0 16px rgba(255, 255, 0, 1)) drop-shadow(0 0 24px rgba(255, 255, 0, 1));
        }
    }
}

.wallet-claim-daily-btn {
    width: 100%;
    padding: 8px 12px;
    background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
    border: 2px solid rgba(9, 36, 43, 0.3);
    border-radius: 8px;
    color: #09242B;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-top: 8px;
}

.wallet-claim-daily-btn:hover {
    background: linear-gradient(135deg, #f0f0f0 0%, #e5e5e5 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.wallet-claim-daily-btn:active {
    transform: translateY(0);
}

/* Wallet Widget Styles - Sidebar */

.wallet-sidebar-section {
    margin-top: 0;
    margin-bottom: 5px;
}

.wallet-sidebar-card {
    background: linear-gradient(180deg, #fdff87 0%, #11B9A1 100%);
    border-radius: 10px;
    padding: 6px 8px;
    color: #09242B;
    border: 4px solid #ffffff;
    box-shadow: 
        0 4px 10px rgba(15, 116, 110, 0.3),
        inset 0 2px 8px rgba(255, 255, 255, 0.4),
        inset 0 -2px 8px rgba(255, 255, 255, 0.2);
}

.wallet-sidebar-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
    padding-top: 16px;
    position: relative;
}

.wallet-sidebar-icon {
    font-size: 38px;
    font-weight: normal;
    width: 46px;
    height: 46px;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.wallet-sidebar-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.wallet-sidebar-label {
    font-size: 10px;
    font-weight: 500;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1px;
    position: absolute;
    top: 4px;
    left: 6px;
    white-space: nowrap;
    right: 30px;
}

.wallet-sidebar-balance {
    font-size: 26px;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 4px #09242B;
}

.wallet-sidebar-claim-btn {
    width: 100%;
    padding: 8px 12px;
    background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
    border: 2px solid rgba(9, 36, 43, 0.3);
    border-radius: 8px;
    color: #09242B;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wallet-sidebar-claim-btn:hover {
    background: linear-gradient(135deg, #f0f0f0 0%, #e5e5e5 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.wallet-sidebar-claim-btn:active {
    transform: translateY(0);
}

/* Wallet Dropdown Menu */
.wallet-dropdown-menu {
    position: fixed;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    z-index: 10000;
    animation: slideDown 0.2s ease-out;
    overflow: hidden;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wallet-menu-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, #fcd34d 0%, #fbbf24 100%);
    color: #09242B;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wallet-menu-title {
    font-size: 14px;
    font-weight: 500;
    opacity: 0.9;
}

.wallet-menu-balance {
    font-size: 20px;
    font-weight: 700;
}

.wallet-menu-items {
    padding: 8px 0;
}

.wallet-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.wallet-menu-item:hover {
    background: #f5f5f5;
}

.wallet-menu-item.wallet-menu-topup {
    color: #4CAF50;
    font-weight: 600;
}

.wallet-menu-item.wallet-menu-topup:hover {
    background: #e8f5e9;
}

.wallet-menu-icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.wallet-menu-divider {
    margin: 8px 0;
    border: none;
    border-top: 1px solid #e0e0e0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .wallet-widget {
        margin: 0 8px;
    }

    .wallet-balance {
        padding: 5px 10px;
    }

    .wallet-icon {
        font-size: 16px;
    }

    .wallet-amount {
        font-size: 13px;
        min-width: 35px;
    }

    .wallet-topup-btn {
        width: 28px;
        height: 28px;
        font-size: 18px;
    }

    .wallet-dropdown-menu {
        min-width: 240px;
        right: 10px !important;
    }

    .wallet-menu-header {
        padding: 14px 16px;
    }

    .wallet-menu-balance {
        font-size: 18px;
    }

    .wallet-menu-item {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    /* Mobile wallet info container adjustments */
    .wallet-info-container {
        padding: 8px 14px 10px 14px;
        border-radius: 12px 12px 0 0;
        border: 3px solid white;
        border-bottom: none;
        position: relative;
    }
    
    .wallet-info-header-wrapper {
        gap: 6px;
    }
    
    /* Hide the button from its normal position */
    .wallet-info-header {
        position: relative;
    }
    
    .wallet-info-toggle {
        position: absolute;
        right: -8px;
        bottom: -38px;
        width: 40px;
        height: 40px;
        border-radius: 6px;
        margin: 0;
        flex-shrink: 0;
    }
    
    /* Remove any bottom margin/padding gaps */
    .wallet-info-dropdown {
        margin-top: 6px;
    }
    
    .wallet-dropdown-section {
        margin-bottom: 0;
        padding-bottom: 0;
    }
    
    /* Reduce spacing between dropdown buttons on mobile */
    .wallet-dropdown-link {
        margin-bottom: 1px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .wallet-dropdown-menu {
        background: #2a2a2a;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    }

    .wallet-menu-item {
        color: #e0e0e0;
    }

    .wallet-menu-item:hover {
        background: #3a3a3a;
    }

    .wallet-menu-item.wallet-menu-topup:hover {
        background: #1b4d1f;
    }

    .wallet-menu-divider {
        border-top-color: #444;
    }
}

/* Loading State */
.wallet-widget.loading .wallet-amount::after {
    content: '...';
    animation: ellipsis 1.5s infinite;
}

@keyframes ellipsis {
    0% { content: '.'; }
    33% { content: '..'; }
    66% { content: '...'; }
}

/* Wallet History Links - Subtle Text Style */
.wallet-history-link {
    display: block;
    text-align: center;
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 10px;
    font-weight: 400;
    text-decoration: none;
    transition: color 0.2s ease;
}

.wallet-history-link:hover {
    color: rgba(255, 255, 255, 1);
    text-decoration: underline;
}

/* Wallet Sidebar History Link */
.wallet-sidebar-history-link {
    display: block;
    text-align: center;
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 10px;
    font-weight: 400;
    text-decoration: none;
    transition: color 0.2s ease;
}

.wallet-sidebar-history-link:hover {
    color: rgba(255, 255, 255, 1);
    text-decoration: underline;
}

/* Wallet Help Icon - Base */
.wallet-help-icon {
    text-decoration: none;
    opacity: 0.8;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    z-index: 10;
}

.wallet-help-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}

.wallet-help-icon img {
    width: 16px;
    height: 16px;
    display: block;
}

/* Header Dropdown Help Icon - Lower Left */
.wallet-help-icon-dropdown {
    position: absolute;
    bottom: 8px;
    left: 12px;
}

/* Sidebar Help Icon - Top Right */
.wallet-help-icon-sidebar {
    position: absolute;
    top: 8px;
    right: 8px;
}

.wallet-help-icon-sidebar img {
    width: 18px;
    height: 18px;
}

/* Make wallet containers relative for absolute positioning */
.wallet-info-container {
    position: relative;
}

.wallet-sidebar-card {
    position: relative;
}

/* ============================================================
   WALLET SIDEBAR DROPDOWN STYLES
   ============================================================ */

/* Header wrapper with toggle button */
.wallet-sidebar-header-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    margin-bottom: 4px;
}

/* Toggle button */
.wallet-sidebar-toggle {
    background: rgba(9, 36, 43, 0.15);
    border: 1px solid rgba(9, 36, 43, 0.25);
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.wallet-sidebar-toggle:hover {
    background: rgba(9, 36, 43, 0.25);
    transform: scale(1.05);
}

.wallet-sidebar-toggle.active .wallet-carat {
    transform: rotate(180deg);
}

.wallet-carat {
    transition: transform 0.2s ease;
    stroke: white;
    fill: white;
    color: white;
}

/* Dropdown menu */
.wallet-sidebar-dropdown {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-top: 4px;
    animation: dropdownPeek 8s ease-in-out 3s infinite;
}

.wallet-sidebar-dropdown.show {
    max-height: 200px;
    animation: none;
}

/* Dropdown links */
.wallet-dropdown-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    color: #09242B;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-bottom: 4px;
}

.wallet-dropdown-link:last-child {
    margin-bottom: 0;
}

.wallet-dropdown-link:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateX(2px);
}

.wallet-dropdown-link img {
    opacity: 0.9;
    filter: drop-shadow(2px 2px 3px #09242B);
}

.wallet-dropdown-link span {
    flex: 1;
}

/* Mobile adjustments for wallet dropdown */
@media (max-width: 768px) {
    .wallet-sidebar-toggle {
        width: 28px;
        height: 28px;
    }
    
    .wallet-dropdown-link {
        font-size: 11px;
        padding: 10px 8px;
        gap: 8px;
    }
    
    .wallet-dropdown-link img {
        width: 14px !important;
        height: 14px !important;
    }
}

/* ============================================================
   CREDIT CLAIM ANIMATION
   ============================================================ */

.credit-claim-animation {
    position: absolute;
    font-size: 42px;
    font-weight: 800;
    color: #00FF7F;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    text-shadow: 
        /* Clean black border */
        -2px -2px 0 #000,
        2px -2px 0 #000,
        -2px 2px 0 #000,
        2px 2px 0 #000,
        /* Glow effect */
        0 0 15px rgba(0, 255, 127, 0.9),
        0 0 25px rgba(0, 255, 127, 0.6);
    animation: floatUp 2s ease-out forwards;
    pointer-events: none;
    z-index: 1000;
    transform: translateX(-50%);
    letter-spacing: 2px;
    /* Anti-aliasing for crisp text */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    /* Prevent blur during animation */
    will-change: transform, opacity;
    backface-visibility: hidden;
    perspective: 1000px;
}

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    70% {
        opacity: 1;
        transform: translateX(-50%) translateY(-70px);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-100px);
    }
}
