/*
 * WIF.Modal — the full-page confirmation dialog.
 *
 * Deliberately covers everything. These appear before something that cannot
 * be undone, and a dialog you can read past while still seeing the button
 * you were about to press is one you dismiss without reading.
 */

.wif-modal {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
	background: rgba(26, 22, 18, 0.55);
	backdrop-filter: blur(2px);
}
.wif-modal[hidden] { display: none; }

/* The page underneath must not scroll away behind the dialog. */
.wif-modal-open, .wif-modal-open body { overflow: hidden; }

.wif-modal-panel {
	width: 100%;
	max-width: 30rem;
	background: #fdfbf6;
	border: 1px solid #d8d2c4;
	border-radius: 10px;
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.30);
	padding: 1.4rem 1.5rem 1.2rem;
	font: 15px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
	color: #1a1a1a;
}
/* A red rule along the top for the destructive ones — enough to change the
   feel of the dialog without shouting. */
.wif-modal-panel.is-danger { border-top: 4px solid #c0392b; }

.wif-modal-title { margin: 0 0 0.6rem; font-size: 1.15rem; line-height: 1.3; }
.wif-modal-body  { margin: 0 0 0.6rem; }
.wif-modal-note  { margin: 0; color: #6a635a; font-size: 0.92rem; }

.wif-modal-actions {
	display: flex;
	justify-content: flex-end;
	gap: 0.6rem;
	margin-top: 1.3rem;
}
.wif-modal-actions button {
	font: inherit;
	font-weight: 600;
	padding: 0.5rem 1.1rem;
	border-radius: 5px;
	cursor: pointer;
}
.wif-modal-cancel {
	background: #fff;
	color: #1a1a1a;
	border: 1px solid #d8d2c4;
}
.wif-modal-cancel:hover { border-color: #bdb4a4; }
.wif-modal-ok {
	background: #c0392b;
	color: #fff;
	border: 1px solid #a5312444;
}
.wif-modal-ok:hover { background: #a63125; }

/* Focus has to stay visible: cancel holds it on open, and that is the whole
   reason the dangerous button is not one Return away. */
.wif-modal-actions button:focus-visible {
	outline: 2px solid #2d5aa8;
	outline-offset: 2px;
}
