/*
  My VELESSO — ortak stil tabanı ("Grafit ve Porselen"), docs/TASARIM-DILI.md §3 ve §5.
  Varsayımlar:
  - Sayfa içeriği tek sütun (.vl-page); genişlik sınırı 560px.
  - data-theme yoksa işletim sistemi koyu tercihi Grafit temasını uygular.
  - Doğrulanmadı: gerçek cihazda 375px görsel testi bu görevde yapılmadı.
*/

/* ---- Yazı tipleri (public/fonts/, kendi sunucumuz) ---- */

@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/barlow-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/barlow-latin-ext-400-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/barlow-latin-500-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/barlow-latin-ext-500-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Barlow Semi Condensed';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/barlow-semi-condensed-latin-500-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Barlow Semi Condensed';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/barlow-semi-condensed-latin-ext-500-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Barlow Semi Condensed';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/barlow-semi-condensed-latin-600-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Barlow Semi Condensed';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/barlow-semi-condensed-latin-ext-600-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---- Temalar ---- */

:root,
[data-theme="porselen"] {
  --bg: #F9F8F2;
  --surface: #F1F0E9;
  --text: #202724;
  --text-2: #697366;
  --line: #D9DCD5;
  --primary-bg: #202724;
  --primary-fg: #F9F8F2;
  --focus: #1F3FA8;
  --danger-soft: #FBEAE8;
  --danger-text: #A81D16;
  color-scheme: light;
}

[data-theme="grafit"] {
  --bg: #202724;
  --surface: #29312D;
  --text: #F9F8F2;
  --text-2: #A7AFA6;
  --line: #3A443F;
  --primary-bg: #F9F8F2;
  --primary-fg: #202724;
  --focus: #9DB2FF;
  --danger-soft: #3A2220;
  --danger-text: #FF8A7F;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #202724;
    --surface: #29312D;
    --text: #F9F8F2;
    --text-2: #A7AFA6;
    --line: #3A443F;
    --primary-bg: #F9F8F2;
    --primary-fg: #202724;
    --focus: #9DB2FF;
    --danger-soft: #3A2220;
  --danger-text: #FF8A7F;
    color-scheme: dark;
  }
}

/* ---- Ortak değişkenler ---- */

:root {
  --plate-blue: #1F3FA8;
  --danger: #C8231B;
  --radius-btn: 10px;
  --radius-plate: 4px;
  --pad: 24px;
  --font-text: 'Barlow', system-ui, sans-serif;
  --font-head: 'Barlow Semi Condensed', 'Barlow', system-ui, sans-serif;
  --fs-xs: 13px;
  --fs-s: 15px;
  --fs-m: 17px;
  --fs-l: 22px;
  --fs-xl: 30px;
}

/* ---- Taban ---- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body.vl {
  margin: 0;
  padding: var(--pad);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: var(--fs-m);
  line-height: 1.45;
  text-align: left;
  -webkit-text-size-adjust: 100%;
}

.vl-page {
  max-width: 560px;
  margin: 0 auto;
}

.vl-brand {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: .28em;
  text-transform: uppercase;
}

/* ---- İmza öğe: plaka ---- */

.vl-plate {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: 360px;
  height: 64px;
  margin: 24px 0;
  overflow: hidden;
  background: #FFFFFF;
  color: #111111;
  border: 2px solid #111111;
  border-radius: var(--radius-plate);
}

.vl-plate[data-accent] {
  border-color: var(--accent, #111111);
}

[data-theme="grafit"] .vl-plate {
  box-shadow: 0 0 0 1px #3A443F;
}

.vl-plate__band {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  flex: none;
  width: 30px;
  padding-bottom: 6px;
  background: var(--plate-blue);
  color: #FFFFFF;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 11px;
  line-height: 1;
}

.vl-plate__num {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 34px;
  letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
}

/* ---- Sahip ---- */

.vl-owner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 20px 0;
}

.vl-owner__photo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface);
  color: var(--text-2);
  font-family: var(--font-head);
  font-weight: 500;
  font-size: var(--fs-m);
}

.vl-owner__name {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: var(--fs-l);
  line-height: 1.2;
}

.vl-owner__note {
  color: var(--text-2);
  font-size: var(--fs-s);
}

/* ---- Düğmeler ---- */

.vl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 56px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--radius-btn);
  background: transparent;
  color: var(--text);
  font-family: var(--font-head);
  font-weight: 500;
  font-size: var(--fs-m);
  line-height: 1;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 150ms ease, transform 150ms ease;
}

.vl-btn:hover {
  opacity: .85;
}

.vl-btn:active {
  transform: scale(.98);
}

.vl-btn:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.vl-btn--primary {
  background: var(--primary-bg);
  color: var(--primary-fg);
}

.vl-btn--secondary {
  background: transparent;
  border: 1.5px solid var(--text);
  color: var(--text);
}

.vl-btn--danger {
  background: var(--danger);
  color: #FFFFFF;
}

.vl-btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ---- Bölüm ve başlık ---- */

.vl-section {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.vl-section--flush {
  margin-top: 20px;
  padding-top: 0;
  border-top: 0;
}

.vl-h {
  margin: 0 0 16px;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: var(--fs-l);
  line-height: 1.25;
}

/* ---- Acil bölüm ---- */

.vl-alert {
  padding: 20px;
  border-left: 4px solid var(--danger);
  border-radius: 0;
  background: var(--danger-soft);
}

.vl-alert .vl-h {
  color: var(--danger-text);
}

.vl-alert .vl-btn {
  margin-bottom: 16px;
}

.vl-kv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 16px;
  margin: 12px 0 0;
  font-size: var(--fs-s);
  line-height: 1.5;
}

.vl-kv dt,
.vl-kv dd {
  margin: 0;
}

.vl-kv__k {
  color: var(--text-2);
}

.vl-kv__v {
  color: var(--text);
  font-size: var(--fs-m);
  font-weight: 500;
}

/* ---- Hazır mesaj listesi ---- */

.vl-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.vl-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 56px;
  padding: 8px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font-family: var(--font-text);
  font-size: var(--fs-m);
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.vl-option__mark {
  flex: none;
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--text-2);
  border-radius: 50%;
  transition: background 150ms ease, border-color 150ms ease;
}

.vl-option[aria-checked="true"],
.vl-option.is-selected {
  background: var(--surface);
}

.vl-option[aria-checked="true"] .vl-option__mark,
.vl-option.is-selected .vl-option__mark {
  background: var(--text);
  border-color: var(--text);
}

.vl-option:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* ---- Alan ---- */

.vl-field {
  display: block;
  width: 100%;
  min-height: 96px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-text);
  font-size: var(--fs-m);
  line-height: 1.45;
  resize: vertical;
}

.vl-field::placeholder {
  color: var(--text-2);
}

.vl-field:focus {
  border-color: var(--focus);
  outline: none;
}

/* ---- Onay şeridi ---- */

.vl-toast {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 10;
  width: min(560px, 100%);
  padding: 16px 24px;
  background: var(--primary-bg);
  color: var(--primary-fg);
  font-size: var(--fs-s);
  line-height: 1.4;
  transform: translate(-50%, 100%);
  transition: transform 200ms ease;
}

.vl-toast.is-visible {
  transform: translate(-50%, 0);
}

/* ---- Yardımcılar ---- */

.vl-muted {
  color: var(--text-2);
}

.vl-small {
  font-size: var(--fs-s);
}

.num {
  font-variant-numeric: tabular-nums;
}

.vl-icon {
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (prefers-reduced-motion: reduce) {
  .vl-btn,
  .vl-option__mark,
  .vl-toast {
    transition: none;
  }
}
