/* ══════════════════════════════════════════════════════════════════════
   Difalink — Unified SweetAlert2 popup theme
   Elegant, rounded, teal-accented look matching the landing/index theme.
   Loaded on every page that uses Swal so all popups look consistent.
   ══════════════════════════════════════════════════════════════════════ */

.swal2-popup.difa-popup {
    border-radius: 20px;
    padding: 28px 26px 24px;
    box-shadow: 0 24px 60px -12px rgba(13, 59, 54, 0.35),
                0 6px 18px rgba(13, 59, 54, 0.12);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    border: 1px solid rgba(44, 176, 161, 0.18);
    overflow: hidden;
}

/* Accent bar at the very top of the popup (clipped by popup overflow) */
.swal2-popup.difa-popup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #0d3b36, #2cb0a1 55%, #1a7a6f);
}

.swal2-popup.difa-popup .swal2-title {
    color: #0d3b36;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 6px;
}

.swal2-popup.difa-popup .swal2-html-container,
.swal2-popup.difa-popup .swal2-content {
    color: #475467;
    font-size: 15px;
    line-height: 1.6;
}

/* ── Buttons ── */
.swal2-popup.difa-popup .swal2-actions {
    gap: 12px;
    margin-top: 24px;
    width: 100%;
}

.swal2-popup.difa-popup .swal2-styled {
    border-radius: 12px;
    padding: 12px 30px;
    min-width: 120px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.2px;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

/* Remove SweetAlert's default harsh focus ring; use a clean soft one */
.swal2-popup.difa-popup .swal2-styled:focus,
.swal2-popup.difa-popup .swal2-styled:focus-visible {
    outline: none !important;
    box-shadow: 0 0 0 4px rgba(44, 176, 161, 0.22) !important;
}

/* Confirm = teal gradient (overrides inline confirmButtonColor) */
.swal2-popup.difa-popup .swal2-confirm.swal2-styled {
    background: linear-gradient(135deg, #2cb0a1, #15837a) !important;
    color: #fff !important;
    box-shadow: 0 6px 16px rgba(21, 131, 122, 0.28) !important;
}
.swal2-popup.difa-popup .swal2-confirm.swal2-styled:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(21, 131, 122, 0.38) !important;
    filter: brightness(1.04);
}
.swal2-popup.difa-popup .swal2-confirm.swal2-styled:active {
    transform: translateY(0);
    filter: brightness(0.98);
}

/* Deny / destructive = soft red */
.swal2-popup.difa-popup .swal2-deny.swal2-styled {
    background: linear-gradient(135deg, #ef4444, #b91c1c) !important;
    color: #fff !important;
    box-shadow: 0 6px 16px rgba(185, 28, 28, 0.25) !important;
}
.swal2-popup.difa-popup .swal2-deny.swal2-styled:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(185, 28, 28, 0.35) !important;
}

/* Cancel = subtle neutral */
.swal2-popup.difa-popup .swal2-cancel.swal2-styled {
    background: #eef2f1 !important;
    color: #0d3b36 !important;
}
.swal2-popup.difa-popup .swal2-cancel.swal2-styled:hover {
    background: #e2e8e6 !important;
    transform: translateY(-1px);
}

/* ── Icons themed ── */
.swal2-popup.difa-popup .swal2-icon {
    margin: 6px auto 18px;
}
.swal2-popup.difa-popup .swal2-icon.swal2-success {
    border-color: #2cb0a1;
    color: #2cb0a1;
}
.swal2-popup.difa-popup .swal2-icon.swal2-success [class^='swal2-success-line'] {
    background-color: #2cb0a1;
}
.swal2-popup.difa-popup .swal2-icon.swal2-success .swal2-success-ring {
    border-color: rgba(44, 176, 161, 0.35);
}
.swal2-popup.difa-popup .swal2-icon.swal2-warning {
    border-color: #f0b429;
    color: #f0b429;
}
.swal2-popup.difa-popup .swal2-icon.swal2-info {
    border-color: #2cb0a1;
    color: #2cb0a1;
}
.swal2-popup.difa-popup .swal2-icon.swal2-question {
    border-color: #2cb0a1;
    color: #2cb0a1;
}

/* ── Inputs inside popups ── */
.swal2-popup.difa-popup .swal2-input,
.swal2-popup.difa-popup .swal2-textarea,
.swal2-popup.difa-popup .swal2-select {
    border-radius: 10px;
    border: 2px solid #d1d5db;
    box-shadow: none;
    font-size: 15px;
}
.swal2-popup.difa-popup .swal2-input:focus,
.swal2-popup.difa-popup .swal2-textarea:focus,
.swal2-popup.difa-popup .swal2-select:focus {
    border-color: #2cb0a1;
    box-shadow: 0 0 0 3px rgba(44, 176, 161, 0.18);
}

/* ── Close button ── */
.swal2-popup.difa-popup .swal2-close {
    color: #94a3b8;
    font-size: 30px;
    transition: color 0.2s ease;
    box-shadow: none !important;
    outline: none !important;
}
.swal2-popup.difa-popup .swal2-close:hover {
    color: #0d3b36;
}

/* ── Toasts (top-end notifications) ── */
.swal2-toast.difa-popup {
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(13, 59, 54, 0.18);
    border: 1px solid rgba(44, 176, 161, 0.18);
}
.swal2-toast.difa-popup::before { display: none; }

/* Backdrop tint */
.swal2-container.difa-backdrop {
    background: rgba(13, 59, 54, 0.45) !important;
    backdrop-filter: blur(2px);
}

/* Keep popup comfortably inside small viewports */
.swal2-container.difa-backdrop {
    padding: 16px;
}

@media (max-width: 600px) {
    .swal2-popup.difa-popup {
        width: 100%;
        max-width: 420px;
        border-radius: 18px;
        padding: 26px 20px 22px;
    }
    .swal2-popup.difa-popup .swal2-title {
        font-size: 19px;
    }
    .swal2-popup.difa-popup .swal2-html-container,
    .swal2-popup.difa-popup .swal2-content {
        font-size: 14.5px;
    }
    .swal2-popup.difa-popup .swal2-icon {
        transform: scale(0.9);
        margin: 2px auto 12px;
    }
    .swal2-popup.difa-popup .swal2-actions {
        flex-direction: column-reverse;
        gap: 10px;
        margin-top: 22px;
    }
    .swal2-popup.difa-popup .swal2-styled {
        width: 100%;
        margin: 0;
        padding: 13px 20px;
        font-size: 15.5px;
    }
}

@media (max-width: 380px) {
    .swal2-popup.difa-popup {
        padding: 22px 16px 18px;
    }
    .swal2-popup.difa-popup .swal2-title {
        font-size: 18px;
    }
}
