/*
  My VELESSO — form bileşenleri (kart aktivasyonu ve hesap ekranları).
  docs/TASARIM-DILI.md §3; velesso.css'ten sonra yüklenir, değişkenleri oradan alır.

  Varsayımlar:
  - velesso.css'teki .vl-field metin alanı (textarea) için 96px yükseklik verir;
    burada input/select 48px'e, textarea 96px'e sabitlenir.
  - Onay satırı: metin solda, kutu/anahtar sağda; satır en az 48px dokunma alanı.
  - Bağlantılar (Gizlilik/Koşullar) küçük görünür ama 48px dokunma alanına sahiptir.
  - Doğrulanmadı: 375px gerçek cihaz görsel testi bu görevde yapılmadı.
*/

[hidden] {
  display: none !important;
}

/* ---- Üst satır ---- */

.vl-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

/* Logo ile hemen altındaki başlık arasında 28px (yalnız arada öğe yoksa). */
.vl-head + .vl-h {
  margin-top: 28px;
}

/* ---- Plaka önizlemesi ---- */

.vl-plate--preview {
  margin: 16px 0 24px;
}

.vl-plate--preview .vl-plate__num {
  min-width: 0;
  font-size: clamp(24px, 8vw, 34px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- Adım başlığı ---- */

.vl-h.vl-step {
  margin: 0 0 16px;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 20px;
  line-height: 1.3;
}

.vl-step__n {
  margin-right: 8px;
  color: var(--text-2);
}

/* ---- Alan ---- */

.vl-form-row {
  display: grid;
  gap: 8px;
}

.vl-form-row + .vl-form-row {
  margin-top: 18px;
}

.vl-label {
  display: block;
  color: var(--text-2);
  font-size: var(--fs-s);
  line-height: 1.3;
}

input.vl-field,
select.vl-field {
  height: 48px;
  min-height: 48px;
  padding: 0 14px;
}

select.vl-field {
  padding-right: 36px;
}

textarea.vl-field {
  min-height: 96px;
  padding: 14px;
}

input[type="file"].vl-field {
  height: auto;
  min-height: 48px;
  padding: 10px 12px;
  font-size: var(--fs-s);
}

/* Görünmez dosya girişi; etiket düğmesi onu tetikler, klavye odağı etikette gösterilir. */
.vl-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.vl-file-input:focus-visible + .vl-btn {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.vl-field:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.vl-help {
  margin: 0;
  color: var(--text-2);
  font-size: var(--fs-xs);
  line-height: 1.45;
}

.vl-help.is-error {
  color: var(--danger-text);
}

.vl-error {
  margin: 0;
  color: var(--danger-text);
  font-size: var(--fs-s);
  line-height: 1.45;
}

.vl-error:not(:empty) {
  margin-top: 16px;
}

.vl-feedback {
  overflow-wrap: anywhere;
}

.vl-feedback:empty {
  display: none;
}

/* ---- Onay satırı ---- */

.vl-check {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding: 10px 0;
  font-size: var(--fs-m);
  line-height: 1.4;
  cursor: pointer;
}

.vl-check + .vl-check {
  border-top: 1px solid var(--line);
}

.vl-check--note {
  align-items: flex-start;
  color: var(--text-2);
  font-size: var(--fs-s);
}

.vl-check input[type="checkbox"] {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
  border-radius: 4px;
  accent-color: var(--text);
  cursor: pointer;
}

.vl-check--note input[type="checkbox"] {
  margin-top: 1px;
}

.vl-check input[type="checkbox"]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* ---- İsteğe bağlı bölümler ---- */

.vl-details {
  margin-top: 20px;
  border-top: 1px solid var(--line);
}

.vl-details summary {
  min-height: 48px;
  padding: 12px 0;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: var(--fs-m);
  line-height: 1.4;
  cursor: pointer;
}

.vl-details summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.vl-details__body {
  display: grid;
  gap: 8px;
  padding: 4px 0 12px;
}

.vl-details__body .vl-form-row + .vl-form-row {
  margin-top: 10px;
}

/* ---- Fotoğraf ---- */

.vl-avatar {
  width: 80px;
  height: 80px;
  border: 1px solid var(--line);
  border-radius: 10px;
  object-fit: cover;
}

/* ---- Düğme ve eylem alanı ---- */

.vl-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.vl-btn--inline {
  width: auto;
  height: 48px;
  padding: 0 18px;
  justify-self: start;
}

/* ---- Bölümlü kontrol ---- */

.vl-segment {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  width: 100%;
}

.vl-segment__item {
  position: relative;
  display: flex;
  min-width: 0;
  cursor: pointer;
}

.vl-segment__item input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.vl-segment__item span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  padding: 0 6px;
  border: 1.5px solid var(--text);
  border-radius: var(--radius-btn);
  font-family: var(--font-head);
  font-weight: 500;
  font-size: var(--fs-s);
  line-height: 1.1;
  text-align: center;
}

.vl-segment__item input:checked + span {
  border-color: var(--primary-bg);
  background: var(--primary-bg);
  color: var(--primary-fg);
}

.vl-segment__item input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.vl-form-actions {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.vl-continue {
  margin-top: 12px;
}

/* ---- Turnstile ---- */

.vl-turnstile:empty {
  display: none;
}

.vl-turnstile:not(:empty) {
  margin-top: 16px;
}

/* ---- Başarı ekranı ---- */

.vl-success {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.vl-success .vl-h {
  margin-bottom: 10px;
  font-size: var(--fs-xl);
}

.vl-recovery {
  margin: 16px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-size: var(--fs-s);
  letter-spacing: .04em;
  white-space: nowrap;
  overflow-x: auto;
}

.vl-success .vl-btn-row {
  margin-top: 16px;
}

/* ---- Kart listesi ve alt bağlantılar ---- */

.vl-card-list {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.vl-footer {
  display: flex;
  gap: 20px;
  margin-top: 36px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: var(--fs-xs);
}

.vl-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: var(--text-2);
  text-underline-offset: 2px;
}

.vl-footer a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
