/*
  owner.html'e özgü kurallar. Renk, yazı ve ölçüler velesso.css değişkenlerinden gelir.
  Varsayımlar:
  - 375px görsel testi bu görevde tarayıcıda yapılmadı (doğrulanmadı); taşma için
    plaka ve uzun metinlerde kırpma/overflow-wrap kullanıldı.
  - iOS bildirim yardımı yalnız iOS Safari'de ve ana ekrana eklenmemişken push.js ile açılır.
*/

[hidden] {
  display: none !important;
}

.vl-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.vl-btn--compact {
  width: auto;
  height: 48px;
  padding: 0 14px;
  font-size: var(--fs-s);
}

#ownerPlateNumber {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#ownerViewProfile {
  margin-bottom: 4px;
}

/* ---- Başlık ve sayı ---- */

.vl-h--row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.vl-h__count {
  color: var(--text-2);
  font-family: var(--font-text);
  font-size: var(--fs-s);
  font-weight: 400;
}

/* ---- Alanlar ---- */

.vl-label {
  display: block;
  margin: 18px 0 6px;
  color: var(--text-2);
  font-size: var(--fs-s);
}

.vl-field--input {
  min-height: 48px;
  height: 48px;
  padding: 0 14px;
}

textarea.vl-field {
  min-height: 88px;
  padding: 12px 14px;
}

.vl-file {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 10px 0;
  color: var(--text);
  font-family: var(--font-text);
  font-size: var(--fs-s);
}

.vl-file::file-selector-button {
  min-height: 40px;
  margin-right: 12px;
  padding: 0 14px;
  border: 1.5px solid var(--text);
  border-radius: var(--radius-btn);
  background: transparent;
  color: var(--text);
  font-family: var(--font-head);
  font-size: var(--fs-s);
  cursor: pointer;
}

.vl-photo-preview {
  display: block;
  width: 80px;
  height: 80px;
  margin-top: 10px;
  border-radius: 8px;
  object-fit: cover;
}

.vl-form__submit {
  margin-top: 20px;
}

.vl-form__inline {
  margin-top: 8px;
}

.vl-error {
  margin: 10px 0 0;
  color: var(--danger-text);
}

/* ---- Bölümlü kontrol ---- */

.vl-seg {
  display: flex;
  gap: 6px;
  margin: 12px 0 16px;
}

.vl-seg__btn {
  flex: 1;
  min-height: 48px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  background: transparent;
  color: var(--text-2);
  font-family: var(--font-text);
  font-size: var(--fs-s);
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.vl-seg__btn.is-selected {
  border-color: var(--text);
  background: var(--surface);
  color: var(--text);
}

.vl-seg__btn:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* ---- Anahtar satırı ---- */

.vl-check {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  cursor: pointer;
}

.vl-check__text {
  font-size: var(--fs-m);
  line-height: 1.35;
}

.vl-check__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.vl-check__track {
  position: relative;
  flex: none;
  width: 52px;
  height: 32px;
  border-radius: 16px;
  background: var(--line);
  transition: background 150ms ease;
}

.vl-check__track::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--text-2);
  transition: transform 150ms ease, background 150ms ease;
}

.vl-check__input:checked + .vl-check__track {
  background: var(--text);
}

.vl-check__input:checked + .vl-check__track::after {
  background: var(--bg);
  transform: translateX(20px);
}

.vl-check__input:focus-visible + .vl-check__track {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* ---- Uyarı satırları ---- */

.vl-alert-list {
  border-top: 1px solid var(--line);
}

.vl-alert-row {
  border-bottom: 1px solid var(--line);
}

.vl-alert-row__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  min-height: 56px;
  padding: 14px 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--font-text);
  text-align: left;
  cursor: pointer;
}

.vl-alert-row__head:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.vl-alert-row__title {
  font-size: var(--fs-m);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.vl-alert-row__note {
  color: var(--text-2);
  font-size: var(--fs-s);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.vl-alert-row__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  color: var(--text-2);
  font-size: var(--fs-xs);
}

.vl-alert-row__status {
  font-variant-numeric: tabular-nums;
}

.vl-alert-row__body {
  padding: 0 0 18px;
}

.vl-alert-row__body textarea {
  margin: 4px 0 12px;
}

.vl-alert-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.vl-alert-actions .vl-btn {
  flex: 1 1 140px;
}

.vl-alert-empty {
  margin: 0;
  padding: 18px 0;
}

/* ---- Açılır bölümler ---- */

.vl-details__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  margin: 0 0 4px;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: var(--fs-l);
  line-height: 1.25;
  cursor: pointer;
  list-style: none;
}

.vl-details__summary::-webkit-details-marker {
  display: none;
}

.vl-details__summary::after {
  content: '';
  flex: none;
  width: 10px;
  height: 10px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 150ms ease;
}

.vl-details[open] > .vl-details__summary::after {
  transform: rotate(225deg);
}

.vl-details__summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.vl-details__body {
  padding-bottom: 8px;
}

.vl-details__body .vl-btn + .vl-small {
  margin-top: 10px;
}

/* ---- Bilgi kutusu (QR yenileme sonucu) ---- */

.vl-note {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  font-size: var(--fs-s);
  line-height: 1.5;
}

.vl-note__id {
  margin-top: 8px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  word-break: break-all;
}

.vl-note__link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  margin-top: 4px;
  color: var(--text);
  text-decoration: underline;
}

@media (max-width: 360px) {
  .vl-btn {
    padding: 0 12px;
  }

  .vl-btn-row {
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vl-seg__btn,
  .vl-check__track,
  .vl-check__track::after,
  .vl-details__summary::after {
    transition: none;
  }
}
