/* ==========================================================================
   Xphias LLC Guest Speaker Manager
   07-modes.css
   Mode states: read-only enforcement, mode badges, cloud-sync badges and the global footer.
   ========================================================================== */

/* ========================================================= */

/* Hidden Secret TM Toggle Link in Read-Only Mode */
.secret-tm-link {
  transition: all 0.2s ease;
  user-select: none;
  display: inline-block;
  padding: 0 2px;
}
body.read-only-system .secret-tm-link {
  cursor: pointer !important;
}
body.read-only-system .secret-tm-link:hover {
  color: var(--brand, #c9a84c) !important;
  text-shadow: 0 0 8px rgba(201, 168, 76, 0.4);
}
/* The lock is the way OUT of Read-Only, so hiding it in Read-Only would be
   a door that locks from the outside. It stays live in both modes. */
body.read-only-system #opt-readonly-toggle {
  display: flex !important;
  pointer-events: auto !important;
  cursor: pointer !important;
}

/* Non-clickable Mode Badges for Curate and Pre-Production sections */
#workspace-mode-badge,
#ws-curate .mode-badge,
#ws-prepro .mode-badge,
.curate-ro-banner .mode-badge {
  pointer-events: none !important;
  cursor: default !important;
}

/* MODE BADGE STYLES */
.mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  line-height: 1;
}
.mode-badge.badge-readonly {
  background: rgba(239, 68, 68, 0.18);
  border: 1.5px solid var(--red);
  color: var(--red);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.35);
}
.mode-badge.badge-readonly:hover {
  background: rgba(239, 68, 68, 0.3);
  transform: scale(1.04);
}
.mode-badge.badge-edit {
  background: rgba(45, 158, 107, 0.18);
  border: 1.5px solid var(--green);
  color: var(--green);
  box-shadow: 0 0 12px rgba(45, 158, 107, 0.35);
}
.mode-badge.badge-edit:hover {
  background: rgba(45, 158, 107, 0.3);
  transform: scale(1.04);
}

/* STRICT READ-ONLY ENFORCEMENT FOR CURATE & CALENDAR */
body.read-only-system #ws-curate .card-header button:not([onclick*="openTP"]),
body.read-only-system #ws-curate .asset-item button,
body.read-only-system #ws-curate button[onclick*="openScript"],
body.read-only-system #ws-curate button[onclick*="openMeta"],
body.read-only-system #ws-curate button[onclick*="openCue"],
body.read-only-system #ws-curate button[onclick*="openAddAst"],
body.read-only-system button[onclick*="openCue"],
body.read-only-system button[onclick*="oEAst"],
body.read-only-system button[onclick*="tAst"],
body.read-only-system #btn-auto-curate,
body.read-only-system .curate-edit-only {
  display: none !important;
}

body.read-only-system .curate-ro-banner {
  display: flex !important;
}

body.read-only-system #calendar-overlay .cal-day-cell {
  cursor: default !important;
}

body.read-only-system .cal-event-pill {
  cursor: pointer !important;
  user-select: none !important;
  -webkit-user-drag: none !important;
}
body.read-only-system .cal-event-pill button {
  display: none !important;
}

/* READ ONLY SYSTEM-WIDE RESTRICTION RULES                   */
/* ========================================================= */
/* The one mode switch, in Format, Colour & Layout. Always visible, always
   clickable, in either mode. */
#opt-readonly-toggle {
  display: flex !important;
  pointer-events: auto !important;
}

body.read-only-system .btn-prepro-video,
body.read-only-system a.btn-prepro-video {
  pointer-events: auto !important;
  cursor: pointer !important;
}

/* Bulletproof Read-Only Enforcement for all Form Elements */
/* The three Auto-Curation fields used to be exempted here so they stayed
   live in Read-Only. They are not exempt any more: that screen is now
   open to look at and closed to change, like the rest. Search boxes and
   filters stay live, because searching is reading.

   .fcl-live is the Format, Colour & Layout exemption. That screen stays
   fully usable while the workspace is locked, on purpose: a theme, a font,
   a column arrangement and a date format change how THIS device looks and
   touch nobody's records. Somebody reading a locked call sheet in a dark
   edit bay should still be able to make it legible. The class is applied
   by hand in js/04-settings.js, control by control, so anything added to
   that screen later that really does write a record is still frozen. */
/* .xp-auth-live is THE SIGN-IN EXEMPTION, and it is not optional.

   A viewer with no account is held in read-only, and the rule below was
   switching off pointer events on every input on the page -- including the
   username and password boxes in the sign-in dialog. You could open the
   dialog, and then not type in it. Signing in needed typing, and typing
   needed being signed in: a door that locks from the outside, which is the
   same fault that was found once before on the mode switch itself.

   Every field in an accounts dialog carries this class. Nothing else does. */
