/* Unified Flash Message Modal Styles (m-PataWiFi) - High Priority Overlay */
.flash-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(15, 23, 42, 0.45) !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 2147483647 !important; /* Maximum CSS z-index */
    padding: 1rem !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    opacity: 1;
    transition: opacity 0.25s ease-out;
}

.flash-modal-overlay.dismissing {
    opacity: 0 !important;
    pointer-events: none !important;
}

.flash-modal-card {
    background: #ffffff !important;
    border-radius: 24px !important;
    max-width: 360px !important;
    width: 100% !important;
    padding: 2.25rem 1.75rem 1.75rem !important;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35) !important;
    position: relative !important;
    text-align: center !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    margin: auto !important;
    animation: flashPopIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.flash-modal-overlay.dismissing .flash-modal-card {
    animation: flashPopOut 0.25s ease-in forwards;
}

/* Close button X */
.flash-close-btn {
    position: absolute !important;
    top: 12px !important;
    right: 14px !important;
    background: transparent !important;
    border: none !important;
    color: #94a3b8 !important;
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    border-radius: 50% !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10 !important;
    transition: background 0.15s, color 0.15s !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
}

.flash-close-btn:hover {
    background: #f1f5f9 !important;
    color: #475569 !important;
}

/* Confetti Background for Success State */
.flash-confetti-bg {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 140px !important;
    pointer-events: none !important;
    background-image: 
        radial-gradient(#20c997 15%, transparent 16%),
        radial-gradient(#38d9a9 15%, transparent 16%),
        radial-gradient(#63e6be 15%, transparent 16%) !important;
    background-size: 60px 60px !important;
    background-position: 0 0, 30px 30px, 15px 45px !important;
    opacity: 0.18 !important;
}

/* Icon Container */
.flash-icon-wrapper {
    position: relative !important;
    width: 80px !important;
    height: 80px !important;
    margin: 0 auto 1.25rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 2 !important;
}

.flash-icon-wrapper svg {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
}

/* Success State Colors */
.flash-state-success .flash-title {
    color: #20c997 !important;
}

.flash-state-success .flash-btn {
    background: linear-gradient(135deg, #20c997 0%, #12b886 100%) !important;
    box-shadow: 0 6px 18px rgba(32, 201, 151, 0.35) !important;
}

.flash-state-success .flash-btn:hover {
    background: linear-gradient(135deg, #12b886 0%, #0ca678 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 8px 20px rgba(32, 201, 151, 0.45) !important;
}

.flash-state-success .flash-progress-bar-fill {
    background: #20c997 !important;
}

/* Error State Colors */
.flash-state-error .flash-title {
    color: #ff5252 !important;
}

.flash-state-error .flash-btn {
    background: linear-gradient(135deg, #ff5252 0%, #fa5252 100%) !important;
    box-shadow: 0 6px 18px rgba(255, 82, 82, 0.35) !important;
}

.flash-state-error .flash-btn:hover {
    background: linear-gradient(135deg, #fa5252 0%, #e03131 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 8px 20px rgba(255, 82, 82, 0.45) !important;
}

.flash-state-error .flash-progress-bar-fill {
    background: #ff5252 !important;
}

/* Content Typography */
.flash-title {
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    letter-spacing: 1.5px !important;
    text-transform: uppercase !important;
    margin: 0 0 0.65rem 0 !important;
    line-height: 1.2 !important;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.flash-message {
    color: #475569 !important;
    font-size: 0.925rem !important;
    line-height: 1.55 !important;
    margin: 0 0 1.5rem 0 !important;
    font-weight: 400 !important;
    padding: 0 0.25rem !important;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

/* Pill Action Button */
.flash-btn {
    display: inline-block !important;
    width: 100% !important;
    border-radius: 9999px !important;
    color: #ffffff !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    letter-spacing: 1.2px !important;
    text-transform: uppercase !important;
    padding: 0.85rem 1.5rem !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    outline: none !important;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.flash-btn:active {
    transform: translateY(1px) !important;
}

/* Progress Bar Indicator */
.flash-progress-bar {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 4px !important;
    background: #f1f5f9 !important;
    overflow: hidden !important;
}

.flash-progress-bar-fill {
    height: 100% !important;
    width: 100% !important;
    animation: flashProgress 4.5s linear forwards !important;
}

/* Keyframes */
@keyframes flashPopIn {
    0% {
        opacity: 0;
        transform: scale(0.82) translateY(12px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes flashPopOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.88);
    }
}

@keyframes flashProgress {
    0% {
        width: 100%;
    }
    100% {
        width: 0%;
    }
}
