/**
 * Global SweetAlert2 Emerald Glassmorphism Styling
 * Standardizes all platform alerts to the Mono Pay premium aesthetic.
 */

.swal2-popup:not(.swal2-toast) {
    background: rgba(6, 78, 59, 0.85) !important;
    backdrop-filter: blur(25px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(25px) saturate(200%) !important;
    border-radius: 2.5rem !important;
    padding: 2.5rem !important;
    font-family: 'Inter', system-ui, sans-serif !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6) !important;
    color: white !important;
}

/* Glassmorphism Backdrop Override - ONLY for full-screen modals, NEVER for toasts */
.swal2-container.swal2-backdrop-show:not(.swal2-has-toast):not(:has(.swal2-toast)) {
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    background: rgba(2, 44, 34, 0.4) !important;
}

/* Toast container transparent overrides - eliminate right-side blur column */
.swal2-container.swal2-top-end,
.swal2-container.swal2-top,
.swal2-container.swal2-top-start,
.swal2-container.swal2-bottom-end,
.swal2-container.swal2-bottom,
.swal2-container.swal2-bottom-start,
.swal2-container.swal2-center-end,
.swal2-container.swal2-center-start,
.swal2-container.swal2-has-toast,
.swal2-container:has(.swal2-toast) {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    pointer-events: none !important;
}

.swal2-popup:not(.swal2-toast) .swal2-title {
    font-weight: 900 !important;
    font-size: 1.5rem !important;
    color: white !important;
    letter-spacing: -0.025em !important;
    margin-bottom: 0.5rem !important;
    text-transform: uppercase;
}

.swal2-popup:not(.swal2-toast) .swal2-html-container {
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    color: rgba(255, 255, 255, 0.7) !important;
    line-height: 1.6 !important;
}

/* ============================================================
   MONO PAY LUXURY TOAST STYLING (EMERALD SQUIRCLE)
   ============================================================ */
.swal2-popup.swal2-toast {
    background: #081f18 !important;
    background: linear-gradient(135deg, rgba(8, 31, 24, 0.97) 0%, rgba(4, 20, 15, 0.98) 100%) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(16, 185, 129, 0.35) !important;
    border-radius: 1.25rem !important;
    padding: 0.75rem 1.15rem !important;
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.7), 0 0 20px rgba(16, 185, 129, 0.15) !important;
    width: auto !important;
    max-width: 380px !important;
    min-height: auto !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    pointer-events: auto !important;
    gap: 0.65rem !important;
}

.swal2-popup.swal2-toast .swal2-title {
    font-size: 0.8125rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    letter-spacing: 0.01em !important;
    text-transform: none !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.35 !important;
    text-align: left !important;
}

.swal2-popup.swal2-toast .swal2-html-container {
    font-size: 0.75rem !important;
    color: rgba(255, 255, 255, 0.75) !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.3 !important;
    text-align: left !important;
}

.swal2-popup.swal2-toast .swal2-icon {
    width: 1.65rem !important;
    height: 1.65rem !important;
    min-width: 1.65rem !important;
    margin: 0 !important;
    border-width: 2px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: none !important;
}

.swal2-popup.swal2-toast .swal2-icon.swal2-success {
    border-color: #10b981 !important;
    color: #10b981 !important;
}

.swal2-popup.swal2-toast .swal2-icon.swal2-success [class^='swal2-success-line'] {
    background-color: #10b981 !important;
    height: 2px !important;
}

.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring {
    display: none !important;
}

.swal2-popup.swal2-toast .swal2-icon.swal2-error {
    border-color: #f43f5e !important;
    color: #f43f5e !important;
}

.swal2-popup.swal2-toast .swal2-icon.swal2-warning {
    border-color: #f59e0b !important;
    color: #f59e0b !important;
}

.swal2-popup.swal2-toast .swal2-timer-progress-bar {
    background: #10b981 !important;
    height: 3px !important;
    border-radius: 0 0 1.25rem 1.25rem !important;
}

.swal2-confirm {
    background: #10b981 !important;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border-radius: 1.25rem !important;
    padding: 0.85rem 2.5rem !important;
    font-size: 0.8rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.15em !important;
    box-shadow: 0 10px 20px -5px rgba(16, 185, 129, 0.4) !important;
    border: none !important;
    color: white !important;
    margin: 0.5rem !important;
}

.swal2-cancel {
    background: rgba(255, 255, 255, 0.05) !important;
    color: rgba(255, 255, 255, 0.6) !important;
    border-radius: 1.25rem !important;
    padding: 0.85rem 2.5rem !important;
    font-size: 0.8rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.15em !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    margin: 0.5rem !important;
}

/* Icon Overrides - Premium Emerald Theme */
.swal2-popup:not(.swal2-toast) .swal2-icon {
    border-width: 3px !important;
    margin-bottom: 1.5rem !important;
}

