/* 
 * Wallet CSS Styles
 * Contains styles for the wallet button and popup
 *
 * ORGANIZATION:
 * 1. Wallet button
 * 2. Wallet container and overlay
 * 3. Wallet header elements (title, balance)
 * 4. Wallet tabs and sections
 * 5. Form elements (sliders, inputs, buttons)
 * 6. Special elements (key display, status messages)
 * 7. Responsive adjustments
 */

/* ====================================================
   WALLET BUTTON 
   The button that opens the wallet interface
   ==================================================== */

/* Wallet button styling */
#wallet-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 15px;
    margin-left: auto;
    margin-right: auto;
    width: auto;
}

/* Apply gold-button utility class properties */
#wallet-button {
    background-color: var(--panel-bg-color);
    border: 2px solid var(--gold-color);
    border-radius: 8px; /* Slightly different from standard gold-button */
    color: var(--gold-color);
    font-size: 14px; /* Slightly larger than standard gold-button */
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-shadow: var(--text-shadow);
    box-shadow: var(--box-shadow);
}

#wallet-button:hover {
    background-color: rgba(255, 215, 0, 0.2);
    transform: scale(1.05);
}

/* ====================================================
   WALLET CONTAINER AND OVERLAY
   The modal and its backdrop for wallet functionality
   ==================================================== */

/* Wallet modal overlay */
#wallet-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

/* Wallet container styling */
#wallet-container {
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

/* Apply panel-container and custom-scrollbar utility classes */
#wallet-container {
    background-color: var(--panel-bg-color);
    border: var(--container-border);
    border-radius: var(--container-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
    scrollbar-width: thin;
    scrollbar-color: var(--gold-color) var(--panel-bg-color);
}

/* Apply custom scrollbar styles */
#wallet-container::-webkit-scrollbar {
    width: 8px;
}

#wallet-container::-webkit-scrollbar-track {
    background: var(--panel-bg-color);
    border-radius: 4px;
}

#wallet-container::-webkit-scrollbar-thumb {
    background-color: var(--gold-color);
    border-radius: 4px;
    border: 2px solid var(--panel-bg-color);
}

#wallet-container::-webkit-scrollbar-thumb:hover {
    background-color: var(--orange-color);
}

/* Wallet close button */
#wallet-close {
    color: var(--gold-color);
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
}

#wallet-close:hover {
    color: var(--orange-color);
}

/* ====================================================
   WALLET HEADER ELEMENTS
   Title and balance display at the top of the wallet
   ==================================================== */

/* Wallet title - using section-title utility class properties */
#wallet-title {
    font-size: 18px;
    margin-bottom: 15px;
    text-align: center;
    border-bottom: 1px solid var(--gold-color);
    padding-bottom: 8px;
    text-transform: uppercase;
    color: var(--gold-color);
    text-shadow: var(--text-shadow);
}

/* Wallet balance display */
#wallet-balance {
    font-size: 16px;
    text-align: center;
    margin-bottom: 20px;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

#wallet-balance-value {
    font-size: 24px;
    color: var(--gold-color);
    display: block;
    margin-top: 5px;
    text-shadow: var(--text-shadow);
}

/* ====================================================
   WALLET TABS AND SECTIONS
   Navigation and content areas within the wallet
   ==================================================== */

/* Wallet tabs navigation */
.wallet-tabs {
    display: flex;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
}

.wallet-tab {
    flex: 1;
    text-align: center;
    padding: 8px 0;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    border-bottom: 2px solid transparent;
}

.wallet-tab.active {
    color: var(--gold-color);
    border-bottom: 2px solid var(--gold-color);
    text-shadow: var(--text-shadow);
}

/* Tab content containers */
.wallet-tab-content {
    display: none;
    padding: 10px 0;
}

.wallet-tab-content.active {
    display: block;
}

/* Section containers */
#cash-out-section,
#cash-in-section,
#send-friend-section {
    margin-bottom: 20px;
}

/* Section titles */
.wallet-section-title {
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--gold-color);
    text-shadow: var(--text-shadow);
}

/* ====================================================
   FORM ELEMENTS
   Sliders, inputs, and buttons within the wallet
   ==================================================== */

