/* Workflo contact form — közös stílus
   Illeszkedik a weboldal CSS custom property rendszeréhez:
   --light, --mid, --mid-light, --dark, --dark2, --white
   --radius, --radius-sm, --radius-lg, --shadow-md, --shadow-lg, --t
   Ha ezek nem érhetők el (önálló oldal), fallback értékek vannak.
*/

/* ── Fallback custom props ha az oldal nem definiálja ── */
.wf-form-wrap {
  --mid: #7AA5A8;
  --dark: #1C3D3A;
  --dark2: #142E2B;
  --light: #E8F0EF;
  --white: #F5FAF9;
  --mid-light: #B8D4D6;
  --radius: 16px;
  --shadow-lg: 0 20px 60px rgba(20,46,43,0.12);
  --t: cubic-bezier(.2,.7,.2,1);
}

/* ── Wrapper ── */
.wf-form-wrap {
  background: var(--white, #F5FAF9);
  border-radius: var(--radius-lg, 24px);
  padding: 44px;
  box-shadow: var(--shadow-lg, 0 20px 60px rgba(20,46,43,0.12));
  border: 1px solid rgba(122,165,168,.18);
  /* Grid/flex itemként a min-width:auto miatt a belső vízszintesen scrollozó
     nap-csík min-content szélessége kitágítaná a konténert (mobilon túlcsordul).
     A min-width:0 engedi a gridben zsugorodni a viewportra. */
  min-width: 0;
}

/* ── Form ── */
.wf-form {
  max-width: 100%;
}

.wf-form-header {
  margin-bottom: 28px;
}

.wf-form-header h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.3rem, 2.5vw, 1.6rem);
  letter-spacing: -.02em;
  margin: 0 0 8px;
  color: var(--dark, #1C3D3A);
  line-height: 1.15;
}

.wf-form-header p {
  color: rgba(28,61,58,.7);
  margin: 0;
  font-size: .95rem;
  line-height: 1.6;
}

/* ── Sections ── */
.wf-form-section {
  margin-bottom: 22px;
}

