/**
 * MoonBot Wallet Styles
 * Frontend user interface styling
 */

/* Container */
.moonbot-wallet-container {
    max-width: 700px;
    margin: 30px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Balance Card */
.moonbot-balance-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 40px;
    color: white;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.moonbot-balance-card h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 500;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.balance-amount {
    font-size: 48px;
    font-weight: 700;
    margin-top: 10px;
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.balance-amount .currency {
    font-size: 24px;
    opacity: 0.8;
}

/* Tabs */
.moonbot-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 0;
    border-bottom: 2px solid #e5e7eb;
    background: white;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}

.tab-btn {
    flex: 1;
    background: white;
    border: none;
    padding: 18px 24px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    background: #f9fafb;
    color: #667eea;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: white;
}

/* Tab Content */
.tab-content {
    background: white;
    padding: 30px;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.tab-pane h4 {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #6b7280;
    font-size: 13px;
}

input[type="number"],
input[type="text"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Quick Amounts */
.quick-amounts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 20px 0;
}

.quick-btn {
    padding: 12px;
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    color: #374151;
    transition: all 0.3s ease;
}

.quick-btn:hover {
    background: #667eea;
    border-color: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 16px 24px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    white-space: normal !important;
    word-wrap: break-word;
    line-height: 1.4;
    text-align: center;
}

.btn-primary:hover:not(:disabled) {
    background: #5a67d8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    padding: 12px 20px;
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 5px;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

/* Payment Display */
#payment-display {
    margin-top: 30px;
    padding: 30px;
    background: #f9fafb;
    border-radius: 12px;
    text-align: center;
}

.qr-container {
    margin: 20px auto;
    padding: 20px;
    background: white;
    border-radius: 12px;
    display: inline-block;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.qr-container canvas {
    display: block;
}

.payment-buttons {
    margin: 20px 0;
}

.payment-timer {
    font-size: 18px;
    font-weight: 600;
    color: #dc2626;
    margin: 15px 0;
}

#payment-status {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    font-weight: 500;
}

#payment-status .success {
    background: #d1fae5;
    color: #065f46;
    padding: 15px;
    border-radius: 8px;
}

#payment-status .error {
    background: #fee2e2;
    color: #991b1b;
    padding: 15px;
    border-radius: 8px;
}

#payment-status .info {
    background: #dbeafe;
    color: #1e40af;
    padding: 15px;
    border-radius: 8px;
}

