/* =========================================================
   Jobeyze Glassmorphism Alert Popups
   Version: 1.0 — Feb 19, 2026
   LOCKED DESIGN — Do not modify without approval
   
   Overrides SweetAlert2 default styling globally.
   Accent line colors: red=error, green=success, amber=warning, gradient=info
   Icons: none for error/info, animated checkmark for success, animated triangle for warning
   Animation: 0.4s slide-up with cubic-bezier(0.22, 1, 0.36, 1)
   ========================================================= */

/* --- Glassmorphism Popup Container --- */
div.swal2-popup.swal2-modal {
    background: rgba(255, 255, 255, 0.82) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-radius: 14px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.45) !important;
    padding: 0 !important;
    overflow: hidden !important;
    max-width: 380px !important;
    min-width: 380px !important;
    min-height: 200px !important;
    width: 380px !important;
    font-family: 'Open Sans', sans-serif !important;
}

/* --- Slide-in Animation --- */
@keyframes jzPopupSlideIn {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* --- Backdrop --- */
div.swal2-container.swal2-shown {
    background: rgba(0, 0, 0, 0.35) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
}

/* --- Accent Line (injected via JS as first child) --- */
.jz-accent-line {
    height: 3px;
    width: 100%;
    display: block;
}
.jz-accent-line.jz-accent-error {
    background: linear-gradient(90deg, #dc3545, #e74c5c);
}
.jz-accent-line.jz-accent-success {
    background: linear-gradient(90deg, #16a34a, #22c55e);
}
.jz-accent-line.jz-accent-warning {
    background: linear-gradient(90deg, #d97706, #f59e0b);
}
.jz-accent-line.jz-accent-info {
    background: linear-gradient(90deg, #D0003A, #B51151, #AB2379);
}
.jz-accent-line.jz-accent-question {
    background: linear-gradient(90deg, #D0003A, #B51151, #AB2379);
}
.jz-accent-line.jz-accent-default {
    background: linear-gradient(90deg, #D0003A, #B51151, #AB2379);
}

/* --- Inner content area padding --- */
div.swal2-popup.swal2-modal .swal2-icon {
    width: 36px !important;
    height: 36px !important;
    font-size: 14px !important;
    line-height: 36px !important;
    margin: 14px auto 2px !important;
    border-width: 2px !important;
}

div.swal2-popup.swal2-modal .swal2-title {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 700 !important;
    font-size: 18px !important;
    color: #1a1a2e !important;
    padding: 20px 20px 2px !important;
    margin: 0 !important;
}

div.swal2-popup.swal2-modal .swal2-html-container {
    font-family: 'Open Sans', sans-serif !important;
    font-size: 14px !important;
    color: #555 !important;
    line-height: 1.45 !important;
    padding: 4px 20px 0 !important;
    margin: 0 !important;
}

/* --- Animated Success Checkmark --- */
@keyframes jzCircleDraw {
    from { stroke-dashoffset: 150; }
    to { stroke-dashoffset: 0; }
}
@keyframes jzTickDraw {
    from { stroke-dashoffset: 24; }
    to { stroke-dashoffset: 0; }
}
@keyframes jzSoftBounce {
    0% { transform: scale(1); }
    40% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

.jz-check-wrap {
    width: 40px;
    height: 40px;
    margin: 16px auto 4px;
    display: inline-block;
    animation: jzSoftBounce 0.36s ease 0.84s both;
}
.jz-check-wrap svg { width: 40px; height: 40px; }
.jz-check-wrap .jz-c-ring {
    fill: rgba(34, 197, 94, 0.08);
    stroke: #22c55e;
    stroke-width: 2;
    stroke-dasharray: 150;
    stroke-dashoffset: 150;
    stroke-linecap: round;
    animation: jzCircleDraw 0.54s ease 0.18s forwards;
}
.jz-check-wrap .jz-c-tick {
    fill: none;
    stroke: #16a34a;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 24;
    stroke-dashoffset: 24;
    animation: jzTickDraw 0.3s ease 0.6s forwards;
}

/* --- Animated Warning Triangle --- */
@keyframes jzTriDraw {
    from { stroke-dashoffset: 76; }
    to { stroke-dashoffset: 0; }
}
@keyframes jzFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes jzWarnPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

.jz-warn-wrap {
    width: 40px;
    height: 40px;
    margin: 16px auto 4px;
    display: inline-block;
    animation: jzWarnPulse 0.42s ease 0.78s both;
}
.jz-warn-wrap svg { width: 40px; height: 40px; }
.jz-warn-wrap .jz-w-bg {
    fill: rgba(245, 158, 11, 0.08);
}
.jz-warn-wrap .jz-w-tri {
    fill: none;
    stroke: #d97706;
    stroke-width: 1.8;
    stroke-linejoin: round;
    stroke-linecap: round;
    stroke-dasharray: 76;
    stroke-dashoffset: 76;
    animation: jzTriDraw 0.5s ease 0.18s forwards;
}
.jz-warn-wrap .jz-w-line {
    stroke: #d97706;
    stroke-width: 2;
    stroke-linecap: round;
    opacity: 0;
    animation: jzFadeIn 0.2s ease 0.6s forwards;
}
.jz-warn-wrap .jz-w-dot {
    fill: #d97706;
    opacity: 0;
    animation: jzFadeIn 0.2s ease 0.74s forwards;
}

/* --- Buttons --- */
div.swal2-popup.swal2-modal .swal2-actions {
    margin: 14px 0 16px !important;
    padding: 0 20px !important;
    gap: 10px !important;
}

div.swal2-popup.swal2-modal .swal2-styled.swal2-confirm {
    background: linear-gradient(90deg, #D0003A, #B51151, #AB2379) !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 8px 24px !important;
    font-size: 14px !important;
    font-family: 'Open Sans', sans-serif !important;
    font-weight: 600 !important;
    color: #fff !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
    white-space: nowrap !important;
    min-width: 80px !important;
    letter-spacing: 0.2px !important;
}

div.swal2-popup.swal2-modal .swal2-styled.swal2-confirm:hover {
    opacity: 0.92 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 3px 10px rgba(208, 0, 58, 0.25) !important;
}

div.swal2-popup.swal2-modal .swal2-styled.swal2-confirm:focus {
    box-shadow: 0 0 0 3px rgba(208, 0, 58, 0.15) !important;
}

div.swal2-popup.swal2-modal .swal2-styled.swal2-cancel {
    background: rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 8px !important;
    padding: 8px 24px !important;
    font-size: 14px !important;
    font-family: 'Open Sans', sans-serif !important;
    font-weight: 600 !important;
    color: #666 !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
    white-space: nowrap !important;
    min-width: 80px !important;
}

div.swal2-popup.swal2-modal .swal2-styled.swal2-cancel:hover {
    background: rgba(0, 0, 0, 0.08) !important;
}

div.swal2-popup.swal2-modal .swal2-styled.swal2-deny {
    background: rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 8px !important;
    padding: 8px 24px !important;
    font-size: 14px !important;
    font-family: 'Open Sans', sans-serif !important;
    font-weight: 600 !important;
    color: #666 !important;
    white-space: nowrap !important;
}

/* --- Close button --- */
div.swal2-popup.swal2-modal .swal2-close {
    color: #999 !important;
    font-size: 22px !important;
    font-weight: 300 !important;
    top: 6px !important;
    right: 8px !important;
}
div.swal2-popup.swal2-modal .swal2-close:hover {
    color: #D0003A !important;
}

/* --- Input fields --- */
div.swal2-popup.swal2-modal .swal2-input,
div.swal2-popup.swal2-modal .swal2-select,
div.swal2-popup.swal2-modal .swal2-textarea {
    border: 1px solid #dee2e6 !important;
    border-radius: 8px !important;
    font-family: 'Open Sans', sans-serif !important;
    font-size: 14px !important;
    padding: 10px 14px !important;
    margin: 8px 20px !important;
}
div.swal2-popup.swal2-modal .swal2-input:focus {
    border-color: #D0003A !important;
    box-shadow: 0 0 0 3px rgba(208, 0, 58, 0.1) !important;
}

/* --- Footer --- */
div.swal2-popup.swal2-modal .swal2-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
    color: #888 !important;
    font-size: 13px !important;
    padding: 10px 20px !important;
    margin: 0 !important;
}

/* --- Loading spinner --- */
div.swal2-popup.swal2-modal .swal2-loader {
    border-color: #D0003A transparent #D0003A transparent !important;
}

/* --- Toast overrides --- */
.swal2-toast.swal2-popup {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    padding: 10px 16px !important;
}

/* =========================================================
   MOBILE RESPONSIVE
   ========================================================= */
@media (max-width: 768px) {
    div.swal2-popup.swal2-modal {
        min-width: 300px !important;
        max-width: 90vw !important;
        min-height: 180px !important;
        border-radius: 12px !important;
    }
    div.swal2-popup.swal2-modal .swal2-title {
        font-size: 16px !important;
        padding: 16px 16px 2px !important;
    }
    div.swal2-popup.swal2-modal .swal2-html-container {
        font-size: 13px !important;
        padding: 4px 16px 0 !important;
    }
    div.swal2-popup.swal2-modal .swal2-actions {
        padding: 0 16px !important;
        margin: 12px 0 14px !important;
    }
    div.swal2-popup.swal2-modal .swal2-styled.swal2-confirm,
    div.swal2-popup.swal2-modal .swal2-styled.swal2-cancel {
        padding: 7px 20px !important;
        font-size: 13px !important;
        border-radius: 7px !important;
    }
    .jz-check-wrap,
    .jz-warn-wrap {
        width: 36px;
        height: 36px;
        margin: 14px auto 4px;
    }
    .jz-check-wrap svg,
    .jz-warn-wrap svg {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 375px) {
    div.swal2-popup.swal2-modal {
        min-width: 280px !important;
        max-width: 90vw !important;
        border-radius: 10px !important;
    }
    div.swal2-popup.swal2-modal .swal2-title {
        font-size: 15px !important;
        padding: 14px 14px 2px !important;
    }
    div.swal2-popup.swal2-modal .swal2-html-container {
        font-size: 12px !important;
        padding: 4px 14px 0 !important;
    }
    div.swal2-popup.swal2-modal .swal2-styled.swal2-confirm,
    div.swal2-popup.swal2-modal .swal2-styled.swal2-cancel {
        padding: 6px 18px !important;
        font-size: 12px !important;
    }
    .jz-check-wrap,
    .jz-warn-wrap {
        width: 32px;
        height: 32px;
        margin: 12px auto 4px;
    }
    .jz-check-wrap svg,
    .jz-warn-wrap svg {
        width: 32px;
        height: 32px;
    }
}

/* --- Safe animation class (applied via SweetAlert2 showClass, not CSS animation) --- */
.jz-animate-in {
    animation: jzPopupSlideIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- Hide icons for error and info only (per locked design) --- */
div.swal2-popup.swal2-modal .swal2-icon.swal2-error {
    display: none !important;
}
div.swal2-popup.swal2-modal .swal2-icon.swal2-info {
    display: none !important;
}

/* --- Style warning icon colors --- */
div.swal2-popup.swal2-modal .swal2-icon.swal2-warning {
    border-color: #d97706 !important;
    color: #d97706 !important;
}

/* --- Style success icon colors --- */
div.swal2-popup.swal2-modal .swal2-icon.swal2-success {
    border-color: #22c55e !important;
}
div.swal2-popup.swal2-modal .swal2-icon.swal2-success .swal2-success-ring {
    border-color: rgba(34, 197, 94, 0.2) !important;
}
div.swal2-popup.swal2-modal .swal2-icon.swal2-success [class^='swal2-success-line'] {
    background-color: #16a34a !important;
}

/* --- Scale warning icon inner elements --- */
div.swal2-popup.swal2-modal .swal2-icon.swal2-warning .swal2-icon-content {
    font-size: 22px !important;
    line-height: 36px !important;
}

/* --- Scale success icon inner elements --- */
div.swal2-popup.swal2-modal .swal2-icon.swal2-success .swal2-success-line-tip {
    width: 12px !important;
    left: 4px !important;
    top: 20px !important;
}
div.swal2-popup.swal2-modal .swal2-icon.swal2-success .swal2-success-line-long {
    width: 22px !important;
    right: 2px !important;
    top: 17px !important;
}
div.swal2-popup.swal2-modal .swal2-icon.swal2-success .swal2-success-ring {
    width: 36px !important;
    height: 36px !important;
}

/* =========================================================
   Jobeyze Flash Toast Banners
   Restyles Laravel flash_notification alerts
   ========================================================= */
div.alert.alert-success,
div.alert.alert-warning,
div.alert.alert-danger,
div.alert.alert-info {
    font-family: 'Open Sans', sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    border-radius: 10px !important;
    border: none !important;
    padding: 14px 20px !important;
    margin-bottom: 16px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08) !important;
    position: relative !important;
    border-left: 4px solid transparent !important;
}

div.alert.alert-success,
div.alert.alert-warning.alert-important,
div.alert.alert-success.alert-important {
    background: rgba(34, 197, 94, 0.08) !important;
    color: #15803d !important;
    border-left-color: #16a34a !important;
}

div.alert.alert-warning,
div.alert.alert-warning.alert-important {
    background: rgba(245, 158, 11, 0.08) !important;
    color: #92400e !important;
    border-left-color: #d97706 !important;
}

div.alert.alert-danger,
div.alert.alert-danger.alert-important {
    background: rgba(220, 53, 69, 0.08) !important;
    color: #991b1b !important;
    border-left-color: #dc3545 !important;
}

div.alert.alert-info {
    background: rgba(208, 0, 58, 0.06) !important;
    color: #1A1A2E !important;
    border-left-color: #D0003A !important;
}

/* Close button */
.alert .close,
.alert .btn-close {
    color: inherit !important;
    opacity: 0.5 !important;
    font-size: 18px !important;
    padding: 14px 16px !important;
}
.alert .close:hover,
.alert .btn-close:hover {
    opacity: 0.8 !important;
}

/* Mobile */
@media (max-width: 768px) {
    div.alert.alert-success,
    div.alert.alert-warning,
    div.alert.alert-danger,
    div.alert.alert-info {
        font-size: 13px !important;
        padding: 12px 16px !important;
        border-radius: 8px !important;
    }
}
