/* ==========================================================================
   Page Options Bar — light theme matching Town of Caledon UI.
   Positioned in page.html.twig between admin toolbar and notification ticker.
   Location: themes/custom/toc/css/page-opts-bar.css
   ========================================================================== */

/* ── Outer wrapper ───────────────────────────────────────────────────────── */
.page-opts-bar-wrap {
  background: #f0f4fa;
  border-bottom: 1px solid #d0ddef;
  position: relative;
  z-index: 10;
}

.page-opts-bar-wrap .container {
  padding-top: 0;
  padding-bottom: 0;
}

/* ── Bar itself ──────────────────────────────────────────────────────────── */
.page-opts-bar-wrap .page-opts-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 8px 0;
  background: transparent;
  border: none;
  border-radius: 0;
  margin: 0;
  border-left: 4px solid var(--brand-blue, #1a5ea8);
  padding-left: 12px;
}

/* ── Label ───────────────────────────────────────────────────────────────── */
.page-opts-bar-wrap .page-opts-bar__label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--brand-blue, #1a5ea8);
  white-space: nowrap;
  margin-right: 4px;
}

.page-opts-bar-wrap .page-opts-bar__label svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  stroke: var(--brand-blue, #1a5ea8);
}

/* ── Divider ─────────────────────────────────────────────────────────────── */
.page-opts-bar-wrap .page-opts-bar__divider {
  width: 1px;
  height: 22px;
  background: #c2d0e8;
  flex-shrink: 0;
}

/* ── Toggle label ────────────────────────────────────────────────────────── */
.page-opts-bar-wrap .page-opt-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}

.page-opts-bar-wrap .page-opt-toggle__text {
  color: #2a3a52;
  font-size: .82rem;
  font-weight: 500;
}

/* ── Toggle switch ───────────────────────────────────────────────────────── */
.page-opts-bar-wrap .page-opt-toggle input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 34px;
  height: 19px;
  background: #c2cfe0;
  border-radius: 20px;
  position: relative;
  cursor: pointer;
  transition: background .2s;
  flex-shrink: 0;
}

.page-opts-bar-wrap .page-opt-toggle input[type="checkbox"]::after {
  content: '';
  position: absolute;
  width: 13px;
  height: 13px;
  background: #fff;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: left .2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}

.page-opts-bar-wrap .page-opt-toggle input[type="checkbox"]:checked {
  background: var(--brand-blue, #1a5ea8);
}

.page-opts-bar-wrap .page-opt-toggle input[type="checkbox"]:checked::after {
  left: 18px;
}

.page-opts-bar-wrap .page-opt-toggle input:disabled + .page-opt-toggle__text {
  opacity: .5;
}

/* ── State feedback ──────────────────────────────────────────────────────── */
.page-opts-bar-wrap .page-opt-saving .page-opt-toggle__text::after {
  content: ' saving…';
  font-style: italic;
  opacity: .6;
  font-size: .75rem;
}

.page-opts-bar-wrap .page-opt-saved .page-opt-toggle__text {
  color: #1a7a3c;
}

.page-opts-bar-wrap .page-opt-error .page-opt-toggle__text {
  color: #c0392b;
}
/**
 * Hide Sidebar support.
 *
 * When the "Hide Sidebar" (field_hide_right_content) toggle is on, the
 * template wraps .content-layout with this modifier class instead of
 * rendering the <aside class="sidebar"> element at all. This CSS just
 * makes .content-main take the full row once that second grid column
 * is gone — it does not attempt to hide the aside via display:none
 * (the element should not be in the DOM at all in that case; see the
 * Twig {% if %} guard, still pending confirmation of which template
 * file to edit).
 */
.content-layout.content-layout--full {
  grid-template-columns: 1fr;
}

.content-layout.content-layout--full .content-main {
  width: 100%;
  max-width: none;
}