/* ── VÁLÁSI ÉRTESÍTŐ SZERKESZTŐ ──
   A /valasi-ertesito-szerkeszto/ oldal stílusai.
   Az értesítő (m-invite) fix 520px széles A5 arányú lap - a PDF ebből
   készül html2canvas + jsPDF segítségével. */

.m-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
@media (max-width: 900px) {
  .m-layout {
    grid-template-columns: 1fr;
  }
}

.m-block {
  margin-bottom: 28px;
}
.m-block .hint {
  margin: 6px 0 10px;
}
.m-optional {
  font-weight: 400;
  color: var(--muted);
  font-size: 12px;
}
/* Az értesítő szövege mező: a .fg input stílusát követi, de nagyobb,
   és gépelés közben automatikusan nő (JS), hogy a teljes szöveg látsszon */
.fg textarea {
  width: 100%;
  border: 1px solid var(--sand);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text);
  padding: .78rem .95rem;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.6;
  min-height: 150px;
  resize: vertical;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.fg textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(185, 151, 91, .16);
}

.m-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 520px) {
  .m-row-2 {
    grid-template-columns: 1fr;
  }
}

/* ── STÍLUS ÉS BETŰTÍPUS VÁLASZTÓK ── */
.m-style-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 10px;
}
@media (max-width: 520px) {
  .m-style-grid {
    grid-template-columns: 1fr;
  }
}
.m-style-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 8px;
  border: 1.5px solid #D6D0C4;
  border-radius: var(--radius);
  background: var(--white);
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.m-style-btn:hover {
  border-color: var(--gold);
}
.m-style-btn.sel {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(185, 151, 91, .25);
}
.m-style-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.m-style-thumb {
  width: 100%;
  height: 56px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Playfair Display", serif;
  font-size: 22px;
}
.m-thumb-klasszikus {
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--navy);
  box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 4px var(--navy);
}
.m-thumb-elegans {
  background: var(--navy);
  color: var(--gold);
}
.m-thumb-termeszetes {
  background: #F6F1E7;
  color: var(--sage);
  border: 1px solid var(--sage);
}

.m-font-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 4px;
}
@media (max-width: 520px) {
  .m-font-grid {
    grid-template-columns: 1fr;
  }
}
.m-font-btn {
  padding: 10px 12px;
  border: 1.5px solid #D6D0C4;
  border-radius: var(--radius);
  background: var(--white);
  font-size: 16px;
  color: var(--text);
  cursor: pointer;
  text-align: center;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.m-font-btn:hover {
  border-color: var(--gold);
}
.m-font-btn.sel {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(185, 151, 91, .25);
}
.m-font-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.m-actions {
  margin-top: 8px;
}
.m-actions .hint {
  margin-top: 8px;
  text-align: center;
}
#mPdfBtn:disabled {
  opacity: .6;
  cursor: wait;
}

/* ── ELŐNÉZET ── */
.m-preview-col {
  min-width: 0;
}
.m-preview-sticky {
  position: sticky;
  top: 20px;
}
.m-preview-label {
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
  text-align: center;
}
.m-preview-frame {
  display: flex;
  justify-content: center;
  max-width: 100%;
  overflow: hidden;
}

/* A lap: fix 520px széles, A5 arány (148:210). Kis képernyőn arányosan
   kicsinyítjük transformmal - a PDF-hez mindig a teljes méretet fotózzuk. */
.m-invite {
  width: 520px;
  height: 738px;
  flex: 0 0 auto;
  box-shadow: var(--shadow);
  transform-origin: top center;
}
.m-inv-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 52px 48px;
  gap: 14px;
}
.m-inv-ornament svg {
  width: 120px;
  height: 24px;
  display: block;
}
.m-inv-eyebrow {
  font-family: "DM Sans", sans-serif;
  font-size: 11px;
  letter-spacing: .3em;
  text-transform: uppercase;
}
.m-inv-quote {
  font-style: italic;
  font-size: 15px;
  line-height: 1.55;
  max-width: 380px;
}
.m-inv-quote:empty {
  display: none;
}
.m-inv-name {
  font-size: 40px;
  line-height: 1.15;
  overflow-wrap: break-word;
  max-width: 100%;
}
.m-inv-years {
  font-family: "DM Sans", sans-serif;
  font-size: 15px;
  letter-spacing: .16em;
}
.m-inv-divider {
  width: 64px;
  height: 1px;
  margin: 4px 0;
}
.m-inv-text {
  font-size: 14.5px;
  line-height: 1.65;
  max-width: 400px;
  white-space: pre-wrap;
}
.m-inv-meta {
  margin-top: 4px;
}
.m-inv-meta-row {
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
}
.m-inv-meta-row:empty {
  display: none;
}
.m-inv-closing {
  margin-top: 6px;
  font-size: 20px;
}
.m-inv-closing:empty {
  display: none;
}

/* ── 1. STÍLUS: KLASSZIKUS FEHÉR ── */
.style-klasszikus {
  background: #FFFFFF;
  color: #1F2933;
  font-family: "Lora", serif;
}
.style-klasszikus .m-inv-inner {
  box-shadow: inset 0 0 0 10px #FFFFFF, inset 0 0 0 11px var(--navy), inset 0 0 0 16px #FFFFFF, inset 0 0 0 17.5px var(--navy);
}
.style-klasszikus .m-inv-eyebrow { color: var(--muted); }
.style-klasszikus .m-inv-name { color: var(--navy); }
.style-klasszikus .m-inv-ornament { color: var(--navy); }
.style-klasszikus .m-inv-divider { background: var(--navy); }
.style-klasszikus .m-inv-years { color: var(--muted); }

/* ── 2. STÍLUS: ELEGÁNS ÉJKÉK ── */
.style-elegans {
  background: var(--navy);
  color: #EDE6D6;
  font-family: "Lora", serif;
}
.style-elegans .m-inv-inner {
  box-shadow: inset 0 0 0 12px var(--navy), inset 0 0 0 13px var(--gold);
}
.style-elegans .m-inv-eyebrow { color: var(--gold); }
.style-elegans .m-inv-name { color: #FFFFFF; }
.style-elegans .m-inv-ornament { color: var(--gold); }
.style-elegans .m-inv-divider { background: var(--gold); }
.style-elegans .m-inv-years { color: var(--sand); }
.style-elegans .m-inv-meta-row { color: var(--sand); }

/* ── 3. STÍLUS: TERMÉSZETES KRÉM ── */
.style-termeszetes {
  background: #F6F1E7;
  color: #3D4438;
  font-family: "EB Garamond", serif;
}
.style-termeszetes .m-inv-inner {
  box-shadow: inset 0 0 0 1.5px var(--sage);
  position: relative;
}
.style-termeszetes .m-inv-eyebrow { color: var(--sage); }
.style-termeszetes .m-inv-name { color: #2F3A2F; }
.style-termeszetes .m-inv-ornament { color: var(--sage); }
.style-termeszetes .m-inv-divider { background: var(--sage); }
.style-termeszetes .m-inv-years { color: var(--sage); }

/* A kiválasztott betűtípust a JS ezekre az elemekre teszi */
.m-invite .m-inv-name,
.m-invite .m-inv-quote,
.m-invite .m-inv-closing {
  font-family: var(--m-font, inherit);
}
