/*
 * Hírbeküldő — honlapi megjelenés. A színek és betűk az iskolai téma CSS
 * változóit veszik át (ha léteznek), egyébként az alábbi alapértékeket.
 */
.tfgy-hb-wrap,
.tfgy-hb-gyujto{
  --tfgy-navy: var(--color-navy, #1B3A6B);
  --tfgy-navy-deep: var(--color-navy-deep, #122A50);
  --tfgy-gold: var(--color-gold, #C9A227);
  --tfgy-paper: var(--color-paper, #F7F6F2);
  --tfgy-ink: var(--color-ink, #14213D);
  --tfgy-ink-soft: var(--color-ink-soft, #4A5568);
  --tfgy-line: var(--color-line, #DCD8CC);
  --tfgy-radius: var(--radius-s, 4px);
  --tfgy-font: var(--font-body, "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
  max-width: 680px;
  margin: 0 auto;
  font-family: var(--tfgy-font);
  color: var(--tfgy-ink);
}
.tfgy-hb-wrap *,
.tfgy-hb-gyujto *{ box-sizing: border-box; }
.tfgy-hb-form,
.tfgy-hb-form *{ font-family: var(--tfgy-font) !important; }

.tfgy-hb-form{
  background: #fff;
  border-top: 3px solid var(--tfgy-gold);
  border-radius: var(--tfgy-radius);
  box-shadow: 0 12px 28px rgba(20,33,61,0.1);
  padding: 1.75rem;
}
.tfgy-hb-leiras{ margin: 0 0 1.4rem; color: var(--tfgy-ink-soft); line-height: 1.55; }

.tfgy-hb-form fieldset{ border: 0; padding: 0; margin: 0 0 1.6rem; min-width: 0; }
.tfgy-hb-form legend{
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--tfgy-navy);
  padding: 0 0 0.6rem;
  border-bottom: 1px solid var(--tfgy-line);
  width: 100%;
  margin-bottom: 1rem;
}
.tfgy-hb-form .description{ font-size: 0.85rem; color: var(--tfgy-ink-soft); margin: -0.4rem 0 1rem; }

.tfgy-hb-field{ margin-bottom: 1.1rem; min-width: 0; }
.tfgy-hb-field-row{ display: flex; flex-wrap: wrap; gap: 0 1rem; }
/* min-width: 0 — különben a natív dátummező egyes mobil böngészőkben
   nem enged a tartalma alá zsugorodni, és "szétesik" a sor. */
.tfgy-hb-field-row > .tfgy-hb-field{ flex: 1 1 200px; min-width: 0; }

.tfgy-hb-field label,
.tfgy-hb-field .tfgy-hb-label{
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 0.35rem;
  color: var(--tfgy-navy);
}
.tfgy-hb-field input[type="text"],
.tfgy-hb-field input[type="email"],
.tfgy-hb-field input[type="tel"],
.tfgy-hb-field input[type="number"],
.tfgy-hb-field input[type="date"],
.tfgy-hb-field input[type="file"],
.tfgy-hb-field select,
.tfgy-hb-field textarea{
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--tfgy-line);
  border-radius: var(--tfgy-radius);
  font-size: 1rem;
  line-height: 1.4;
  color: var(--tfgy-ink);
  background: #fff;
  margin: 0;
}
.tfgy-hb-field textarea{ resize: vertical; min-height: 7em; }
.tfgy-hb-field input:focus,
.tfgy-hb-field select:focus,
.tfgy-hb-field textarea:focus{
  outline: 2px solid var(--tfgy-gold);
  outline-offset: 1px;
  border-color: var(--tfgy-gold);
}
.tfgy-hb-field input::placeholder,
.tfgy-hb-field textarea::placeholder{ color: #9AA1AD; }
.tfgy-hb-sugo{ font-size: 0.82rem; color: var(--tfgy-ink-soft); margin: 0.35rem 0 0; line-height: 1.45; }
.tfgy-hb-invalid{ border-color: #C0392B !important; box-shadow: 0 0 0 1px #C0392B; }
.tfgy-hb-hidden{ display: none !important; }

/* Választógombok, jelölőnégyzetek */
.tfgy-hb-opciok{ display: flex; flex-wrap: wrap; gap: 0.45rem 0.6rem; }
.tfgy-hb-opcio{
  display: inline-flex !important;
  align-items: center;
  gap: 0.45rem;
  font-weight: 400 !important;
  color: var(--tfgy-ink) !important;
  margin: 0 !important;
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--tfgy-line);
  border-radius: var(--tfgy-radius);
  background: #fff;
  cursor: pointer;
}
.tfgy-hb-opcio:has(input:checked){ border-color: var(--tfgy-navy); background: var(--tfgy-paper); }
.tfgy-hb-opcio input{ margin: 0; accent-color: var(--tfgy-navy); }
.tfgy-hb-opciok.tfgy-hb-invalid{ box-shadow: none; }
.tfgy-hb-egyeb{ margin-top: 0.6rem; }

/* Fájlok */
.tfgy-hb-fajl-hint{ font-size: 0.82rem; color: var(--tfgy-ink-soft); margin: 0.4rem 0 0; }
.tfgy-hb-fajl-szamlalo{ font-weight: 600; color: var(--tfgy-navy); }
.tfgy-hb-fajl-lista{ display: flex; flex-direction: column; gap: 0.45rem; margin-top: 0.6rem; }
.tfgy-hb-fajl-lista:empty{ display: none; }
.tfgy-hb-fajl-elem{
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem;
  background: var(--tfgy-paper); border: 1px solid var(--tfgy-line); border-radius: var(--tfgy-radius);
  padding: 0.5rem 0.7rem;
}
.tfgy-hb-fajl-nev{ font-size: 0.88rem; overflow-wrap: anywhere; }
.tfgy-hb-fajl-torol{ flex: none; background: none; border: 0; color: #A10; font-size: 1.15rem; line-height: 1; cursor: pointer; padding: 0.1rem 0.3rem; }
.tfgy-hb-fajl-torol:hover{ color: #700; }

/* Ismételhető blokk */
.tfgy-hb-sor{
  background: var(--tfgy-paper);
  border: 1px solid var(--tfgy-line);
  border-radius: var(--tfgy-radius);
  padding: 0.8rem 1rem 0.3rem;
  margin-bottom: 1rem;
}
.tfgy-hb-sor-fejlec{ display: flex; justify-content: space-between; align-items: center; min-height: 0.4rem; margin-bottom: 0.4rem; }
.tfgy-hb-sor-cim{ font-weight: 700; font-size: 0.85rem; color: var(--tfgy-navy); text-transform: uppercase; letter-spacing: 0.03em; }
.tfgy-hb-remove-row{ background: none; border: 0; color: #A10; font-size: 0.85rem; cursor: pointer; padding: 0; }
.tfgy-hb-add-row{
  display: inline-block; background: #fff; border: 1px dashed var(--tfgy-navy); color: var(--tfgy-navy);
  border-radius: var(--tfgy-radius); padding: 0.6rem 1rem; font-weight: 600; cursor: pointer; font-size: 0.95rem;
}
.tfgy-hb-add-row:hover{ background: var(--tfgy-paper); }

/* Hozzájárulás */
.tfgy-hb-consent{ font-size: 0.88rem; color: var(--tfgy-ink-soft); }
.tfgy-hb-consent label{ display: flex; align-items: flex-start; gap: 0.55rem; font-weight: 400; cursor: pointer; color: var(--tfgy-ink-soft); }
.tfgy-hb-consent input[type="checkbox"]{ margin-top: 0.2em; flex: none; width: 1.05em; height: 1.05em; accent-color: var(--tfgy-navy); }
.tfgy-hb-consent input.tfgy-hb-invalid{ outline: 2px solid #C0392B; }

.tfgy-hb-honeypot{ position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Üzenetek */
.tfgy-hb-messages:empty{ display: none; }
.tfgy-hb-messages{ margin-bottom: 1.2rem; }
.tfgy-hb-notice{ padding: 1rem 1.2rem; border-radius: var(--tfgy-radius); font-size: 0.95rem; line-height: 1.5; }
.tfgy-hb-notice p{ margin: 0; }
.tfgy-hb-notice ul{ margin: 0.5rem 0 0 1.2rem; padding: 0; }
.tfgy-hb-notice li{ margin: 0.15rem 0; }
.tfgy-hb-notice-error{ background: #FBEAEA; border: 1px solid #E3A6A6; color: #7A1F1F; }
.tfgy-hb-notice-success{ background: #EAF5EE; border: 1px solid #A6D3B6; color: #1F5E37; }
.tfgy-hb-notice-info{ background: var(--tfgy-paper); border: 1px solid var(--tfgy-line); color: var(--tfgy-ink); }
.tfgy-hb-iktatoszam{ margin-top: 0.4rem !important; font-size: 0.85rem; opacity: 0.85; }

.tfgy-hb-submit{
  display: inline-block; width: 100%; padding: 0.9rem 1.4rem;
  background: var(--tfgy-navy); color: #fff; border: 0; border-radius: var(--tfgy-radius);
  font-size: 1.02rem; font-weight: 600; cursor: pointer; transition: background-color .15s ease;
}
.tfgy-hb-submit:hover{ background: var(--tfgy-navy-deep); }
.tfgy-hb-submit:disabled{ opacity: 0.6; cursor: not-allowed; }
.tfgy-hb-kotelezo-jelzes{ font-size: 0.78rem; color: var(--tfgy-ink-soft); margin: 0.6rem 0 0; text-align: center; }

.tfgy-hb-captcha-helyorzo{
  border: 1px dashed var(--tfgy-line); border-radius: var(--tfgy-radius); padding: 1rem;
  font-size: 0.85rem; color: var(--tfgy-ink-soft); text-align: center; max-width: 300px;
}

/* Gyűjtőoldal */
.tfgy-hb-vissza{ max-width: 680px; margin: 0 auto 1rem; }
.tfgy-hb-vissza a{ color: var(--color-navy, #1B3A6B); font-weight: 600; text-decoration: none; }
.tfgy-hb-gyujto-bevezeto{ font-size: 1.1rem; font-weight: 600; color: var(--tfgy-navy); margin: 0 0 1rem; }
.tfgy-hb-kartyak{ display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.tfgy-hb-kartya{
  display: flex; flex-direction: column; gap: 0.5rem;
  padding: 1.3rem 1.4rem; background: #fff; color: var(--tfgy-ink) !important; text-decoration: none !important;
  border: 1px solid var(--tfgy-line); border-top: 3px solid var(--tfgy-gold); border-radius: var(--tfgy-radius);
  box-shadow: 0 6px 18px rgba(20,33,61,0.07);
  transition: transform .15s ease, box-shadow .15s ease;
}
.tfgy-hb-kartya:hover,
.tfgy-hb-kartya:focus-visible{ transform: translateY(-2px); box-shadow: 0 12px 26px rgba(20,33,61,0.13); }
.tfgy-hb-kartya-cim{ font-weight: 700; font-size: 1.15rem; color: var(--tfgy-navy); }
.tfgy-hb-kartya-leiras{ font-size: 0.9rem; color: var(--tfgy-ink-soft); line-height: 1.5; flex: 1; }
.tfgy-hb-kartya-gomb{ font-weight: 600; color: var(--tfgy-navy); font-size: 0.92rem; }

/* iPhone/iPad Safari: a natív dátummező saját minimális szélessége miatt
   kilógna a keretből — appearance: none megszünteti (csak iOS-en). */
@supports (-webkit-touch-callout: none){
  .tfgy-hb-field input[type="date"]{ -webkit-appearance: none; appearance: none; display: block; min-height: 2.85em; line-height: 1.3; }
  .tfgy-hb-field input[type="date"]::-webkit-date-and-time-value{ text-align: left; margin: 0; }
}

@media (max-width: 600px){
  .tfgy-hb-form{ padding: 1.1rem; }
  .tfgy-hb-sor{ padding: 0.7rem 0.8rem 0.2rem; }
  .tfgy-hb-field-row{ flex-direction: column; gap: 0; }
  .tfgy-hb-field-row > .tfgy-hb-field{ flex: 1 1 auto; }
}

/* Admin előnézetben: keskenyebb hely, nincs árnyék-túlzás */
.tfgy-hb-elonezet-doboz .tfgy-hb-wrap{ max-width: none; }
.tfgy-hb-elonezet-doboz .tfgy-hb-form{ box-shadow: none; border: 1px solid var(--tfgy-line); border-top: 3px solid var(--tfgy-gold); }
.tfgy-hb-elonezet-doboz .tfgy-hb-form legend{
  font-weight: 700 !important; font-size: 1.05rem !important; color: var(--tfgy-navy) !important;
  border-bottom: 1px solid var(--tfgy-line) !important; padding: 0 0 0.6rem !important; margin-bottom: 1rem !important; width: 100%;
}
.tfgy-hb-sor-fejlec:has(.tfgy-hb-sor-cim:empty):has(.tfgy-hb-remove-row[style*="none"]){ display: none; }
