/* =========================================================
   Payment Modal - White Theme
   ========================================================= */

/* =========================================================
   Toast Notifications
   ========================================================= */

#toastContainer {
    pointer-events: auto !important;
}

.toast-notification {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.08);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease-out;
    max-width: 400px;
    min-width: 320px;
    pointer-events: auto !important;
    position: relative;
    z-index: 1;
}

.toast-notification-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.toast-notification-content.success .toast-notification-icon {
    color: #28a745;
}

.toast-notification-content.error .toast-notification-icon,
.toast-notification-content.danger .toast-notification-icon {
    color: #dc3545;
}

.toast-notification-content.warning .toast-notification-icon {
    color: #ffc107;
}

.toast-notification-content.info .toast-notification-icon {
    color: #17a2b8;
}

.toast-notification-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 1;
}

.toast-notification-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-notification-texts {
    flex: 1;
    min-width: 0;
}

.toast-notification-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.toast-notification-message {
    font-size: 13px;
    color: #6c757d;
    margin: 0;
    line-height: 1.5;
    word-wrap: break-word;
}

.toast-notification-close {
    position: relative;
    z-index: 10;
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.toast-notification-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #1a1a1a;
}

/* Payment Modal Styles */

.payment-modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.payment-modal-overlay.active {
    display: flex;
}

.payment-modal {
    background-color: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.payment-modal-header {
    padding: 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 20px 20px 0 0;
}

.payment-modal-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.payment-modal-close {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-modal-close:hover {
    color: #1a1a1a;
}

.payment-modal-body {
    padding: 24px;
}

.payment-form-group {
    margin-bottom: 20px;
    display: block;
    width: 100%;
}

.payment-form-group .payment-label {
    display: block !important;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a !important;
    margin-bottom: 8px;
    width: 100% !important;
}

.payment-form-group .payment-hint {
    font-size: 13px;
    color: #1a1a1a !important;
    margin: 0 !important;
    display: block !important;
    width: 100% !important;
}

.payment-hint-wrapper {
    margin-top: 12px;
    display: block !important;
    width: 100% !important;
}

.balance-display {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    padding: 16px;
    background-color: rgba(13, 110, 253, 0.05);
    border: 1px solid rgba(13, 110, 253, 0.2);
    border-radius: 10px;
    text-align: center;
}

/* Withdraw Summary */
.withdraw-summary {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.withdraw-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
}

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

.withdraw-summary-label {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
}

.withdraw-summary-value {
    font-size: 14px;
    color: #1a1a1a;
    font-weight: 600;
    text-align: right;
    word-break: break-word;
}

.withdraw-summary-value.withdraw-address {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    max-width: 200px;
}

.withdraw-warning {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background-color: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 10px;
}

.withdraw-warning svg {
    color: #ffc107;
    flex-shrink: 0;
}

.withdraw-warning span {
    font-size: 13px;
    color: #856404;
    line-height: 1.5;
}

/* Payment Summary */
.payment-summary {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.payment-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
}

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

.payment-summary-label {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
}

.payment-summary-value {
    font-size: 14px;
    color: #1a1a1a;
    font-weight: 600;
    text-align: right;
    word-break: break-word;
}

.payment-summary-value.payment-address {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    max-width: 200px;
}

.payment-summary-row:has(#copyPersonalAddressBtn) {
    display: flex;
    align-items: center;
    gap: 8px;
}

#confirmPersonalAddress {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    max-width: 180px;
    flex: 1;
}

.copy-address-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    background: transparent;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6c757d;
    flex-shrink: 0;
}

.copy-address-btn:hover {
    background-color: #f8f9fa;
    border-color: #0d6efd;
    color: #0d6efd;
}

.copy-address-btn.copied {
    background-color: #198754;
    border-color: #198754;
    color: white;
}

.payment-warning {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background-color: rgba(13, 110, 253, 0.1);
    border: 1px solid rgba(13, 110, 253, 0.3);
    border-radius: 10px;
}

.payment-warning svg {
    color: #0d6efd;
    flex-shrink: 0;
}

.payment-warning span {
    font-size: 13px;
    color: #084298;
    line-height: 1.5;
}

.payment-service-info {
    background-color: rgba(13, 110, 253, 0.05);
    border: 1px solid rgba(13, 110, 253, 0.2);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 20px;
}

.payment-service-info-text {
    font-size: 14px;
    color: #0d6efd;
    font-weight: 500;
    margin: 0;
}

.payment-select,
.payment-input {
    width: 100%;
    padding: 12px 16px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    color: #1a1a1a;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.payment-select:focus,
.payment-input:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.payment-select {
    cursor: pointer;
}

.payment-select:disabled,
.payment-input:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
}

.payment-address {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    word-break: break-all;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 12px 16px;
    color: #1a1a1a;
    min-width: 0;
    height: 48px;
}

.payment-copy-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background-color: #0d6efd;
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    height: 48px;
    flex-shrink: 0;
}

.payment-copy-btn:hover {
    background-color: #0b5ed7;
}

.payment-copy-btn.copied {
    background-color: #198754;
}

.payment-hint {
    font-size: 13px;
    color: #6c757d;
    margin: 0;
    display: block;
}

.payment-hint-wrapper {
    margin-top: 12px;
    display: block;
    width: 100%;
}

.payment-submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.payment-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.3);
}

.payment-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.payment-modal-footer {
    padding: 16px 24px 24px;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background-color: #f8f9fa;
    border-radius: 0 0 20px 20px;
}

.payment-footer-text {
    font-size: 13px;
    color: #6c757d;
    margin: 0;
}

/* Toast Notifications */
.toast-notification {
    min-width: 300px;
    max-width: 400px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border: none;
    margin-bottom: 12px;
    overflow: hidden;
    pointer-events: auto !important;
    position: relative;
    z-index: 1;
}

.toast-notification.success {
    border-left: 4px solid #198754;
}

.toast-notification.error {
    border-left: 4px solid #dc3545;
}

.toast-notification.warning {
    border-left: 4px solid #ffc107;
}

.toast-notification.info {
    border-left: 4px solid #0d6efd;
}

.toast-notification-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
}

.toast-notification-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.toast-notification-icon.success { color: #198754; }
.toast-notification-icon.error { color: #dc3545; }
.toast-notification-icon.warning { color: #ffc107; }
.toast-notification-icon.info { color: #0d6efd; }

.toast-notification-title {
    font-weight: 600;
    font-size: 15px;
    color: #1a1a1a;
    flex: 1;
}

.toast-notification-close {
    position: relative;
    z-index: 10;
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #6c757d;
    transition: color 0.2s;
}

.toast-notification-close:hover {
    color: #1a1a1a;
}

.toast-notification-body {
    padding: 0 16px 16px 52px;
    font-size: 14px;
    color: #495057;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-notification {
    animation: slideInRight 0.3s ease-out;
}

/* Service info box */
.payment-service-info {
    background-color: rgba(13, 110, 253, 0.05);
    border: 1px solid rgba(13, 110, 253, 0.2);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 20px;
}

.payment-service-info-text {
    font-size: 14px;
    color: #0d6efd;
    font-weight: 500;
    margin: 0;
}

/* Animations */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.payment-modal-overlay.active .payment-modal {
    animation: modalFadeIn 0.2s ease-out;
}

/* Responsive */
@media (max-width: 576px) {
    .payment-modal-overlay {
        padding: 10px;
    }
    
    .payment-modal-header {
        padding: 16px;
    }
    
    .payment-modal-body {
        padding: 16px;
    }
    
    .payment-modal-header h2 {
        font-size: 18px;
    }
}
