/**!
 * @file    SwalTheme.css  (students)
 * @desc    SweetAlert (swal 2.1.2, the swal(...) dialogs) in the site's colors: the dialog box, title, text, buttons,
 *          icons and input take the palette roles (css/sw_palette.css), so every dialog matches the site in light and
 *          follows dark mode. SweetAlert injects its own white / light-blue style when it loads; every rule here starts
 *          with "body" so it wins over that whatever the load order. Loaded by the page heads (ssi/LookAndFeel*.shtml)
 *          right after the SweetAlert script.
 * @version v7 2026-11-23 - Initial version (owner: the Add to deck dialog was a bright white box with a light-blue OK button
 *          in dark mode).
 * @author  Charlie Samra <charles@samraworld.net>
 * @see     css/sw_palette.css, js/CatalogAddToDeck.js (the deck chooser inside the dialog)
 */

/* Backdrop and the dialog box */
body .swal-overlay { background-color: rgba(var(--c-black-rgb), 0.45); }   /* plain dim (the shadow color is green-tinted in light) */
body .swal-modal {
	background-color: var(--c-surface);
	border: 1px solid var(--c-line);
	border-radius: 14px;
	box-shadow: 0 18px 48px rgba(var(--c-shadow-rgb), 0.35);
	font-family: inherit;
}
body .swal-title { color: var(--c-text); font-family: inherit; font-weight: 700; }
body .swal-title:not(:last-child) { margin-bottom: 10px; }
body .swal-text { color: var(--c-text-soft); font-family: inherit; text-align: center; }

/* Buttons: OK / confirm = the site's standard button; Cancel = the quiet outlined button; danger = red */
body .swal-footer { text-align: center; }
body .swal-button {
	background-color: var(--c-brand);
	color: var(--c-on-fill);
	border: 0;
	border-radius: 999px;
	padding: 10px 26px;
	font-family: inherit;
	font-weight: 700;
	transition: background-color .15s ease;
}
body .swal-button:not([disabled]):hover { background-color: var(--c-hover); }
body .swal-button:active { background-color: var(--c-hover); }
body .swal-button:focus { box-shadow: 0 0 0 3px rgba(var(--c-brand-rgb), 0.35); outline: none; }
body .swal-button--cancel {
	background-color: var(--c-surface);
	color: var(--c-text-strong);
	border: 1.5px solid var(--c-line-strong);
}
body .swal-button--cancel:not([disabled]):hover,
body .swal-button--cancel:active { background-color: var(--c-hover-wash); color: var(--c-text-strong); }
body .swal-button--cancel:focus { box-shadow: 0 0 0 3px rgba(var(--c-line-strong-rgb), 0.6); }
body .swal-button--danger { background-color: var(--c-danger); color: var(--c-on-fill); }
body .swal-button--danger:not([disabled]):hover,
body .swal-button--danger:active { background-color: var(--c-danger-hover); }
body .swal-button--danger:focus { box-shadow: 0 0 0 3px rgba(var(--c-error-rgb), 0.35); }
body .swal-button[disabled] { opacity: .5; }

/* Text input (swal({ content: "input" })) */
body .swal-content__input,
body .swal-content__textarea {
	background-color: var(--c-surface);
	color: var(--c-text-strong);
	border: 1px solid var(--c-field-line);
	border-radius: 8px;
}
body .swal-content__input:focus,
body .swal-content__textarea:focus { border-color: var(--c-brand); box-shadow: 0 0 0 3px var(--c-tint-2); outline: none; }
body .swal-content__input::placeholder { color: var(--c-placeholder); }

/* Icons: the palette's success / warning / error colors. The success tick hides its ring with pieces painted in the
   box's own color, so those take the card color too. */
body .swal-icon--success { border-color: var(--c-success-fill); }
body .swal-icon--success__ring { border-color: rgba(var(--c-success-rgb), 0.25); }
body .swal-icon--success__line { background-color: var(--c-success-fill); }
body .swal-icon--success::before,
body .swal-icon--success::after,
body .swal-icon--success__hide-corners { background-color: var(--c-surface); }
body .swal-icon--warning { border-color: var(--c-warn-fill); }
body .swal-icon--warning__body,
body .swal-icon--warning__dot { background-color: var(--c-warn-fill); }
body .swal-icon--error { border-color: var(--c-danger); }
body .swal-icon--error__line { background-color: var(--c-danger); }
body .swal-icon--info { border-color: var(--c-line-bold); }
body .swal-icon--info::before,
body .swal-icon--info::after { background-color: var(--c-line-bold); }