.wf-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* ── Fields ── */
.wf-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.wf-field label,
.wf-section-label {
  font-size: .84rem;
  font-weight: 500;
  color: rgba(28,61,58,.78);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.wf-hint {
  font-size: .75rem;
  font-weight: 400;
  color: rgba(28,61,58,.5);
}

.wf-field input,
.wf-field select,
.wf-field textarea {
  background: var(--light, #E8F0EF);
  border: 1.5px solid rgba(122,165,168,.28);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: .95rem;
  color: var(--dark, #1C3D3A);
  transition: border-color .2s var(--t, ease), background .2s var(--t, ease);
  outline: none;
  width: 100%;
  box-sizing: border-box;
}

.wf-field input::placeholder,
.wf-field textarea::placeholder {
  color: rgba(28,61,58,.38);
}

.wf-field input:focus,
.wf-field select:focus,
.wf-field textarea:focus {
  border-color: var(--mid, #7AA5A8);
  background: var(--white, #F5FAF9);
}

.wf-field textarea {
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
}

/* ── Section label ── */
.wf-section-label {
  font-size: .84rem;
  font-weight: 500;
  color: rgba(28,61,58,.78);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Checkboxok ── */
.wf-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.wf-checkbox-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border: 1.5px solid rgba(122,165,168,.22);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .2s var(--t, ease), background .2s var(--t, ease),
              transform .15s var(--t, ease);
  user-select: none;
  background: var(--white, #F5FAF9);
}

.wf-checkbox-item input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.wf-checkbox-item:hover {
  border-color: var(--mid, #7AA5A8);
  background: rgba(122,165,168,.05);
}

.wf-checkbox-item.wf-checked {
  border-color: var(--mid, #7AA5A8);
  background: rgba(122,165,168,.08);
}

.wf-checkbox-item:active {
  transform: scale(.99);
}

.wf-checkbox-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.wf-checkbox-label {
  font-size: .9rem;
  font-weight: 600;
  color: var(--dark, #1C3D3A);
  line-height: 1.3;
}

.wf-checkbox-label a {
  color: var(--mid, #7AA5A8);
  text-decoration: underline;
}

.wf-checkbox-desc {
  font-size: .78rem;
  color: rgba(28,61,58,.6);
  line-height: 1.4;
}

.wf-checkbox-check {
  width: 22px;
  height: 22px;
  border: 1.5px solid rgba(122,165,168,.4);
  border-radius: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s var(--t, ease);
  color: transparent;
  background: transparent;
}

.wf-checked .wf-checkbox-check {
  background: var(--mid, #7AA5A8);
  border-color: var(--mid, #7AA5A8);
  color: var(--white, #F5FAF9);
}

/* GDPR checkbox */
.wf-gdpr {
  margin-top: 2px;
  align-items: flex-start;
}

.wf-gdpr .wf-checkbox-check {
  margin-top: 1px;
  flex-shrink: 0;
}

/* ── Foglalás (cal.com inline) ── */
.wf-booking-section {
  border: 1.5px solid rgba(122,165,168,.28);
  border-radius: 12px;
  padding: 18px;
  background: rgba(122,165,168,.06);
}

.wf-booking-intro {
  margin-bottom: 14px;
}

.wf-booking-title {
  display: block;
  font-size: .92rem;
  font-weight: 600;
  color: var(--dark, #1C3D3A);
  margin-bottom: 6px;
}

.wf-booking-intro p {
  margin: 0;
  font-size: .82rem;
  line-height: 1.55;
  color: rgba(28,61,58,.68);
}

.wf-cal-inline {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border-radius: 8px;
}

/* ── Saját magyar idopont-választó (cal.com proxy) ── */
.wf-cal-loading,
.wf-cal-empty {
  padding: 28px 12px;
  text-align: center;
  font-size: .86rem;
  color: rgba(28,61,58,.66);
}

.wf-cal-error {
  padding: 14px 16px;
  border-radius: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: .85rem;
}

/* Nap-navigáció: prev/next nyíl + egy lapnyi nap-kártya. A kártyák flex:1 1 0
   alapon OSZTOZNAK a sávon (sosem szélesebbek a konténernél -> nem tágítják ki
   az űrlap-sávot, sem desktopon, sem mobilon); a többi naphoz prev/next lapoz. */
.wf-cal-nav {
  display: flex;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.wf-cal-arrow {
  flex: 0 0 auto;
  width: 32px;
  border-radius: 10px;
  border: 1.5px solid rgba(122,165,168,.30);
  background: var(--white, #F5FAF9);
  color: var(--dark, #1C3D3A);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transition: all .18s var(--t, ease);
  font-family: inherit;
}

.wf-cal-arrow:hover:not(:disabled) { border-color: var(--mid, #7AA5A8); }
.wf-cal-arrow:disabled { opacity: .3; cursor: default; }

.wf-cal-days {
  display: flex;
  flex: 1 1 auto;
  gap: 8px;
  min-width: 0;
  padding: 4px 0 10px;
}

.wf-cal-day {
  flex: 1 1 0;
  min-width: 0;
  padding: 8px 6px;
  border-radius: 10px;
  border: 1.5px solid rgba(122,165,168,.30);
  background: var(--white, #F5FAF9);
  color: var(--dark, #1C3D3A);
  cursor: pointer;
  text-align: center;
  transition: all .18s var(--t, ease);
  font-family: inherit;
}

.wf-cal-day:hover { border-color: var(--mid, #7AA5A8); }

.wf-cal-day.wf-day-active {
  background: var(--dark, #1C3D3A);
  border-color: var(--dark, #1C3D3A);
  color: var(--mid-light, #B8D4D6);
}

.wf-cal-day .wf-day-dow {
  display: block;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  opacity: .7;
}

.wf-cal-day .wf-day-num {
  display: block;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.2;
}

.wf-cal-day .wf-day-mon {
  display: block;
  font-size: .66rem;
  opacity: .7;
}

.wf-cal-times {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 8px;
  min-width: 0;
  margin-top: 14px;
}

.wf-cal-time {
  padding: 9px 6px;
  border-radius: 8px;
  border: 1.5px solid rgba(122,165,168,.30);
  background: var(--white, #F5FAF9);
  color: var(--dark, #1C3D3A);
  font-size: .86rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .18s var(--t, ease);
  font-family: inherit;
}

.wf-cal-time:hover { border-color: var(--mid, #7AA5A8); }

.wf-cal-time.wf-time-active {
  background: var(--mid, #7AA5A8);
  border-color: var(--mid, #7AA5A8);
  color: #fff;
}

.wf-cal-selected {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(122,165,168,.12);
  border: 1px solid rgba(122,165,168,.28);
  font-size: .85rem;
  color: var(--dark, #1C3D3A);
}

.wf-cal-selected strong { font-weight: 600; }

/* ── Hibaszöveg ── */
.wf-field-error {
  color: #c53030;
  font-size: .8rem;
  margin-top: 6px;
}

/* ── Submit gomb ── */
.wf-form-submit {
  margin-top: 6px;
}

.wf-form-submit button {
  width: 100%;
  padding: 14px 20px;
  background: var(--dark, #1C3D3A);
  color: var(--white, #F5FAF9);
  border: none;
  border-radius: 999px;
  font-size: .98rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background .2s var(--t, ease), transform .15s var(--t, ease),
              box-shadow .2s var(--t, ease);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.wf-form-submit button::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.1) 50%, transparent 70%);
  transform: translateX(-110%);
  transition: transform .5s ease;
  pointer-events: none;
}

.wf-form-submit button:hover::before {
  transform: translateX(110%);
}

.wf-form-submit button:hover {
  background: var(--dark2, #142E2B);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(20,46,43,.15);
}

.wf-form-submit button:disabled {
  opacity: .65;
  cursor: not-allowed;
  transform: none;
}

/* ── Spinner animáció ── */
@keyframes wf-spin {
  to { transform: rotate(360deg); }
}

.wf-spin {
  animation: wf-spin .8s linear infinite;
}

#wf-btn-loading {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ── Eredmény üzenetek ── */
.wf-result {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 10px;
  margin-top: 16px;
  font-size: .9rem;
  line-height: 1.6;
}

.wf-success {
  background: rgba(122,165,168,.12);
  border: 1px solid rgba(122,165,168,.35);
  color: var(--dark, #1C3D3A);
}

.wf-success svg {
  flex-shrink: 0;
  color: var(--mid, #7AA5A8);
  margin-top: 2px;
}

.wf-error-box {
  background: rgba(197,48,48,.06);
  border: 1px solid rgba(197,48,48,.25);
  color: #742a2a;
}

/* ── Reszponzivitás ── */
@media (max-width: 640px) {
  .wf-form-wrap {
    padding: 28px 20px;
    border-radius: var(--radius, 16px);
  }

  .wf-form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .wf-form-wrap {
    padding: 24px 16px;
  }

  .wf-form-header h3 {
    font-size: 1.3rem;
  }

  .wf-checkbox-item {
    padding: 10px 12px;
  }

  .wf-field input,
  .wf-field textarea {
    font-size: 16px; /* iOS zoom prevent */
  }

  /* ── Foglalás-naptár mobilon: kompakt, tap-méretű, lapozható ── */
  .wf-booking-section { padding: 14px; }

  .wf-cal-nav { gap: 5px; }
  .wf-cal-arrow { width: 28px; font-size: 1.1rem; }
  .wf-cal-days { gap: 5px; padding: 2px 0 10px; }
  .wf-cal-day { padding: 7px 3px; }
  .wf-cal-day .wf-day-dow { font-size: .6rem; }
  .wf-cal-day .wf-day-num { font-size: 1rem; }
  .wf-cal-day .wf-day-mon { font-size: .58rem; }

  /* Fix 3 oszlop telefonon (360-414px): mindig kiegyenlített, nem csordul túl */
  .wf-cal-times {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .wf-cal-time {
    min-height: 44px;     /* kényelmes tap-célpont (iOS/Android ajánlás) */
    padding: 10px 4px;
  }

  .wf-cal-selected { font-size: .82rem; }
}
