/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* #97 — hover states, formerly `onmouseover`/`onmouseout` attributes that set
   the background by hand. An inline handler is script, and a CSP that allows
   those allows injected ones too. `!important` because the resting background
   is an inline style attribute, which outranks any class. */
.hv-neutral-50:hover        { background: var(--neutral-50) !important; }
.hv-neutral-100:hover       { background: var(--neutral-100) !important; }
.hv-neutral-200:hover       { background: var(--neutral-200) !important; }
.hv-brand-50:hover          { background: var(--brand-50) !important; }
.hv-brand-100:hover         { background: var(--brand-100) !important; }
.hv-brand-700:hover         { background: var(--brand-700) !important; }
.hv-state-deleted-tint:hover { background: var(--state-deleted-tint) !important; }
.hv-danger-tint:hover       { background: var(--danger-tint) !important; }
.hv-nav:hover               { background: var(--nav-tile) !important; color: var(--nav-text) !important; }

/* A document row's actions come up to full strength while it is pointed at. */
.hv-doc-row:hover           { background: var(--neutral-50) !important; }
.hv-doc-row:hover .doc-acts { opacity: 1 !important; }

/* #97 — the publish toggle switch, which a script used to paint. */
.dt-switch-track { background: var(--neutral-300); }
.dt-switch-thumb { left: 2px; }
input:checked ~ .dt-switch-track { background: var(--brand-600); }
input:checked ~ .dt-switch-thumb { left: 19px; }

/* #133 — the in-page confirmation (controllers/confirm_controller.js). */
/* margin: auto is what centres a modal <dialog>; Tailwind's reset sets every
   margin to 0 and left it in the top-left corner. */
.dt-confirm { margin: auto; border: none; border-radius: 12px; padding: 22px; width: min(440px, calc(100vw - 32px)); box-shadow: var(--shadow-lg); font-family: var(--font-sans); color: var(--text-default); }
.dt-confirm::backdrop { background: rgba(20, 26, 54, 0.45); }
.dt-confirm-message { margin: 0 0 20px; font-size: 14px; line-height: 1.5; color: var(--text-strong); }
.dt-confirm-buttons { display: flex; justify-content: flex-end; gap: 8px; }
.dt-confirm-buttons button { border-radius: 6px; padding: 8px 14px; font-size: 13px; font-weight: 600; font-family: inherit; cursor: pointer; }
.dt-confirm-cancel { background: #fff; color: var(--text-default); border: 1px solid var(--border-strong); }
.dt-confirm-action { background: var(--state-deleted); color: #fff; border: 1px solid var(--state-deleted); }
.dt-confirm-ok { background: var(--brand-600); color: var(--brand-on-action, #fff); border: 1px solid var(--brand-600); }