body.read-only-system input:not([type="search"]):not(.fcl-live):not(.xp-auth-live):not(.sb-live):not(#crew-att-search):not(#sb-search):not(#c-query):not([type="button"]):not([type="submit"]),
body.read-only-system textarea:not(.fcl-live):not(.xp-auth-live):not(.sb-live),
body.read-only-system select:not(.fcl-live):not(.xp-auth-live):not(#crew-att-status-filter):not(#sb-sort):not([id^="cal-filter-"]) {
  pointer-events: none !important;
  user-select: text !important;
  cursor: default !important;
  background: rgba(15, 23, 42, 0.5) !important;
  color: #cbd5e1 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* AND THE SUGGESTION BOX, FOR THE SAME REASON AS THE SIGN-IN FIELDS.

   The Suggestion Box card is shown ONLY when the workspace is in Read-Only —
   that is the whole point of it, it is for the people who cannot edit. Which
   means the rule above applied to its own form: the dialog opened, looked
   perfectly normal, and could not be typed into by anybody who could see it.
   A door that locks from the outside, again, and this time on the one screen
   whose entire audience is locked out.

   Its fields carry .sb-live. They write nothing to the database — they post
   one row to a tab that is not part of it — so Read-Only has no business
   stopping them. */
body.read-only-system [contenteditable="true"]:not(.sb-live) {
  pointer-events: none !important;
  user-select: text !important;
}

body.read-only-system input[type="checkbox"]:not(.fcl-live):not(.xp-auth-live),
body.read-only-system input[type="radio"]:not(.fcl-live):not(.xp-auth-live) {
  pointer-events: none !important;
}

/* And belt and braces: whatever else a later release adds to the read-only
   rules, an accounts dialog stays usable. Without a way in there is no way
   out of read-only at all. */
body.read-only-system .xp-auth input,
body.read-only-system .xp-auth textarea,
body.read-only-system .xp-auth select,
body.read-only-system .xp-auth button {
  pointer-events: auto !important;
  user-select: text !important;
  cursor: auto !important;
}

/* Hide all Save, Add, Edit, Delete, and Mutating buttons in Read-Only Mode */
body.read-only-system button[onclick*="save()"],
body.read-only-system .toolbar button[onclick*="save()"],
body.read-only-system #btn-save,
body.read-only-system .btn-add-speaker,
body.read-only-system #btn-auto-curate,
body.read-only-system #btn-export-excel,
body.read-only-system #card-curate-add,
body.read-only-system .landing-grid > .l-card:first-child,
body.read-only-system .l-card[onclick*="openNewGuest"],
body.read-only-system button[onclick*="openNewGuest"],
body.read-only-system button[onclick*="openAddAst"],
body.read-only-system button[onclick*="openScript"],
body.read-only-system button[onclick*="openMeta"],
body.read-only-system button[onclick*="openCue"],
/* Scoped to the workspace on purpose. As a blanket rule this also hid the
   Help screen's "Curating a Speaker" tab, because that button's onclick
   happens to contain the word. A match on a substring of a handler name is
   a broad net; it belongs inside the area it is protecting. */
body.read-only-system #ws-curate button[onclick*="curate"],
body.read-only-system #editor-screen button[onclick*="curate"],
body.read-only-system button[onclick*="expCSV"],
body.read-only-system button[onclick*="prtAnPDF"],
body.read-only-system button[onclick*="expAnCSV"],
body.read-only-system button[onclick*="expCrewAttendanceCSV"],
body.read-only-system button[onclick*="oP("],
body.read-only-system button[onclick*="addAppearanceRow"],
body.read-only-system button[onclick*="addArrayRow"],
body.read-only-system button[onclick*="addSermonDetailsRow"],
body.read-only-system button[onclick*="deleteCalEvent"],
body.read-only-system button[onclick*="openEditCalEvent"],
body.read-only-system .cal-event-pill button,
body.read-only-system .module-card::after {
  display: none !important;
}

body.read-only-system .module-card {
  cursor: default !important;
}

body.read-only-system .module-card:hover {
  border-color: transparent !important;
  box-shadow: none !important;
  background: rgba(30, 41, 59, 0.8) !important;
}


/* ========================================================= */
/* CLOUD SYNC & CONCURRENCY COLLISION SHIELD STYLES          */
/* ========================================================= */
.cloud-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}
.cloud-badge.synced {
  background: rgba(45, 158, 107, 0.15);
  border: 1px solid var(--green, #2d9e6b);
  color: #4ade80;
}
.cloud-badge.syncing {
  background: rgba(0, 180, 216, 0.15);
  border: 1px solid var(--cyan, #00b4d8);
  color: var(--cyan, #00b4d8);
  animation: gentleFadeInOut 1.5s ease-in-out infinite;
}
.cloud-badge.conflict {
  background: rgba(239, 68, 68, 0.2);
  border: 1.5px solid var(--red, #ef4444);
  color: #fca5a5;
  animation: pulseConflict 1s infinite alternate;
}
.cloud-badge.offline {
  background: rgba(148, 163, 184, 0.15);
  border: 1px solid var(--muted, #94a3b8);
  color: var(--muted, #94a3b8);
}

/* REMOVED: a rule here used to force every Cloud Sync control to stay
   visible and clickable in read-only mode. Google Sheets is now hidden
   entirely while locked -- see the block at the end of this file. */


/* ========================================================= */
/* GLOBAL XPHIAS DYNAMIC FOOTER & SECRET TOGGLE LINK         */
/* ========================================================= */
/* One footer, identical on every page.
   The five footers previously differed in indentation, wording and element
   order, so they sat at slightly different heights and alignments page to
   page. They are now one shared block of markup, centred, with fixed
   spacing, and pinned to the bottom of the page rather than floating just
   under whatever content happens to end there. */
/* TWO LINES NOW: the credit and the year on one, the Google Sheets status
   centred underneath it on its own. The status used to sit up beside the
   page heading, competing with the thing you had come to read. It is a
   status light rather than a control -- you do not act on it, you glance at
   it -- and the bottom of the page is where a light like that belongs. */
.global-xphias-footer {
  width: 100%;
  margin-top: auto;              /* push to the bottom of a flex column page */
  padding: 22px 16px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;       /* dead centre, every page */
  gap: 8px;
  text-align: center;
  font-size: 10pt;
  line-height: 1.5;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted, #94a3b8);
  user-select: none;
}
/* The Curate footer sits inside the 3-column .app-grid, so as a plain grid
   item it only occupied ONE column -- 469px of a 1320px page, visibly
   off-centre against every other page. Spanning every column puts it back
   in the middle of the page, which is what "uniform, centred" means here. */
.app-grid > .global-xphias-footer,
.document-grid > .global-xphias-footer,
[style*="grid"] > .global-xphias-footer {
  grid-column: 1 / -1;
}

/* The first line keeps the old side-by-side arrangement. */
.global-xphias-footer .footer-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
/* The second line: one status light, centred, and never in capitals --
   it is a sentence about what is happening, not a label. */
.global-xphias-footer .footer-sync-line {
  display: flex;
  justify-content: center;
  width: 100%;
  text-transform: none;
  letter-spacing: normal;
}
.global-xphias-footer .cloud-sync-line {
  font-size: 9pt;
  line-height: 1.4;
  max-width: 100%;
}
/* Nothing to print here -- a status light on paper is a puzzle. */
@media print {
  .global-xphias-footer .footer-sync-line { display: none !important; }
}

.global-xphias-footer .footer-credit {
  white-space: nowrap;
}
/* Narrow screens: stack rather than break mid-sentence, still centred. */
@media (max-width: 520px) {
  .global-xphias-footer {
    gap: 6px;
    letter-spacing: 0.06em;
    font-size: 9pt;
  }
  .global-xphias-footer .footer-row { flex-direction: column; gap: 4px; }
  .global-xphias-footer .footer-credit { white-space: normal; }
}
.secret-ro-toggle-link {
  color: inherit !important;
  text-decoration: none !important;
  cursor: pointer !important;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.25s ease;
  display: inline-block;
  font-weight: 600;
}
.secret-ro-toggle-link:hover {
  color: var(--brand, #c9a84c) !important;
  text-shadow: 0 0 10px rgba(201, 168, 76, 0.5);
  transform: scale(1.08);
}


/* =========================================================================
   STATUS-ONLY CLOUD BADGES
   The badges on the Dashboard, Pre-Production Note and Curate pages report
   the master database state but are deliberately NOT controls. The sync
   connection is managed from one place only: Options -> Google Sheets Cloud
   Sync. That stops a stray click during production from opening (or worse,
   changing) the connection settings.
   ========================================================================= */
.cloud-badge--status {
  cursor: default !important;
  user-select: none;
}
.cloud-badge--status:hover {
  filter: none;
  transform: none;
}

/* The read-only lock previously forced every .cloud-badge back to being
   clickable. Status badges must stay inert in both modes. */
body.read-only-system .cloud-badge--status,
body.read-only-system #cloud-sync-badge.cloud-badge--status,
body.read-only-system #landing-cloud-sync-badge.cloud-badge--status {
  pointer-events: none !important;
  cursor: default !important;
}

/* The Options-menu Cloud Sync row is hidden in read-only mode along with
   everything else that mentions Google Sheets. See the block at the end. */

/* A quiet "needs attention" pulse on the status badge, so a failed upload is
   noticeable without being a button. */
@keyframes xphiasBadgeAttention {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
  50%      { box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.22); }
}
.cloud-badge--status.error,
.cloud-badge--status.conflict {
  animation: xphiasBadgeAttention 2.4s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .cloud-badge--status.error,
  .cloud-badge--status.conflict { animation: none; }
}


/* =========================================================================
   READ-ONLY: HIDE THE CONTROLS THE ORIGINAL SELECTORS MISSED

   The existing rules hid buttons whose handler was literally `save()`. The
   header Save button calls `save(true)`, so it stayed visible and clickable
   in locked mode. The roster's per-appearance add and delete buttons were
   not covered at all.

   These rules close the visual gap. The real lock is blockIfReadOnly() in
   06-readonly.js, which every mutating function now calls -- CSS alone was
   never enough.
   ========================================================================= */
body.read-only-system #btn-save-header,
body.read-only-system button[onclick^="save("],
body.read-only-system button[onclick*="openAddOccurrence"],
body.read-only-system button[onclick*="deleteOccurrence"],
body.read-only-system button[onclick*="permDeleteOccurrence"],
body.read-only-system button[onclick*="restoreOccurrence"],
body.read-only-system button[onclick*="permDeleteProf"],
body.read-only-system button[onclick*="restoreProf"],
body.read-only-system button[onclick*="emptyTrash"],
body.read-only-system button[onclick*="addCat"] {
  display: none !important;
}


/* =========================================================================
   READ-ONLY MODE: WHAT DISAPPEARS

   Read-only is the presentation view. Anyone can be handed the screen in it
   -- a guest speaker, a visiting crew member, a projector in the sanctuary.
   So it hides two categories of thing:

     1. EVERY MENTION OF GOOGLE SHEETS. The master database, its address and
        its sync state are operator plumbing. They are not something a guest
        needs to see, and the connection settings are not something a stray
        click should reach. All of it comes back the moment you unlock.

     2. EVERY CONTROL THAT CHANGES DATA. Auto-Curate,
        Save, and the roster's trash controls.

   This is the visual half. The enforcement half is blockIfReadOnly() in
   06-readonly.js, which every mutating function calls -- CSS alone was never
   enough, and a rule that merely hides a button still leaves it clickable by
   keyboard or by script.
   ========================================================================= */

/* ---- 1. Google Sheets ---------------------------------------------------
   The Cloud Sync SCREEN is open to look at in Read-Only, and so is the
   Options row that reaches it -- you should be able to see whether the
   master database is connected without being able to change it.

   What stays hidden is narrower and deliberate: the live status badges,
   which invite a click that cannot work; the connection address, which no
   guest needs to read; and any button that would actually talk to Google.  */
body.read-only-system .cloud-badge,
body.read-only-system .cloud-badge--status,
body.read-only-system #cloud-sync-badge,
body.read-only-system #landing-cloud-sync-badge,
body.read-only-system .cloud-sync-banner,
body.read-only-system [class*="cloud-badge"],
body.read-only-system button[onclick*="GoogleSheetsSync"],
body.read-only-system a[href*="docs.google.com"],
body.read-only-system [onclick*="openCloudSettings"],
body.read-only-system #cfg-apps-script-url,
body.read-only-system #cfg-sheet-id {
  display: none !important;
}

/* The row that opens it, and the screen itself, stay put. */
body.read-only-system #opt-cloud-sync {
  display: flex !important;
}

/* ---- 2. The three named controls --------------------------------------- */
body.read-only-system #btn-auto-curate,
body.read-only-system [onclick*="curate()"],
body.read-only-system #btn-save-header,
body.read-only-system #btn-save,
body.read-only-system button[onclick^="save("],
body.read-only-system .toolbar button[onclick*="save("] {
  display: none !important;
}

/* ---- 3. Speaker Management: no trash, no removing anyone ------------------ */
body.read-only-system #roster-list button[onclick*="tProf"],
body.read-only-system button[onclick*="tProf"],
body.read-only-system button[onclick*="emptyTrash"],
body.read-only-system button[onclick*="permDeleteProf"],
body.read-only-system button[onclick*="restoreProf"],
body.read-only-system button[onclick*="permDeleteOccurrence"],
body.read-only-system button[onclick*="restoreOccurrence"],
body.read-only-system button[onclick*="openAddOccurrence"],
body.read-only-system button[onclick*="deleteOccurrence"],
body.read-only-system .text-red[title*="Trash"],
body.read-only-system .text-red[title*="Delete"] {
  display: none !important;
}

/* With Trash hidden, the Active tab takes the full width rather than
   leaving a gap where the second button was. */
body.read-only-system #sb-tab-active {
  flex: 1 1 100% !important;
}


/* =========================================================================
   CACHE SENTINEL

   Browsers cache CSS by filename, and these filenames never change. After a
   re-upload a browser will happily keep serving the copy of this file it
   downloaded weeks ago, and the update appears to have done nothing at all.

   This custom property is the tell. 25-boot.js reads it and compares it with
   the build it expects; a mismatch raises a banner telling you to hard-reload
   rather than leaving you to wonder why nothing changed.

   Bump this whenever js/01-config.js `version` is bumped.
   ========================================================================= */
:root {
  --xphias-css-build: "1.90.8";
}

/* ==========================================================================
   EVENT-DAY LEAN MODE
   From 11:30 PM the night before the event until Time End, the
   Pre-Production Note puts the Tech Note and the bottom graphic away and
   gives the width to the crew and supplemental columns. The column track
   widths themselves are worked out in js/04-settings.js (layoutSpecFor);
   this file only handles what disappears and how column three re-flows.
   ========================================================================== */
/* Both halves of column three go: the Tech Note stack AND the cover
   column beside it. On a service day the crew want the two columns they
   are working from, at full width, and nothing else competing for the
   page. */
body.event-day-lean #card-tn,
body.event-day-lean #card-imb,
body.event-day-lean #col3-notes,
body.event-day-lean #card-imp,
body.event-day-lean .col4-wrap,
body.event-day-lean #col3-inner,
body.event-day-lean .col3-inner {
  display: none !important;
}

/* The whole of column three, wrapper included -- the title block and the
   cover picture with it -- so no empty track is left standing where it
   used to be. */
body.event-day-lean .col3 {
  display: none !important;
}

/* The explanation line. Hidden unless lean mode is on, and never printed. */
.event-day-lean-notice {
  display: none;
  background: rgba(201, 168, 76, .10);
  border: 1px solid rgba(201, 168, 76, .35);
  border-radius: 6px;
  padding: 8px 11px;
  margin-bottom: 14px;
  font-size: 10px;
  line-height: 1.5;
  color: var(--brand);
}
.event-day-lean-notice strong { color: var(--brand); }
#event-day-lean-detail { color: var(--muted); }
body.event-day-lean .event-day-lean-notice { display: block; }

@media print {
  .event-day-lean-notice { display: none !important; }
  body.event-day-lean #card-tn,
  body.event-day-lean #card-imb,
  body.event-day-lean #col3-notes,
  body.event-day-lean #card-imp,
body.event-day-lean .col4-wrap,
  body.event-day-lean #col3-inner,
  body.event-day-lean .col3 { display: none !important; }
  body.event-day-lean #col3-inner,
  body.event-day-lean .col3-inner {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }
}

/* Two-row layouts (2-Column Split, 2-Column Executive): column three sits on
   a row of its own, so there is no neighbouring column to hand width to. The
   cover is held to the share of that row it always had -- 1 of the old 1.3:1
   split -- rather than stretching the full page width. */
body.event-day-lean.lean-col3-fullrow #col3-inner,
body.event-day-lean.lean-col3-fullrow .col3-inner {
  justify-items: center;
}
body.event-day-lean.lean-col3-fullrow #card-imp {
  max-width: 43.5%;
  width: 100%;
}

/* ==========================================================================
   THE EVENT-DAY ALERT
   Same family as the opening welcome alert -- gold rule, dark card, brand
   type -- but built around the countdown wheel rather than a title block.
   ========================================================================== */
.eventday-card {
  background: linear-gradient(145deg, #0d1527, #070c18);
  border: 2px solid var(--brand, #c9a84c);
  box-shadow: 0 0 55px rgba(201,168,76,.32), 0 20px 60px rgba(0,0,0,.85);
  border-radius: 16px;
  padding: 32px 34px 28px;
  max-width: 680px;
  width: 100%;
  text-align: center;
  margin: auto;
}

.eventday-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 10px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase;
  color: var(--brand, #c9a84c);
  background: rgba(201,168,76,.10);
  border: 1px solid rgba(201,168,76,.45);
  border-radius: 999px; padding: 6px 15px; margin-bottom: 20px;
}
.eventday-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--red, #ef4444);
  box-shadow: 0 0 0 0 rgba(239,68,68,.75);
  animation: eventday-pulse 2s infinite;
}
@keyframes eventday-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(239,68,68,.7); }
  70%  { box-shadow: 0 0 0 9px rgba(239,68,68,0); }
  100% { box-shadow: 0 0 0 0   rgba(239,68,68,0); }
}

.eventday-headline {
  margin: 0 0 14px;
  font-size: 15pt; font-weight: 500; color: #cbd5e1; line-height: 1.4;
  font-family: 'Montserrat', 'Segoe UI', Roboto, sans-serif;
}
.eventday-date { color: #fff; font-weight: 800; }

.eventday-speaker { margin-bottom: 4px; }
.eventday-name {
  font-size: 25pt; font-weight: 800; line-height: 1.1;
  color: var(--brand, #c9a84c);
  font-family: 'Montserrat', 'Segoe UI', Roboto, sans-serif;
}
.eventday-meta {
  font-size: 11pt; color: var(--cyan, #00b4d8); margin-top: 6px; font-weight: 600;
}
.eventday-title {
  font-size: 10.5pt; color: #94a3b8; margin-top: 6px; font-style: italic;
}
.eventday-willspeak {
  font-size: 11pt; color: #cbd5e1; margin: 12px 0 20px;
}
.eventday-willspeak strong { color: #fff; }

/* ---- the wheel --------------------------------------------------------- */
.eventday-countdown {
  display: flex; align-items: center; justify-content: center; gap: 22px;
  background: rgba(0,0,0,.34);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 12px;
  padding: 18px 22px;
  margin-bottom: 20px;
}
.eventday-ring-wrap { position: relative; width: 104px; height: 104px; flex-shrink: 0; }
.eventday-ring-centre {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center; gap: 1px;
  font-family: monospace; font-weight: 800; line-height: 1;
}
.eventday-ring-centre span { line-height: 1; }
.eventday-clockblock { text-align: left; min-width: 0; }
.eventday-pill {
  display: inline-block; font-size: 9px; font-weight: 800; letter-spacing: .16em;
  text-transform: uppercase; border: 1px solid; border-radius: 4px;
  padding: 3px 9px; margin-bottom: 8px;
}
.eventday-clock {
  font-family: monospace; font-size: 21pt; font-weight: 700;
  letter-spacing: .5px; line-height: 1.1;
}
.eventday-lead { font-size: 9.5pt; color: #94a3b8; margin-top: 5px; }

/* ---- the two explanatory blocks ---------------------------------------- */
.eventday-note, .eventday-lock {
  display: flex; align-items: flex-start; gap: 12px; text-align: left;
  border-radius: 9px; padding: 13px 15px; margin-bottom: 11px;
  font-size: 10.5pt; line-height: 1.55;
}
.eventday-note {
  background: rgba(201,168,76,.09);
  border: 1px solid rgba(201,168,76,.32);
  color: #e2e8f0;
}
.eventday-lock {
  background: rgba(0,180,216,.08);
  border: 1px solid rgba(0,180,216,.30);
  color: #e2e8f0;
}
.eventday-note strong { color: var(--brand, #c9a84c); }
.eventday-lock strong { color: var(--cyan, #00b4d8); }
.eventday-note-icon { font-size: 17px; line-height: 1.3; flex-shrink: 0; }

.eventday-actions {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 20px;
}
.eventday-btn {
  font-size: 10.5pt; font-weight: bold; padding: 13px 24px; border-radius: 6px;
  cursor: pointer; text-transform: uppercase; letter-spacing: .5px; min-width: 210px;
}

@media (max-width: 620px) {
  .eventday-card { padding: 24px 18px 22px; }
  .eventday-name { font-size: 19pt; }
  .eventday-countdown { flex-direction: column; gap: 14px; }
  .eventday-clockblock { text-align: center; }
  .eventday-clock { font-size: 17pt; }
  .eventday-btn { min-width: 100%; }
}

@media print { #eventday-alert-modal { display: none !important; } }


/* ==========================================================================
   MODE BADGES ARE STATUS, NOT SWITCHES
   The workspace mode is changed in exactly one place -- Options ▸ Read Only
   System-Wide. Every badge that reports the mode is inert, so a stray click
   in the middle of a service can never flip the workspace.
   ========================================================================== */
.mode-badge,
#landing-mode-badge,
#workspace-mode-badge,
#cal-mode-badge,
.footer-mode-badge {
  cursor: default !important;
  pointer-events: none !important;
  user-select: none;
}
.mode-badge:hover { filter: none !important; }

/* The footer copyright symbol is a symbol again, not a hidden switch. */
.secret-ro-toggle-link,
body.read-only-system .secret-ro-toggle-link {
  cursor: default !important;
  pointer-events: none !important;
  text-decoration: none !important;
}

/* ==========================================================================
   THE WELCOME ALERT'S SCREEN-SIZE HINT
   Breathes in and out rather than sitting still, so it is noticed without
   competing with the two buttons underneath it. Nothing about it moves the
   layout: only the opacity changes.
   ========================================================================== */
.welcome-screen-hint {
  display: flex; align-items: flex-start; gap: 11px; text-align: left;
  background: rgba(0,180,216,.08);
  border: 1px solid rgba(0,180,216,.30);
  border-radius: 8px;
  padding: 12px 14px;
  margin: 0 auto 22px;
  max-width: 470px;
  font-size: 10.5pt;
  line-height: 1.55;
  color: #e2e8f0;
  animation: welcome-hint-breathe 4.2s ease-in-out infinite;
}
.welcome-screen-hint strong { color: var(--cyan, #00b4d8); }
.welcome-screen-hint .wsh-icon { font-size: 17px; line-height: 1.3; flex-shrink: 0; }

@keyframes welcome-hint-breathe {
  0%   { opacity: .42; }
  50%  { opacity: 1; }
  100% { opacity: .42; }
}

/* Someone who has asked for less motion gets the message, held steady. */
@media (prefers-reduced-motion: reduce) {
  .welcome-screen-hint { animation: none; opacity: 1; }
}

/* On a narrow screen the hint is the most relevant thing in the dialog, so
   it stops fading and simply stays up. */
@media (max-width: 900px) {
  .welcome-screen-hint { animation: none; opacity: 1; }
}


/* ==========================================================================
   A LOCKED APPEARANCE                                             v3.25.0
   An appearance locks itself 30 days after it finishes. The note stays
   fully readable, printable and exportable -- this only takes away the
   invitation to edit it. The real bolt is lockGuard() in
   js/08c-lifecycle.js; this is the coat of paint that stops somebody
   reaching for a button that is going to refuse them.

   Note what is NOT here: the speaker's profile, portrait and assets, and
   any appearance still to come. Only this one dated occurrence is locked.
   ========================================================================== */
body.engagement-locked .module-card::after { display: none !important; }
body.engagement-locked .module-card { cursor: default !important; }
body.engagement-locked .module-card:hover {
  border-color: transparent !important;
  box-shadow: none !important;
}
body.engagement-locked .section-bar-light button[onclick*="oP("],
body.engagement-locked .card-header button[onclick*="oP("] {
  display: none !important;
}


/* ==========================================================================
   v3.31.0 — ROLES

   The Workspace Lock still does the heavy lifting; these rules only cover
   the one thing it cannot express, which is "may edit the speaker record but
   not the call sheet". A Manager is UNLOCKED -- so every read-only rule
   above is off -- and body.note-read-only takes the note's edit controls
   away on its own.

   Every one of these has a matching check in JavaScript. CSS that hides a
   button is a suggestion, not a rule.
   ========================================================================== */
body.note-read-only #ws-prepro button[onclick*="oP("],
body.note-read-only .col3-head-ctl button[onclick*="oP("],
body.note-read-only .tn-bar-ctl button[onclick*="oP("],
body.note-read-only #ws-prepro .section-bar-light button,
body.note-read-only #ws-prepro .section-bar-blue button,
body.note-read-only #ws-prepro button[onclick*="addArrayRow"],
body.note-read-only #ws-prepro button[onclick*="addAppearanceRow"],
body.note-read-only #ws-prepro button[onclick*="addSermonDetailsRow"],
body.note-read-only #ws-prepro .module-card::after {
  display: none !important;
}
/* The cards stop inviting a click they will not honour. */
body.note-read-only #ws-prepro .module-card { cursor: default !important; }
body.note-read-only #ws-prepro .module-card:hover {
  border-color: transparent !important;
  box-shadow: none !important;
}
/* Hide and Show stay: folding a column away is looking, not editing. */
body.note-read-only #btn-col3-hide,
body.note-read-only #btn-tn-hide,
body.note-read-only #btn-col4-hide,
body.note-read-only .col3-restore button { display: inline-flex !important; }

/* A viewer never sees the accounts button -- there is nothing behind it for
   them, and an administrator reaches it with Ctrl/Cmd+U regardless. */
body.role-viewer #opt-user-accounts .opt-row-sub::after {
  content: ' — sign in first';
  opacity: .8;
}

/* ---- Who is signed in, in the title bar -------------------------------- */
.xp-who {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-left: 14px;
  padding: 3px 10px;
  border-radius: 4px;
  border: 1px solid var(--c-border);
  background: rgba(255, 255, 255, .03);
  cursor: pointer;
  line-height: 1.2;
  white-space: nowrap;
}
.xp-who:hover { border-color: var(--cyan); }
.xp-who-name { font-size: 10px; font-weight: 700; color: var(--white); }
.xp-who-role {
  font-size: 8px;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--muted);
}
.xp-who.role-admin   .xp-who-role { color: var(--brand); }
.xp-who.role-manager .xp-who-role { color: var(--cyan); }
@media (max-width: 900px) { .xp-who { display: none; } }
@media print { .xp-who { display: none !important; } }


/* ==========================================================================
   THE TWO EXCEPTIONS TO A READ-ONLY NOTE

   body.note-read-only hides every edit control on the Pre-Production Note.
   That is right for the note itself, and wrong for two things inside it:

     THE CREW TABLES   a Custodian keeps the roster
     EQUIPMENT         the same hands keep the gear list

   Both were already allowed in JavaScript. Neither had a button, because
   this stylesheet hid them with everything else — a permission somebody
   holds and cannot reach is not a permission. The body classes are set by
   xpApplyRole() in js/35-usermgmt.js.

   Written as `body.note-read-only.can-edit-crew …` rather than with :not(),
   so the specificity beats the blanket rule above it without !important
   arms races, and so adding a third exception later is one more block.
   ========================================================================== */
body.note-read-only.can-edit-crew #ws-prepro button[onclick*="oP('dir')"],
body.note-read-only.can-edit-crew #ws-prepro button[onclick*="oP('gfx')"],
body.note-read-only.can-edit-crew #ws-prepro button[onclick*="oP('cam')"],
body.note-read-only.can-edit-crew #ws-prepro button[onclick*="oP('con')"],
body.note-read-only.can-edit-crew #ws-prepro button[onclick*="oP('aud')"],
body.note-read-only.can-edit-crew #ws-prepro button[onclick*="oP('vid')"],
body.note-read-only.can-edit-gear #ws-prepro button[onclick*="oP('eq')"] {
  display: inline-flex !important;
}

/* The cards themselves invite a click again — but only those cards. */
body.note-read-only.can-edit-crew #card-dir,
body.note-read-only.can-edit-crew #card-gfx,
body.note-read-only.can-edit-crew #card-cam,
body.note-read-only.can-edit-crew #card-con,
body.note-read-only.can-edit-crew #card-aud,
body.note-read-only.can-edit-crew #card-vid,
body.note-read-only.can-edit-gear #card-eq {
  cursor: pointer !important;
}
body.note-read-only.can-edit-crew #card-dir:hover,
body.note-read-only.can-edit-crew #card-gfx:hover,
body.note-read-only.can-edit-crew #card-cam:hover,
body.note-read-only.can-edit-crew #card-con:hover,
body.note-read-only.can-edit-crew #card-aud:hover,
body.note-read-only.can-edit-crew #card-vid:hover,
body.note-read-only.can-edit-gear #card-eq:hover {
  border-color: var(--cyan) !important;
}
/* And the "(Click to add)" hint comes back on an empty one. */
body.note-read-only.can-edit-crew #card-dir.module-card::after,
body.note-read-only.can-edit-crew #card-gfx.module-card::after,
body.note-read-only.can-edit-crew #card-cam.module-card::after,
body.note-read-only.can-edit-crew #card-con.module-card::after,
body.note-read-only.can-edit-crew #card-aud.module-card::after,
body.note-read-only.can-edit-crew #card-vid.module-card::after,
body.note-read-only.can-edit-gear #card-eq.module-card::after {
  display: block !important;
}

/* ==========================================================================
   THE ACCOUNTS ROW IS FOR THE PEOPLE WHO CAN USE IT

   Shown only to an administrator, or to a Custodian who may turn a lock off.
   Everybody else was being offered a door that opened onto a refusal, which
   is worse than no door: it reads as "there is something here for you", and
   there is not.

   This is presentation only. openUserManagement() asks the same question
   again for anybody who reaches it another way, because a hidden row is not
   a closed door.
   ========================================================================== */
body:not(.may-touch-accounts) .xp-admin-only { display: none !important; }
/* Stricter than the line above. `may-touch-accounts` is set for an administrator
   OR a custodian, because a custodian may unlock an account. Cloud Sync was asked
   to be an administrator's alone, with nobody else told it is there -- so it wears
   this class instead. See js/77-rolescope.js. */
html body:not(.xp-admins-strictly) .xp-admins-strictly-only,
html body:not(.xp-admins-strictly) #opt-cloud-sync { display: none !important; }

/* WHY THE `html` AND THE ID ABOVE, WHICH LOOK LIKE SHOUTING.

   A few lines up, `body.read-only-system #opt-cloud-sync { display:flex !important }`
   deliberately keeps Cloud Sync reachable while the workspace is locked -- a locked
   workspace should not be a locked filing cabinet. That rule carries an id, so it
   outranks a plain two-class selector even though both are !important, and the row
   stayed visible to everybody. Matching its id and adding `html` puts this one above
   it.

   The older rule's intent survives: an administrator carries `xp-admins-strictly`, so
   they still reach Cloud Sync in Read-Only exactly as before. It is everybody else who
   no longer sees the row. */
