/* PlanMySeats monogram maker: the preview on one side, the choices on the other.
   Loaded after app.css (colours, buttons, text fields and the reading page). */

@font-face {
  font-family: "Cormorant";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/cormorant-garamond.woff2") format("woff2");
}

/* the two calligraphy hands: Latin subset, see assets/fonts/OFL.txt */
@font-face {
  font-family: "Great Vibes";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/great-vibes.woff2") format("woff2");
}

@font-face {
  font-family: "Pinyon Script";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/pinyon-script.woff2") format("woff2");
}

@font-face {
  font-family: "Caveat";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/caveat.woff2") format("woff2");
}

.doc.mono-doc { max-width: 1000px; }
.mono-doc > p, .mono-doc > ul, .mono-doc > ol, .mono-doc > h2, .mono-doc > h3 { max-width: 740px; }

.mono-tool {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 26px;
  align-items: start;
  margin: 24px 0 14px;
}
.mono-view { position: sticky; top: 14px; min-width: 0; }

/* the square the monogram is drawn in; the checks say "transparent" */
#mono {
  aspect-ratio: 1 / 1;
  border: 1.5px solid var(--edge);
  border-radius: 16px;
  box-shadow: 5px 5px 0 var(--shade);
  overflow: hidden;
  background: conic-gradient(#f0eadc 25%, #fffdf7 0 50%, #f0eadc 0 75%, #fffdf7 0) 0 0 / 26px 26px;
}
#mono.dark { background: conic-gradient(#2c3531 25%, #232b28 0 50%, #2c3531 0 75%, #232b28 0) 0 0 / 26px 26px; }
#mono svg { display: block; width: 100%; height: 100%; }

.mono-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.mono-note { margin: 10px 0 0; font-size: 13px; line-height: 1.45; color: var(--muted); }

.mono-controls { min-width: 0; }
.mono-controls fieldset { min-width: 0; margin: 0 0 17px; padding: 0; border: 0; }
.mono-controls legend, .mono-controls .lbl {
  display: block;
  margin: 0 0 7px;
  padding: 0;
  font: 700 13px/1.2 var(--sans);
  letter-spacing: .02em;
}
.mono-controls .field { margin: 0 0 17px; }
.mono-controls input[type="text"] { width: 100%; }
#mLetters { width: 7.5em; font: 700 22px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.mono-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* one choice among a few: a real radio button under a label that looks like a key */
.mono-opts { display: flex; flex-wrap: wrap; gap: 7px; }
.mono-opts label { position: relative; display: inline-flex; }
.mono-opts input[type="radio"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.mono-opts span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 38px;
  padding: 6px 12px;
  border: 1.5px solid var(--edge);
  border-radius: 10px;
  background: var(--card);
  font: 600 14px/1.1 var(--sans);
}
.mono-opts label:hover span { background: var(--accent-soft); }
.mono-opts input:checked + span { background: var(--ink); color: var(--paper); }
.mono-opts input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

.mono-opts.fonts span { min-width: 49px; padding: 2px 6px; font-size: 25px; }
.mono-opts.seps span { font-size: 18px; }
.mono-opts.seps small { font-size: 14px; }

.mono-opts.inks span {
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 50%;
  background: var(--c);
}
.mono-opts.inks label:hover span { background: var(--c); }
.mono-opts.inks input:checked + span { background: var(--c); box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--ink); }
.mono-opts.inks input[type="color"] {
  width: 38px;
  height: 38px;
  padding: 2px;
  border: 1.5px solid var(--edge);
  border-radius: 10px;
  background: var(--card);
  cursor: pointer;
}

/* phone: the preview stays in view at the top while you go through the choices,
   and the download buttons come after them */
@media (max-width: 760px) {
  .mono-tool { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .mono-view { display: contents; }
  #mono { position: sticky; top: 8px; z-index: 3; width: min(100%, 44vh); justify-self: center; }
  .mono-controls { order: 1; }
  .mono-actions { order: 2; margin-top: 0; }
  .mono-note { order: 3; margin: 0; }
}

/* printing (or "save as PDF") gives the monogram alone, as vector shapes */
@media print {
  @page { size: auto; margin: 15mm; }
  .mono-doc > *:not(.mono-tool), .mono-controls, .mono-actions, .mono-note { display: none !important; }
  .doc.mono-doc { max-width: none; margin: 0; padding: 0; }
  .mono-tool { display: block; margin: 0; }
  .mono-view { position: static; }
  #mono, #mono.dark { width: 150mm; margin: 25mm auto 0; border: 0; border-radius: 0; box-shadow: none; background: none; }
}
