/*
 * drawer.css - turns the site's trial order form dialog into a right-edge
 * drawer, on /control-room only.
 * ---------------------------------------------------------------------------
 * The dialog (#mos-start-dialog) is created by /start/popup.js and filled by
 * /start/order-form.js; neither file is touched. Every rule here is scoped to
 * body.control-room, so no other page changes. Loaded after popup.css and
 * order-form.css.
 *
 * Reference panel: fixed to the right edge, inset 0 0 0 auto, full height,
 * width min(620px, 100vw), no radius, white, inner scroll with
 * overscroll-behavior contain, page behind dimmed + blurred 4px, 35px round
 * dark close control. The reference docks it at >= 769px only; below that the
 * site's own full-screen sheet (popup.css) stays as it is.
 */

/* ---- backdrop: dim + 4px blur, fades in ---- */
body.control-room dialog#mos-start-dialog::backdrop {
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  animation: cr-drawer-fade 0.2s ease-out both;
}

/* ---- close control: 35px round, near-black, white cross ---- */
body.control-room dialog#mos-start-dialog .mof-close {
  top: 14px;
  right: 14px;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: #031a01;
  color: #fff;
  font-size: 22px;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  transition: transform 0.15s ease, background 0.15s ease;
}
body.control-room dialog#mos-start-dialog .mof-close:hover { background: #0b2a08; }
body.control-room dialog#mos-start-dialog .mof-close:active { transform: scale(0.94); }
body.control-room dialog#mos-start-dialog .mof-close:focus-visible { outline: 2px solid rgb(90, 63, 208); outline-offset: 2px; }

/* ---- top band: white, dark headline (reference: 44px Inter 900, 32.98px on phones) ---- */
body.control-room dialog#mos-start-dialog .mof-hero {
  padding: 35px 31px 12px;
  background: #fff;
  color: rgb(35, 31, 53);
}
body.control-room dialog#mos-start-dialog .mof-hero h2 {
  font-family: "Inter", sans-serif;
  font-weight: 900;
  font-size: 32.98px;
  line-height: 110%;
  letter-spacing: -1.28px;
  color: rgb(35, 31, 53);
}
body.control-room dialog#mos-start-dialog .mof-brand-txt { color: rgb(35, 31, 53); }
/* Bundle image sits under the headline (92% wide, 10px above) instead of overlapping a dark band. */
body.control-room dialog#mos-start-dialog .mof-bundle { margin-top: 10px; }
body.control-room dialog#mos-start-dialog .mof-bundle img { width: 92%; }

@media (min-width: 769px) {
  body.control-room dialog#mos-start-dialog {
    position: fixed;
    inset: 0 0 0 auto;
    margin: 0;
    width: min(620px, 100vw);
    max-width: none;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
    overflow: hidden;
    background: #fff;
    box-shadow: -24px 0 60px -20px rgba(0, 0, 0, 0.55);
  }
  body.control-room dialog#mos-start-dialog[open] {
    animation: cr-drawer-in 0.32s cubic-bezier(0.32, 0.72, 0, 1) both;
  }
  body.control-room dialog#mos-start-dialog .msd-inner {
    height: 100%;
    max-height: 100%;
    margin: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  body.control-room dialog#mos-start-dialog .mof-hero h2 { font-size: 44px; }
}

@keyframes cr-drawer-in {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
@keyframes cr-drawer-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  body.control-room dialog#mos-start-dialog[open],
  body.control-room dialog#mos-start-dialog::backdrop { animation: none; }
}

/* ---- this page's panel headline + intro line (copy file: drawer headline / sub-line).
   The form script writes its own headline text; it is swapped here in CSS so the
   shared /start scripts stay untouched. Not applied when the 90-day plan is picked. ---- */
body.control-room dialog#mos-start-dialog:not(:has(.mof-plan-input[value="trial90"]:checked)) .mof-hero h2 { font-size: 0; line-height: 0; letter-spacing: 0; }
body.control-room dialog#mos-start-dialog:not(:has(.mof-plan-input[value="trial90"]:checked)) .mof-hero h2::after {
  content: "Open Your 14-Day Free Trial...";
  display: block;
  font-size: 32.98px;
  line-height: 110%;
  letter-spacing: -1.28px;
}
body.control-room dialog#mos-start-dialog .mof-bundle::after {
  content: "Enter your details below to issue your pass:";
  display: block;
  margin: 14px 4% 0;
  text-align: left;
  font: 400 18px/140% "Fira Sans", sans-serif;
  color: rgb(35, 31, 53);
}
@media (min-width: 769px) {
  body.control-room dialog#mos-start-dialog:not(:has(.mof-plan-input[value="trial90"]:checked)) .mof-hero h2::after { font-size: 44px; }
}

/* The order form is laid out for border-box sizing (the homepage sets it globally; this page only sets it inside .cr-page). */
body.control-room dialog#mos-start-dialog,
body.control-room dialog#mos-start-dialog *,
body.control-room dialog#mos-start-dialog *::before,
body.control-room dialog#mos-start-dialog *::after { box-sizing: border-box; }

/* Blueprint Pass: only the 14-day plan is offered on this page. The 90-day plan option is hidden here, not removed; it is kept for a future upsell page. */
body.control-room dialog#mos-start-dialog .mof-plan-option[data-mof-plan="trial90"] { display: none; }
body.control-room dialog#mos-start-dialog .mof-plans { grid-template-columns: 1fr; }
