/*
 * frega-dialog.css
 * SweetAlert2 theme override — Frega brand
 * Tokens: docs/STYLE.md
 * z-index: Modal layer (500+), above Bootstrap modals (1050 is Bootstrap default — Swal2 uses 1060)
 */

/* ── Container / backdrop ───────────────────────────────────────── */
.swal2-container {
	z-index: 1060; /* above Bootstrap modals (1050) — named layer: Modal in STYLE.md */
}

.swal2-backdrop-show {
	background: rgba(0, 0, 0, 0.45);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
}

/* ── Popup box ──────────────────────────────────────────────────── */
.swal2-popup.frega-dialog {
	font-family: Lato, sans-serif; /* --font-body */
	font-size: 16px;               /* body size — must not go below 16px */
	border-radius: 6px;            /* --radius-md */
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10); /* --shadow-3 */
	padding: 24px 32px;            /* --space-5 / --space-6 */
	color: #222;                   /* --clr-text */
	max-width: 520px;
}

.swal2-popup.frega-dialog.frega-dialog--wide {
	max-width: 860px;
	width: 90%;
}

/* ── Title ──────────────────────────────────────────────────────── */
.swal2-popup.frega-dialog .swal2-title {
	font-family: Raleway, sans-serif; /* --font-heading */
	font-size: clamp(18px, 2.5vw, 24px); /* H2 */
	font-weight: 600;
	color: #222;                          /* --clr-text */
	padding: 0 0 8px;
	margin: 0;
}

/* ── Content / message ──────────────────────────────────────────── */
.swal2-popup.frega-dialog .swal2-html-container {
	font-size: 16px;
	color: #444;       /* --clr-text-mid */
	margin: 8px 0 16px;
	text-align: left;
}

/* ── Icon colours (map to BootstrapDialog TYPE_* ── */
/* TYPE_INFO  → teal */
.swal2-popup.frega-dialog.frega-type-info .swal2-icon.swal2-info {
	border-color: #107a84;   /* --clr-teal */
	color: #107a84;
}
/* TYPE_SUCCESS → green */
.swal2-popup.frega-dialog.frega-type-success .swal2-icon.swal2-success {
	border-color: #509972;   /* --clr-green */
	color: #509972;
}
.swal2-popup.frega-dialog.frega-type-success .swal2-icon.swal2-success .swal2-success-ring {
	border-color: rgba(80, 153, 114, 0.3);
}
.swal2-popup.frega-dialog.frega-type-success .swal2-icon.swal2-success [class^='swal2-success-line'] {
	background-color: #509972;
}
/* TYPE_WARNING → orange */
.swal2-popup.frega-dialog.frega-type-warning .swal2-icon.swal2-warning {
	border-color: #e75524;   /* --clr-orange */
	color: #e75524;
}
/* TYPE_DANGER → red */
.swal2-popup.frega-dialog.frega-type-danger .swal2-icon.swal2-error {
	border-color: #a40000;   /* --clr-danger */
	color: #a40000;
}
.swal2-popup.frega-dialog.frega-type-danger .swal2-icon.swal2-error [class^='swal2-x-mark-line'] {
	background-color: #a40000;
}

/* ── Button area ────────────────────────────────────────────────── */
.swal2-popup.frega-dialog .swal2-actions {
	gap: 8px;          /* --space-2 */
	margin-top: 8px;
	justify-content: flex-end;
}

/* ── Confirm button (Tier 2 — teal secondary) ───────────────────── */
.swal2-popup.frega-dialog .swal2-confirm {
	background: #107a84;     /* --clr-teal */
	color: #fff;
	border: 2px solid #107a84;
	border-radius: 3px;      /* --radius-sm */
	font-family: Lato, sans-serif;
	font-size: 14px;         /* button size */
	font-weight: 600;
	padding: 8px 20px;
	min-height: 44px;        /* touch target */
	box-shadow: none;
}
.swal2-popup.frega-dialog .swal2-confirm:hover,
.swal2-popup.frega-dialog .swal2-confirm:focus {
	background: #00758f;     /* --clr-teal-dark */
	border-color: #00758f;
	box-shadow: none;
}

/* ── Cancel / deny button (Tier 3 — ghost) ─────────────────────── */
.swal2-popup.frega-dialog .swal2-cancel,
.swal2-popup.frega-dialog .swal2-deny {
	background: transparent;
	color: #107a84;          /* --clr-teal */
	border: 1px solid #cbcbcb; /* --clr-border */
	border-radius: 3px;      /* --radius-sm */
	font-family: Lato, sans-serif;
	font-size: 14px;
	font-weight: 400;
	padding: 8px 20px;
	min-height: 44px;        /* touch target */
	box-shadow: none;
}
.swal2-popup.frega-dialog .swal2-cancel:hover,
.swal2-popup.frega-dialog .swal2-cancel:focus,
.swal2-popup.frega-dialog .swal2-deny:hover,
.swal2-popup.frega-dialog .swal2-deny:focus {
	background: #e6f4f6;     /* --clr-light-teal */
	border-color: #107a84;
	color: #107a84;
	box-shadow: none;
}

/* ── Danger confirm override (destructive action) ───────────────── */
.swal2-popup.frega-dialog.frega-type-danger .swal2-confirm {
	background: #a40000;     /* --clr-danger */
	border-color: #a40000;
}
.swal2-popup.frega-dialog.frega-type-danger .swal2-confirm:hover,
.swal2-popup.frega-dialog.frega-type-danger .swal2-confirm:focus {
	background: #800000;
	border-color: #800000;
}

/* ── Close (X) button ───────────────────────────────────────────── */
.swal2-popup.frega-dialog .swal2-close {
	color: #737373;          /* --clr-text-light */
	font-size: 24px;
	top: 12px;
	right: 14px;
}
.swal2-popup.frega-dialog .swal2-close:hover {
	color: #222;
}

/* ── Panel variant (noIcon:true — content-loading dialogs) ─────── */
/* No icon, compact title bar, wider default width                    */
.swal2-popup.frega-dialog.frega-dialog--panel {
	max-width: 600px;
	width: 92%;
	padding: 0;
	overflow-x: hidden;
}

/* Title becomes a flat header bar */
.swal2-popup.frega-dialog.frega-dialog--panel .swal2-title {
	background: #f5f5f5;
	border-bottom: 1px solid #e0e0e0;
	font-size: 15px;
	font-weight: 600;
	color: #333;
	text-align: left;
	padding: 12px 20px;
	margin: 0;
}

/* Content area flush to edges, no inner scroll */
.swal2-popup.frega-dialog.frega-dialog--panel .swal2-html-container {
	margin: 0;
	padding: 0;
	text-align: left;
	overflow: visible;
}

/* Buttons bar at bottom */
.swal2-popup.frega-dialog.frega-dialog--panel .swal2-actions {
	border-top: 1px solid #e0e0e0;
	margin: 0;
	padding: 10px 16px;
	justify-content: flex-end;
	background: #fafafa;
}

/* ── Reduced motion ─────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
	.swal2-popup.frega-dialog,
	.swal2-backdrop-show {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}
