/* =========================================================
   EnterSoft School - Modern Alerts & Modals Styling
   ========================================================= */

/* Backdrop with blur */
.swal2-container {
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
    background-color: rgba(15, 23, 42, 0.55) !important;
    z-index: 10000 !important;
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif !important;
}

/* Modal Card */
.swal2-popup.modern-alert-popup {
    border-radius: 20px !important;
    padding: 28px 24px 24px !important;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(15, 23, 42, 0.06) !important;
    background: #ffffff !important;
    color: #0f172a !important;
    max-width: 440px !important;
    width: 90% !important;
    transition: transform 0.2s ease, opacity 0.2s ease !important;
}

/* Dark mode compatibility */
body.dark .swal2-popup.modern-alert-popup,
.theme-dark .swal2-popup.modern-alert-popup {
    background: #1e293b !important;
    color: #f8fafc !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
}

/* Title */
.swal2-popup.modern-alert-popup .swal2-title {
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 12px 0 6px !important;
    padding: 0 !important;
    letter-spacing: -0.01em !important;
}

body.dark .swal2-popup.modern-alert-popup .swal2-title,
.theme-dark .swal2-popup.modern-alert-popup .swal2-title {
    color: #f8fafc !important;
}

/* Content Text */
.swal2-popup.modern-alert-popup .swal2-html-container {
    font-size: 0.95rem !important;
    line-height: 1.55 !important;
    color: #475569 !important;
    margin: 8px 0 20px !important;
    padding: 0 !important;
}

body.dark .swal2-popup.modern-alert-popup .swal2-html-container,
.theme-dark .swal2-popup.modern-alert-popup .swal2-html-container {
    color: #cbd5e1 !important;
}

/* Icons */
.swal2-popup.modern-alert-popup .swal2-icon {
    margin: 0 auto 8px !important;
    transform: scale(0.95) !important;
    border-width: 3px !important;
}

.swal2-popup.modern-alert-popup .swal2-icon.swal2-success {
    border-color: #16a34a !important;
    color: #16a34a !important;
}

.swal2-popup.modern-alert-popup .swal2-icon.swal2-success .swal2-success-ring {
    border-color: rgba(22, 163, 74, 0.25) !important;
}

.swal2-popup.modern-alert-popup .swal2-icon.swal2-success [class^='swal2-success-line'] {
    background-color: #16a34a !important;
}

.swal2-popup.modern-alert-popup .swal2-icon.swal2-question {
    border-color: #0284c7 !important;
    color: #0284c7 !important;
}

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

.swal2-popup.modern-alert-popup .swal2-icon.swal2-error {
    border-color: #ef4444 !important;
    color: #ef4444 !important;
}

.swal2-popup.modern-alert-popup .swal2-icon.swal2-error [class^='swal2-x-mark-line'] {
    background-color: #ef4444 !important;
}

/* Action Buttons Container */
.swal2-popup.modern-alert-popup .swal2-actions {
    display: flex !important;
    gap: 10px !important;
    margin: 18px 0 0 !important;
    width: 100% !important;
    justify-content: center !important;
}

/* Base Alert Buttons */
.modern-alert-btn {
    padding: 10px 22px !important;
    border-radius: 10px !important;
    font-size: 0.92rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em !important;
    cursor: pointer !important;
    transition: all 0.18s ease !important;
    border: none !important;
    outline: none !important;
}

.modern-alert-btn:focus {
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.3) !important;
}

/* Confirm Button (Green Theme) */
.modern-alert-btn-confirm {
    background: linear-gradient(135deg, #16a34a, #15803d) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3) !important;
}

.modern-alert-btn-confirm:hover {
    background: linear-gradient(135deg, #15803d, #166534) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px rgba(22, 163, 74, 0.4) !important;
}

/* Danger / Reject Button (Red) */
.modern-alert-btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3) !important;
}

.modern-alert-btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4) !important;
}

/* Warning / Re-evaluation Button (Amber) */
.modern-alert-btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3) !important;
}