/* Slider containers */
.amount-slider-container {
    margin: 15px 0;
}

/* Slider styling - common for all sliders */
#amount-slider,
#friend-amount-slider {
    width: 100%;
    height: 15px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(0, 0, 0, 0.5);
    outline: none;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
}

/* Slider thumb styling for WebKit (Chrome, Safari) */
#amount-slider::-webkit-slider-thumb,
#friend-amount-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gold-color);
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
}

/* Slider thumb styling for Firefox */
#amount-slider::-moz-range-thumb,
#friend-amount-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gold-color);
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
}

/* Amount display for sliders */
#amount-display,
#friend-amount-display {
    text-align: center;
    font-size: 18px;
    margin: 10px 0;
    color: var(--gold-color);
}

/* Input field styling */
#key-input,
#message-input {
    width: 100%;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 215, 0, 0.5);
    border-radius: 5px;
    color: #ffffff;
    margin-bottom: 15px;
}

/* Specific for message input */
#message-input {
    height: 80px;
    font-family: 'Arial', sans-serif;
    font-size: 14px;
    resize: none;
}

/* Specific for key input */
#key-input {
    font-family: monospace;
    font-size: 14px;
}

/* Button styling - common properties for all wallet buttons */
#cash-out-button,
#cash-in-button,
#send-friend-button {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    border: 2px solid var(--gold-color);
    border-radius: 8px;
    color: var(--gold-color);
    font-family: 'Press Start 2P', cursive;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    margin: 15px 0;
    text-shadow: var(--text-shadow);
}

#cash-out-button:hover,
#cash-in-button:hover,
#send-friend-button:hover {
    background-color: rgba(255, 215, 0, 0.2);
}

/* Copy button - smaller variant */
#copy-key-button {
    display: block;
    width: 100%;
    padding: 8px;
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--gold-color);
    border-radius: 5px;
    color: var(--gold-color);
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

#copy-key-button:hover {
    background-color: rgba(255, 215, 0, 0.2);
}

/* WhatsApp share button - special styling */
#share-whatsapp-button {
    display: block;
    width: 100%;
    padding: 8px;
    background-color: rgba(37, 211, 102, 0.2); /* WhatsApp green */
    border: 1px solid rgba(37, 211, 102, 0.5);
    border-radius: 5px;
    color: #25d366;
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

#share-whatsapp-button:hover {
    background-color: rgba(37, 211, 102, 0.3);
}

/* ====================================================
   SPECIAL ELEMENTS
   Displays, messages, and other special components
   ==================================================== */

/* Display containers */
#key-display-container,
#link-display-container {
    margin-top: 15px;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

/* Key display initially hidden */
#key-display-container {
    display: none;
}

/* Display titles */
.key-display-title {
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--gold-color);
}

/* Text display areas */
#key-display,
#link-display {
    font-size: 12px;
    word-break: break-all;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 8px;
    border-radius: 5px;
    margin-bottom: 10px;
    font-family: monospace;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Status messages */
.status-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    font-size: 12px;
    text-align: center;
}

.status-success {
    background-color: rgba(0, 255, 0, 0.2);
    border: 1px solid rgba(0, 255, 0, 0.5);
    color: #00ff00;
}

.status-error {
    background-color: rgba(255, 0, 0, 0.2);
    border: 1px solid rgba(255, 0, 0, 0.5);
    color: #ff6666;
}

/* Loading spinner - uses spin animation from animations.css */
.loading-spinner {
    display: none;
    width: 30px;
    height: 30px;
    margin: 10px auto;
    border: 3px solid rgba(255, 215, 0, 0.3);
    border-radius: 50%;
    border-top: 3px solid var(--gold-color);
    animation: spin 1s linear infinite;
}

/* ====================================================
   RESPONSIVE ADJUSTMENTS
   Mobile-specific styling
   ==================================================== */

@media (max-width: 768px) {
    /* Smaller container */
    #wallet-container {
        width: 95%;
        padding: 15px;
    }
    
    /* Smaller title */
    #wallet-title {
        font-size: 16px;
    }
    
    /* Smaller tab text */
    .wallet-tab {
        font-size: 12px;
    }
    
    /* Smaller balance display */
    #wallet-balance-value {
        font-size: 20px;
    }
}
