/* Design 1:1 wie appointments.gvs.at (Farben und Maße von dort übernommen). */
:root {
  --bg: #fdfdfd; --fg: #161616; --card: #fff; --muted: #636363; --border: #e6e6e6; --input: #e4e4e4;
  --accent: #f2f2f2; --brand: #2a384f; --brand-fg: #fbfbfb; --gold: #e1af4a; --danger: #c62828;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); font-family: Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2 { letter-spacing: -0.02em; font-weight: 600; margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }
body { min-height: 100vh; display: flex; flex-direction: column; }

/* Kopfzeile wie im Terminportal */
.site-header { border-bottom: 1px solid rgba(230,230,230,.6); background: var(--bg); }
.container { width: 100%; max-width: 900px; margin: 0 auto; padding: 0 16px; }
.header-row { max-width: 1400px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; }
.logo img { height: 32px; width: auto; display: block; transition: opacity .15s; }
.logo:hover img { opacity: .8; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--muted); font-size: 12px; font-weight: 500; cursor: pointer; transition: color .15s, border-color .15s; }
.pill:hover { color: var(--fg); border-color: rgba(22,22,22,.4); }
.chev { width: 14px; height: 14px; }

/* Inhalt */
.main { flex: 1; padding-top: 32px; padding-bottom: 32px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 40px; }
.card-head { margin-bottom: 28px; }
.card-head h1 { font-size: 24px; }
.intro { margin: 6px 0 0; color: var(--muted); font-size: 15px; line-height: 1.5; }