/* Fee Notice */
.fee-notice {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.fee-notice p {
    margin: 0;
    color: #92400e;
}

/* Balance Info Card */
.balance-info-card {
    background: #f0f9ff;
    border: 2px solid #3b82f6;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.balance-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.balance-row .label {
    font-size: 14px;
    color: #1e40af;
    font-weight: 500;
}

.balance-row .value {
    font-size: 20px;
    font-weight: 700;
    color: #1e3a8a;
}

/* Fee Info Box */
.fee-info-box {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
    border-left: 4px solid #f59e0b;
}

.fee-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.fee-details {
    flex: 1;
}

.fee-title {
    font-size: 15px;
    font-weight: 600;
    color: #78350f;
    margin-bottom: 4px;
}

.fee-subtitle {
    font-size: 13px;
    color: #92400e;
}

/* Amount Summary */
.amount-summary {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    margin: 20px 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-row.fee-row {
    color: #6b7280;
    font-size: 14px;
}

.summary-row.total-row {
    padding-top: 12px;
    margin-top: 8px;
    border-top: 2px solid #d1d5db;
    font-size: 16px;
}

.summary-row.receive-row {
    background: #d1fae5;
    margin: 8px -16px -16px -16px;
    padding: 12px 16px;
    border-radius: 0 0 8px 8px;
}

.receive-amount {
    font-size: 18px;
    font-weight: 700;
    color: #065f46;
}

/* Transactions */
.transactions-table {
    margin-top: 20px;
}

.transaction-row {
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid #e5e7eb;
    transition: all 0.3s ease;
}

.transaction-row:hover {
    background: #f3f4f6;
    transform: translateX(4px);
}

.transaction-row.deposit {
    border-left-color: #10b981;
}

.transaction-row.withdrawal {
    border-left-color: #ef4444;
}

.tx-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.tx-main strong {
    font-size: 16px;
    color: #1f2937;
}

.tx-amount {
    font-size: 18px;
    font-weight: 700;
}

.tx-amount.deposit {
    color: #10b981;
}

.tx-amount.withdrawal {
    color: #ef4444;
}

.tx-details {
    font-size: 13px;
    color: #6b7280;
}

.tx-details small {
    color: #9ca3af;
}

/* Notifications */
.moonbot-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    animation: slideIn 0.3s ease;
    max-width: 400px;
    font-weight: 500;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.moonbot-notification.success {
    background: #10b981;
    color: white;
}

.moonbot-notification.error {
    background: #ef4444;
    color: white;
}

.moonbot-notification.info {
    background: #3b82f6;
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .moonbot-wallet-container {
        margin: 20px 15px;
    }
    
    .moonbot-balance-card {
        padding: 30px 20px;
    }
    
    .balance-amount {
        font-size: 36px;
    }
    
    .balance-amount .currency {
        font-size: 18px;
    }
    
    .tab-content {
        padding: 20px;
    }
    
    .quick-amounts {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .moonbot-notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Loading States */
.loading {
    text-align: center;
    padding: 40px;
    color: #6b7280;
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}
/* ============================================
   MoonBot v8.3 - Beautiful Withdrawal UI CSS
   ============================================ */

/* Available Balance Card - Blue Theme */
.moonbot-balance-info-card {
    background: linear-gradient(135deg, #dbeafe 0%, #93c5fd 100%);
    border: 2px solid #3b82f6;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.balance-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.balance-label {
    font-size: 15px;
    font-weight: 600;
    color: #1e40af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.balance-value {
    font-size: 24px;
    font-weight: 700;
    color: #1e3a8a;
}

/* Fee Info Box - Gold Gradient */
.moonbot-fee-box {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-left: 4px solid #d97706;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.1);
}

.fee-content {
    display: flex;
    align-items: center;
    gap: 14px;
}

.fee-icon {
    font-size: 28px;
    line-height: 1;
}

.fee-text {
    flex: 1;
}

.fee-main {
    font-size: 16px;
    font-weight: 500;
    color: #78350f;
    margin-bottom: 4px;
}

.fee-main strong {
    font-weight: 700;
    color: #92400e;
}

.fee-sub {
    font-size: 14px;
    color: #a16207;
    font-weight: 400;
}

/* Amount Summary Card */
.moonbot-summary-card {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin: 24px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-label {
    font-size: 15px;
    color: #4b5563;
}

.summary-value {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.summary-item.fee-item {
    color: #6b7280;
}

.summary-item.fee-item .summary-label,
.summary-item.fee-item .summary-value {
    color: #6b7280;
    font-size: 14px;
}

.summary-divider {
    height: 2px;
    background: #d1d5db;
    margin: 8px 0;
}

.summary-item.total-item {
    padding: 14px 0;
    margin-top: 8px;
}

.summary-item.total-item .summary-label,
.summary-item.total-item .summary-value {
    font-size: 17px;
    font-weight: 700;
    color: #111827;
}

.summary-item.receive-item {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    margin: 12px -20px -20px -20px;
    padding: 16px 20px;
    border-radius: 0 0 10px 10px;
    border-top: 2px solid #10b981;
}

.summary-item.receive-item .summary-label {
    color: #065f46;
    font-weight: 600;
}

.receive-value {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #047857 !important;
}

/* Form Styling */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-help {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #6b7280;
}

/* Button */
.btn-large {
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
}

/* Button Disabled State */
.btn-disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
    background: #9ca3af !important;
}

.btn-disabled:hover {
    background: #9ca3af !important;
    transform: none !important;
}

/* Error and Warning Messages */
.error-message,
.warning-message {
    padding: 16px 20px;
    border-radius: 10px;
    margin: 16px 0;
    font-size: 14px;
    line-height: 1.6;
}

.error-message {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 2px solid #ef4444;
    border-left: 4px solid #dc2626;
    color: #991b1b;
}

.warning-message {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-left: 4px solid #d97706;
    color: #78350f;
}

.error-message strong,
.warning-message strong {
    display: block;
    font-size: 15px;
    margin-bottom: 8px;
    color: inherit;
}

.balance-note {
    display: block;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 13px;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .moonbot-balance-info-card {
        padding: 16px;
    }
    
    .balance-value {
        font-size: 20px;
    }
    
    .moonbot-fee-box {
        padding: 14px;
    }
    
    .fee-content {
        gap: 10px;
    }
    
    .fee-main {
        font-size: 14px;
    }
    
    .fee-sub {
        font-size: 12px;
    }
    
    .moonbot-summary-card {
        padding: 16px;
    }
    
    .summary-item.receive-item {
        margin: 12px -16px -16px -16px;
        padding: 14px 16px;
    }
}

/* ============================================
   MOBILE BUTTON FIX - Z-INDEX CLICKABILITY
   ============================================ */

/* Force mobile wallet status to be on top */
#solana-wallet-status {
    position: relative !important;
    z-index: 999999 !important;
    pointer-events: auto !important;
}

/* Ensure mobile buttons are clickable */
#solana-wallet-status a,
#solana-wallet-status button {
    position: relative !important;
    z-index: 999999 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: rgba(0,0,0,0.1) !important;
}

/* Prevent any overlays from blocking */
.moonbot-wallet-container {
    position: relative !important;
    z-index: 99999 !important;
}

/* Fix for tab content */
.tab-content {
    position: relative !important;
    z-index: 99998 !important;
}

/* Ensure no modals or overlays block on mobile */
@media (max-width: 768px) {
    #solana-wallet-status {
        isolation: isolate !important;
    }
    
    #solana-wallet-status a,
    #solana-wallet-status button {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Visual feedback when tapping */
    #solana-wallet-status a:active {
        opacity: 0.7 !important;
        transform: scale(0.98) !important;
        transition: all 0.1s !important;
    }
}
/* =============================================
   DERIV-STYLE SOLANA DEPOSIT - ADD TO moonbot.css
   ============================================= */

.mb-solana-box h4 {
    margin: 0 0 25px 0;
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
}

.mb-solana-box label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.mb-solana-field {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.mb-solana-field input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-family: monospace;
}

.mb-solana-field button {
    padding: 12px 24px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.mb-solana-field button:hover {
    background: #5a67d8;
}

.mb-instructions {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    padding: 16px;
    margin: 25px 0;
}

.mb-instructions p {
    margin: 0 0 8px 0;
    color: #78350f;
    font-size: 14px;
    line-height: 1.6;
}

.mb-instructions p:last-child {
    margin: 0;
}

#mb-deposit-status {
    margin-top: 20px;
}

/* Spinner animation */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e5e7eb;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal styles */
.mb-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 20px;
}