.modern-alert-btn-warning:hover {
    background: linear-gradient(135deg, #d97706, #b45309) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4) !important;
}

/* Cancel Button */
.modern-alert-btn-cancel {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
}

.modern-alert-btn-cancel:hover {
    background: #e2e8f0 !important;
    color: #1e293b !important;
}

body.dark .modern-alert-btn-cancel,
.theme-dark .modern-alert-btn-cancel {
    background: #334155 !important;
    color: #cbd5e1 !important;
    border-color: #475569 !important;
}

body.dark .modern-alert-btn-cancel:hover,
.theme-dark .modern-alert-btn-cancel:hover {
    background: #475569 !important;
    color: #ffffff !important;
}

/* Textarea & Input Fields inside Modern Alerts */
.swal2-popup.modern-alert-popup .swal2-input,
.swal2-popup.modern-alert-popup .swal2-textarea,
.modern-alert-input {
    width: 100% !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 12px !important;
    padding: 10px 14px !important;
    font-size: 0.93rem !important;
    color: #0f172a !important;
    background: #f8fafc !important;
    outline: none !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.2s ease !important;
    font-family: inherit !important;
    margin: 12px auto !important;
    box-sizing: border-box !important;
}

.swal2-popup.modern-alert-popup .swal2-textarea {
    min-height: 85px !important;
    resize: vertical !important;
    line-height: 1.5 !important;
}

.swal2-popup.modern-alert-popup .swal2-input:focus,
.swal2-popup.modern-alert-popup .swal2-textarea:focus,
.modern-alert-input:focus {
    background: #ffffff !important;
    border-color: #16a34a !important;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18) !important;
}

body.dark .swal2-popup.modern-alert-popup .swal2-input,
body.dark .swal2-popup.modern-alert-popup .swal2-textarea,
body.dark .modern-alert-input,
.theme-dark .swal2-popup.modern-alert-popup .swal2-input,
.theme-dark .swal2-popup.modern-alert-popup .swal2-textarea,
.theme-dark .modern-alert-input {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

body.dark .swal2-popup.modern-alert-popup .swal2-input:focus,
body.dark .swal2-popup.modern-alert-popup .swal2-textarea:focus,
.theme-dark .swal2-popup.modern-alert-popup .swal2-input:focus,
.theme-dark .swal2-popup.modern-alert-popup .swal2-textarea:focus {
    background: #1e293b !important;
    border-color: #22c55e !important;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25) !important;
}

/* Modal Subject Badge Pill */
.sms-modal-subject-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border-radius: 9999px;
    background: #ecfdf5;
    color: #065f46;
    font-size: 0.88rem;
    font-weight: 700;
    border: 1px solid #a7f3d0;
    margin-bottom: 10px;
    text-transform: capitalize;
}

.sms-modal-subject-pill.sms-pill-warning {
    background: #fffbeb;
    color: #92400e;
    border-color: #fde68a;
}

body.dark .sms-modal-subject-pill,
.theme-dark .sms-modal-subject-pill {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.3);
}

body.dark .sms-modal-subject-pill.sms-pill-warning,
.theme-dark .sms-modal-subject-pill.sms-pill-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fcd34d;
    border-color: rgba(245, 158, 11, 0.3);
}

/* Notice box inside modal */
.sms-modal-notice {
    text-align: left;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.84rem;
    color: #475569;
    margin: 10px 0 14px;
    line-height: 1.45;
}

body.dark .sms-modal-notice,
.theme-dark .sms-modal-notice {
    background: rgba(15, 23, 42, 0.6);
    border-color: #334155;
    color: #94a3b8;
}

/* Interactive Quick-Reason Suggestion Chips */
.sms-modal-chips-wrap {
    text-align: left;
    margin: 8px 0 12px;
}

.sms-modal-chips-label {
    font-size: 0.76rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 6px;
    display: block;
}

body.dark .sms-modal-chips-label,
.theme-dark .sms-modal-chips-label {
    color: #94a3b8;
}

.sms-modal-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sms-modal-chip {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    line-height: 1.3;
}

.sms-modal-chip:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
    color: #0f172a;
    transform: translateY(-1px);
}

.sms-modal-chip.active {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
    font-weight: 600;
}

body.dark .sms-modal-chip,
.theme-dark .sms-modal-chip {
    background: #1e293b;
    border-color: #334155;
    color: #cbd5e1;
}

body.dark .sms-modal-chip:hover,
.theme-dark .sms-modal-chip:hover {
    background: #334155;
    border-color: #64748b;
    color: #f8fafc;
}

body.dark .sms-modal-chip.active,
.theme-dark .sms-modal-chip.active {
    background: rgba(245, 158, 11, 0.2);
    border-color: #f59e0b;
    color: #fcd34d;
}

/* Modern Toast Notification Styling */
.swal2-popup.modern-toast-popup {
    border-radius: 12px !important;
    padding: 12px 18px !important;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(15, 23, 42, 0.05) !important;
    font-size: 0.9rem !important;
    background: #ffffff !important;
    color: #0f172a !important;
}

body.dark .swal2-popup.modern-toast-popup,
.theme-dark .swal2-popup.modern-toast-popup {
    background: #1e293b !important;
    color: #f8fafc !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
}

.swal2-popup.modern-toast-popup .swal2-title {
    font-size: 0.92rem !important;
    font-weight: 600 !important;
    color: inherit !important;
    margin: 0 !important;
}

.swal2-popup.modern-toast-popup .swal2-icon {
    transform: scale(0.75) !important;
    margin: 0 8px 0 0 !important;
}