.field { margin: 0 0 24px; border: 0; padding: 0; min-width: 0; }
.label { display: block; margin: 0 0 10px; padding: 0; font-size: 14px; font-weight: 500; letter-spacing: .025em; text-transform: uppercase; color: var(--muted); }
.label.req::after { content: " *"; }
.grid-3 { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 0 16px; }
.input { width: 100%; height: 48px; padding: 8px 12px; border: 1px solid var(--input); border-radius: 8px; background: var(--bg); font-size: 16px; font-weight: 500; box-shadow: 0 1px 2px rgba(0,0,0,.05); outline: none; transition: border-color .15s, box-shadow .15s; }
.input::placeholder { color: var(--muted); font-weight: 400; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(42,56,79,.15); }
.input:disabled { opacity: .6; }
.input.invalid { border-color: var(--danger); }
select.input { appearance: none; padding-right: 36px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23636363' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
textarea.input { height: auto; min-height: 84px; padding: 12px; font-weight: 400; line-height: 1.5; resize: vertical; }
.hint { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.hint-warn { color: #a15c00; }
.err { margin: 6px 0 0; font-size: 13px; color: var(--danger); }
.err:empty { display: none; }
.err-box { padding: 10px 12px; border-radius: 8px; background: #fdecec; margin: 0 0 16px; }

/* Interessen als Auswahlkarten wie „Anliegen“ im Terminportal */
.options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.opt-item { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg); cursor: pointer; font-size: 15px; font-weight: 500; line-height: 1.3; transition: background .15s, border-color .15s; }
.opt-item:hover { background: rgba(42,56,79,.05); }
.opt-item input { position: absolute; opacity: 0; pointer-events: none; }
.box { width: 20px; height: 20px; border: 2px solid rgba(99,99,99,.7); border-radius: 6px; display: grid; place-items: center; flex: none; background: var(--bg); transition: all .15s; }
.box svg { width: 12px; height: 12px; stroke: #fff; stroke-width: 3; opacity: 0; }
.opt-item:has(input:checked) { border-color: var(--brand); background: rgba(42,56,79,.05); }
.opt-item:has(input:checked) .box { background: var(--brand); border-color: var(--brand); }
.opt-item:has(input:checked) .box svg { opacity: 1; }
.opt-item:has(input:focus-visible) { box-shadow: 0 0 0 2px rgba(42,56,79,.25); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.test-note { margin: 0 0 20px; padding: 10px 14px; border-left: 3px solid var(--gold); background: #fcf6e9; border-radius: 8px; font-size: 13px; color: #5b4a17; line-height: 1.5; }

.submit-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.captcha { min-height: 78px; }
.btn { height: 48px; padding: 0 32px; border: 0; border-radius: 8px; background: var(--brand); color: var(--brand-fg); font-size: 16px; font-weight: 600; cursor: pointer; transition: opacity .15s; }
.btn:hover { opacity: .9; }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-ghost { background: var(--bg); color: var(--fg); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--accent); opacity: 1; }

.done { text-align: center; padding: 56px 40px; }
.done h2 { font-size: 22px; margin-top: 16px; }
.done p { color: var(--muted); line-height: 1.6; max-width: 520px; margin: 10px auto 0; }
.done .test-note { text-align: left; margin: 20px auto 0; max-width: 520px; }
.done .btn { margin-top: 24px; }
.check { width: 56px; height: 56px; margin: 0 auto; border-radius: 50%; background: rgba(42,56,79,.08); color: var(--brand); display: grid; place-items: center; }
.check svg { width: 28px; height: 28px; stroke-width: 2.5; }

/* Fußzeile wie im Terminportal */
.site-footer { border-top: 1px solid rgba(230,230,230,.6); }
.footer-row { max-width: 1400px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 20px 16px; font-size: 12px; color: var(--muted); }
.footer-row p { margin: 0; }
.footer-row nav { display: flex; gap: 16px; }
.footer-row a { color: inherit; text-decoration: none; }
.footer-row a:hover { color: var(--fg); }

/* Länderauswahl */
.overlay { position: fixed; inset: 0; background: rgba(20,20,20,.35); display: flex; align-items: flex-start; justify-content: flex-end; padding: 64px 16px 16px; z-index: 50; }
.dialog { width: 100%; max-width: 380px; max-height: calc(100vh - 80px); overflow: auto; background: var(--card); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 16px 40px rgba(0,0,0,.14); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 20px 16px; border-bottom: 1px solid var(--border); }
.dialog-head h2 { font-size: 16px; }
.x { border: 0; background: none; padding: 4px; cursor: pointer; color: var(--muted); border-radius: 6px; }
.x:hover { color: var(--fg); background: var(--accent); }
.x svg { width: 18px; height: 18px; }
.country-list { list-style: none; margin: 0; padding: 8px 10px 12px; }
.country-list button { width: 100%; display: flex; align-items: center; gap: 14px; padding: 10px 12px; border: 0; background: none; border-radius: 10px; cursor: pointer; font-size: 15px; font-weight: 500; text-align: left; }
.country-list button:hover { background: var(--accent); }
.country-list button[aria-selected="true"] { background: rgba(42,56,79,.07); color: var(--brand); font-weight: 600; }
.country-list .tick { margin-left: auto; opacity: 0; }
.country-list button[aria-selected="true"] .tick { opacity: 1; }

.flag { width: 28px; height: 19px; border-radius: 3px; overflow: hidden; flex: none; display: inline-block; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.flag svg { width: 100%; height: 100%; display: block; stroke: none; }
.pill .flag { width: 20px; height: 14px; border-radius: 2px; }

@media (max-width: 760px) {
  .main { padding-top: 20px; }
  .card { padding: 24px; }
  .grid-3 { grid-template-columns: 1fr; }
  .options { grid-template-columns: 1fr 1fr; }
  .submit-row { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
  #countryBtnName { display: none; }
  .overlay { justify-content: center; }
}
@media (max-width: 460px) {
  .options { grid-template-columns: 1fr; }
  .captcha { transform: scale(.9); transform-origin: 0 0; }
}

/* Aufbau wie goldvorsorge.at/rueckruf, Optik wie appointments.gvs.at.
   Die Grundgröße wächst mit der Fensterhöhe, damit alles ohne Scrollen auf eine Seite passt. */
html { font-size: clamp(12px, min(1.85vh, 1.2vw), 18px); }
.container { max-width: 1200px; }
.main { padding-top: 1rem; padding-bottom: 1rem; display: flex; flex-direction: column; justify-content: center; }
.card { padding: 1.5rem 2.25rem 1.6rem; }
.card-title { text-align: center; font-size: 1.9rem; padding-bottom: .9rem; margin-bottom: 1.3rem; border-bottom: 1px solid var(--border); }

.cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 2.75rem; align-items: start; }
.rows { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .8rem 1.25rem; align-items: center; }
.rows .label { margin: 0; text-align: right; font-size: .9rem; }
.rows .label-top { align-self: start; padding-top: .9rem; }
.ctl { min-width: 0; }
.input { height: 3rem; font-size: 1rem; padding: .5rem .8rem; }
select.input { padding-right: 2.2rem; }
textarea.input { height: 6.2rem; min-height: 0; padding: .7rem .8rem; resize: none; }
.hint, .err { font-size: .8rem; margin-top: .25rem; }
.captcha { min-height: 78px; }

.interests { margin: 0; padding: 0; border: 0; min-width: 0; }
.interests > .label { font-size: .9rem; margin-bottom: .65rem; }
.options { display: grid; grid-template-columns: 1fr; gap: .38rem; }
.opt-item { padding: 0 .9rem; min-height: 2.35rem; font-size: .95rem; gap: .75rem; border-radius: .7rem; line-height: 1.2; }
.box { width: 1.15rem; height: 1.15rem; border-radius: .35rem; }

.test-note { margin: 1.1rem 0 0; padding: .5rem .8rem; font-size: .8rem; }
.err-box { margin: .8rem 0 0; }
.submit-row { justify-content: center; margin-top: 1.2rem; }
.btn { height: 3.2rem; font-size: 1.05rem; }
.submit-row .btn { width: 100%; max-width: 34rem; }
.footer-row { padding: .8rem 16px; }

@media (max-width: 860px) {
  html { font-size: 15px; }
  .cols { grid-template-columns: 1fr; gap: 1.5rem; }
}
@media (max-width: 560px) {
  .card { padding: 1.25rem; }
  .rows { grid-template-columns: 1fr; gap: .35rem; }
  .rows .label { text-align: left; margin-top: .5rem; }
  .rows .label-top { padding-top: 0; }
  .captcha { transform: scale(.9); transform-origin: 0 0; }
}
.hint:empty { display: none; }
.label { text-transform: none; letter-spacing: 0; }
.input { font-size: .9rem; } .opt-item { font-size: .85rem; }
/* Kommentarfeld füllt die Höhe, damit reCAPTCHA und letzte Interesse unten bündig enden. */
.cols { align-items: stretch; }
.rows { grid-template-rows: auto auto auto 1fr auto; }
.ctl:has(textarea) { align-self: stretch; display: flex; }
.ctl textarea.input { height: auto; min-height: 6.2rem; flex: 1; }
@media (max-width: 860px) { .rows { grid-template-rows: none; } }
.card-title { border-bottom: 0; padding-bottom: 0; }
.done-actions { display: flex; justify-content: center; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem; }
.done-actions .btn { margin-top: 0; display: inline-flex; align-items: center; text-decoration: none; }

/* Länderauswahl als Dropdown wie die Sprachauswahl auf appointments.gvs.at */
.header-actions { position: relative; }
#countryBtn { gap: 6px; padding: 0 10px; font-weight: 500; color: var(--fg); }
#countryBtn svg { width: 15px; height: 15px; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; min-width: 220px; padding: 4px; background: var(--card); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.1); }
.menu-head { margin: 0; padding: 8px 10px 6px; font-size: 12px; color: var(--muted); }
.menu .country-list { padding: 0; }
.menu .country-list button { gap: 10px; padding: 7px 10px; border-radius: 6px; font-size: 14px; font-weight: 400; color: var(--fg); }
.menu .country-list button[aria-selected="true"] { background: none; color: var(--fg); font-weight: 700; }
.menu .country-list button:hover, .menu .country-list button:focus-visible { background: var(--accent); outline: none; }
.menu .code { width: 26px; font-size: 11px; color: var(--muted); font-weight: 400; letter-spacing: .02em; }
.menu .flag { width: 20px; height: 14px; border-radius: 2px; }
.menu { min-width: 250px; }