.swal2-icon.swal2-success {
    border-color: #10b981 !important;
    color: #10b981 !important;
}
.swal2-icon.swal2-success [class^='swal2-success-line'] {
    background-color: #10b981 !important;
}
.swal2-icon.swal2-success .swal2-success-ring {
    border: 0.25em solid rgba(16, 185, 129, .2) !important;
}

.swal2-icon.swal2-error {
    border-color: #f43f5e !important;
    color: #f43f5e !important;
}
.swal2-icon.swal2-error [class^='swal2-x-mark-line'] {
    background-color: #f43f5e !important;
}

.swal2-icon.swal2-info {
    border-color: #3b82f6 !important;
    color: #3b82f6 !important;
}

.swal2-icon.swal2-warning {
    border-color: #f59e0b !important;
    color: #f59e0b !important;
}

/* Hover Effects */
.swal2-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(16, 185, 129, 0.5) !important;
}

.swal2-cancel:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
}

/* Progress Bar */
.swal2-timer-progress-bar {
    background: #10b981 !important;
}

/* Animations */
.swal2-show {
    animation: swal2-show 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

@keyframes swal2-show {
    0% { transform: scale(0.8) translateY(20px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* Loading Spinner - Emerald */
.premium-loader {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(16, 185, 129, 0.1);
    border-top: 4px solid #10b981;
    border-radius: 50%;
    animation: premium-spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    margin: 2rem auto;
}

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

/* ============================================================
   MONO PAY LUXURY KEYPAD MODAL (CONFIRM PURCHASE & SECURITY PIN)
   Mapped 1:1 with Official Enterprise Mobile Theme
   ============================================================ */

.keypad-modal {
    background: #081f18 !important;
    backdrop-filter: blur(30px) saturate(190%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(190%) !important;
    border-radius: 2.75rem !important;
    padding: 2.25rem 1.65rem 2rem !important;
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.85), 
                0 0 0 1px rgba(255, 255, 255, 0.05),
                inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    color: white !important;
    overflow: hidden !important;
    width: 380px !important;
    max-width: 95vw !important;
}

/* Header & Close Button */
.keypad-title {
    font-size: 1.35rem !important;
    font-weight: 900 !important;
    color: #ffffff !important;
    letter-spacing: -0.02em !important;
    line-height: 1.2 !important;
}

.keypad-sub {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #10b981 !important;
    letter-spacing: 0.01em !important;
    margin-top: 4px !important;
}

.close-btn {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    background: #13392d !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #8ba89e !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.close-btn:hover {
    background: #1b4b3b !important;
    color: #ffffff !important;
    transform: rotate(90deg) scale(1.05) !important;
}

/* Transaction Details Summary Box (Image 1) */
.summary-box {
    background: #0b2c22 !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 1.5rem !important;
    padding: 1.15rem 1.25rem !important;
    margin-bottom: 1.75rem !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

.summary-label {
    font-size: 10px !important;
    font-weight: 900 !important;
    color: #86b2a4 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
}

.summary-val {
    font-size: 13.5px !important;
    font-weight: 900 !important;
    color: #ffffff !important;
    letter-spacing: -0.01em !important;
    text-align: right !important;
}

/* Standalone Security Badge (Image 2) */
.pin-badge-icon {
    width: 60px !important;
    height: 60px !important;
    border-radius: 1.25rem !important;
    background: #0f3d30 !important;
    border: 1px solid rgba(16, 185, 129, 0.25) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto 1.25rem !important;
    box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

/* Visual PIN Indicator Dots */
.visual-dots {
    display: flex !important;
    justify-content: center !important;
    gap: 1.25rem !important;
    margin: 0.5rem 0 1.75rem !important;
}

.keypad-dot, .bio-keypad-dot {
    width: 14px !important;
    height: 14px !important;
    border-radius: 50% !important;
    background: #133b2e !important;
    border: none !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.keypad-dot.filled, .bio-keypad-dot.filled {
    background: #10b981 !important;
    transform: scale(1.3) !important;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.75) !important;
}

/* Squircle Keypad Buttons */
.key-btn {
    background: #0e352a !important;
    border: 1px solid rgba(255, 255, 255, 0.03) !important;
    border-radius: 1.25rem !important;
    height: 62px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    color: white !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 10px -2px rgba(0, 0, 0, 0.2) !important;
}

.key-btn:hover {
    background: #124033 !important;
    border-color: rgba(16, 185, 129, 0.2) !important;
}

.key-btn:active {
    background: #174f3f !important;
    border-color: rgba(16, 185, 129, 0.45) !important;
    transform: scale(0.93) !important;
    box-shadow: 0 0 18px rgba(16, 185, 129, 0.3) !important;
}

.key-btn span:first-child {
    font-size: 1.45rem !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    color: #ffffff !important;
}

.key-btn span:last-child {
    font-size: 8.5px !important;
    font-weight: 900 !important;
    letter-spacing: 0.06em !important;
    color: #6e9488 !important;
    text-transform: uppercase !important;
    margin-top: 3px !important;
}

.key-btn i {
    color: #8ba89e !important;
    transition: color 0.15s ease !important;
}

.key-btn:hover i {
    color: #ffffff !important;
}

