/* Custom SweetAlert Styles for App (Mobile View) */
.swal2-popup {
    border-radius: 1.5rem !important;
    padding: 2rem 1.5rem !important;
    background-color: #ffffff !important;
    border: none !important;
    box-shadow: 0 10px 40px -10px rgba(0,0,0,0.1) !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    width: 90% !important;
    max-width: 400px !important;
}

.swal2-title {
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    color: #0f172a !important; /* slate-900 */
    padding-top: 0.5rem !important;
}

.swal2-html-container {
    font-size: 0.875rem !important;
    color: #64748b !important; /* slate-500 */
    line-height: 1.5 !important;
    margin-top: 0.75rem !important;
}

/* ── Semantic Icons (Customized modern designs without FontAwesome dependency) ── */
.swal2-icon {
    border-width: 0 !important;
    width: 64px !important;
    height: 64px !important;
    margin: 0 auto 1.25rem auto !important;
    border-radius: 50% !important;
    align-items: center !important;
    justify-content: center !important;
    animation: none !important; /* Disable default shake/scale animations */
}

.swal2-icon:not([style*="display: none"]):not([style*="display:none"]) {
    display: flex !important;
}

.swal2-icon[style*="display: none"],
.swal2-icon[style*="display:none"],
.swal2-title[style*="display: none"],
.swal2-title[style*="display:none"],
.swal2-title:empty {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
}

/* Custom SweetAlert Modal with custom HTML content */
.swal2-popup.custom-swal-popup {
    padding: 1.5rem !important;
}

.swal2-popup.custom-swal-popup .swal2-icon,
.swal2-popup.custom-swal-popup .swal2-title {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
}

.swal2-popup.custom-swal-popup .swal2-html-container {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
}

/* Hide all inner nodes and pseudo-elements from default SweetAlert DOM */
.swal2-icon.swal2-success *,
.swal2-icon.swal2-success::before,
.swal2-icon.swal2-success::after,
.swal2-icon.swal2-error *,
.swal2-icon.swal2-error::before,
.swal2-icon.swal2-error::after,
.swal2-icon.swal2-warning *,
.swal2-icon.swal2-info * {
    display: none !important;
    animation: none !important;
}

/* Success Icon (Red as Primary Theme) */
.swal2-icon.swal2-success {
    background-color: #fee2e2 !important; /* red-100 */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512' fill='%23dc2626'%3E%3Cpath d='M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z'/%3E%3C/svg%3E") !important;
    background-size: 28px !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

/* Error/Danger Icon */
.swal2-icon.swal2-error {
    background-color: #ffe4e6 !important; /* rose-100 */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512' fill='%23e11d48'%3E%3Cpath d='M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z'/%3E%3C/svg%3E") !important;
    background-size: 28px !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}
.swal2-icon.swal2-error [class^='swal2-x-mark-line'],
.swal2-icon.swal2-error .swal2-x-mark {
    display: none !important;
}

/* Warning/Info Icon */
.swal2-icon.swal2-warning, .swal2-icon.swal2-info {
    background-color: #fef3c7 !important; /* amber-100 */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 192 512' fill='%23d97706'%3E%3Cpath d='M96 0c17.7 0 32 14.3 32 32V256c0 17.7-14.3 32-32 32s-32-14.3-32-32V32C64 14.3 78.3 0 96 0zM96 400a32 32 0 1 1 0 64 32 32 0 1 1 0-64z'/%3E%3C/svg%3E") !important;
    background-size: 8px !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}
.swal2-icon.swal2-warning .swal2-icon-content,
.swal2-icon.swal2-info .swal2-icon-content {
    display: none !important;
}

/* Buttons */
.swal2-actions {
    margin-top: 1.5rem !important;
    gap: 0.75rem !important;
    width: 100% !important;
    flex-direction: column !important; /* Stack buttons vertically on mobile */
}

.swal2-styled {
    margin: 0 !important;
    width: 100% !important;
    padding: 0.875rem 1.5rem !important;
    border-radius: 1rem !important;
    font-size: 0.9375rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.025em !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
}

/* Primary Confirm Button (Merah / Red-600) */
.swal2-styled.swal2-confirm {
    background-color: #dc2626 !important; /* red-600 */
    color: #ffffff !important;
}
.swal2-styled.swal2-confirm:active {
    transform: scale(0.97) !important;
    background-color: #b91c1c !important; /* red-700 */
}

/* Danger Confirm/Deny Button (Merah Gelap / Rose-900) */
.swal2-styled.swal-button-danger, /* custom class */
.swal2-styled.swal2-deny {
    background-color: #881337 !important; /* rose-900 */
    color: #ffffff !important;
}
.swal2-styled.swal2-deny:active {
    transform: scale(0.97) !important;
    background-color: #4c0519 !important; /* rose-950 */
}

/* Cancel Button */
.swal2-styled.swal2-cancel {
    background-color: #f1f5f9 !important; /* slate-100 */
    color: #475569 !important; /* slate-600 */
}
.swal2-styled.swal2-cancel:active {
    transform: scale(0.97) !important;
    background-color: #e2e8f0 !important; /* slate-200 */
}
