/* =====================================================================
   JOY DEEP TRAVEL - Transfer Formu Temasi
   EMAY tarzi: zarif, sade, altin & krem; mobil oncelikli
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Mulish:wght@400;500;600;700&display=swap');

:root {
  --gold:        #C9A35F;
  --gold-light:  #DEC18C;
  --gold-dark:   #A8843F;
  --gold-soft:   rgba(201, 163, 95, 0.10);

  --bg:          #FBF9F6;
  --surface:     #FFFFFF;
  --surface-alt: #F6F2EC;
  --cream:       #FFFBF5;

  --ink:         #3A352F;
  --ink-soft:    #7C756B;
  --ink-faint:   #ABA398;

  --line:        #E7DECF;
  --line-soft:   #F0E9DD;

  --ok:          #4E8C5B;
  --ok-bg:       #EDF5EE;
  --err:         #C0473C;
  --err-bg:      #FBEDEB;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;

  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans:  'Mulish', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  padding: 0 0 48px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Ust altin serit */
.top-accent { height: 4px; background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light)); }

.wrap { width: 100%; max-width: 540px; margin: 0 auto; padding: 0 16px; }

/* --- Marka basligi --- */
.brand {
  text-align: center;
  padding: 28px 0 18px;
}
.brand .logo {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--ink);
  line-height: 1;
}
.brand .logo .dot { color: var(--gold); }
/* --- Form karti --- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px 22px;
  box-shadow: 0 1px 2px rgba(58,53,47,0.03);
}

.form-head {
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line-soft);
}
.form-head h1 {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.1;
}
.form-head p {
  font-size: 14px;
  color: var(--ink-soft);
  margin-top: 8px;
}
.form-head .latin-note {
  font-size: 12.5px;
  color: var(--gold-dark);
  margin-top: 6px;
  font-style: italic;
}

/* --- Dil secici --- */
.lang-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
  padding: 12px 14px;
  background: var(--surface-alt);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
}
.lang-bar .globe { font-size: 18px; line-height: 1; }
.lang-bar label { font-size: 12px; color: var(--ink-soft); font-weight: 600; white-space: nowrap; }
.lang-bar select {
  flex: 1;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23A8843F' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

/* --- Form alanlari --- */
.field { margin-bottom: 18px; }
.field > label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 7px;
  letter-spacing: 0.2px;
}
.field .req { color: var(--err); margin-left: 2px; }

.field input,
.field select,
.field textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--ink-faint); }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}

/* Iki sutun (tarih + saat) */
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-2 > * { min-width: 0; }   /* hucreler kuculebilsin -> tasma olmaz */

/* iOS Safari tarih/saat input'lari icerikten kuculemez -> appearance:none ile duzeltilir */
.field input[type="date"],
.field input[type="time"] {
  -webkit-appearance: none;
  appearance: none;
  min-width: 0;
  max-width: 100%;
}

/* --- Yolcu kategorileri (sayac) --- */
.section {
  margin: 26px 0;
  padding: 18px 16px;
  background: var(--surface-alt);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
}
.section-title {
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.2px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.counter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  margin-bottom: 10px;
}
.counter-label { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.counter-sub { font-size: 12px; color: var(--ink-faint); display: block; font-weight: 400; }
.counter-ctrl { display: flex; align-items: center; gap: 12px; }
.cbtn {
  width: 38px; height: 38px;
  border: 1px solid var(--gold);
  background: var(--surface);
  color: var(--gold-dark);
  border-radius: var(--r-sm);
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
  -webkit-tap-highlight-color: transparent;
}
.cbtn:hover { background: var(--gold); color: #fff; }
.cbtn:active { transform: scale(0.92); }
.cbtn:disabled { opacity: .35; cursor: not-allowed; }
.cbtn:disabled:hover { background: var(--surface); color: var(--gold-dark); }
.cval { min-width: 26px; text-align: center; font-size: 17px; font-weight: 700; color: var(--gold-dark); }

.total-line {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px; padding-top: 14px;
  border-top: 1px dashed var(--line);
}
.total-line .lbl { font-size: 15px; font-weight: 700; color: var(--ink); }
.total-line .val {
  font-family: var(--serif);
  font-size: 26px; font-weight: 700; color: var(--gold-dark);
}

/* --- Yolcu kartlari --- */
.pax-card {
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  margin-bottom: 12px;
}
.pax-tag {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.8px; text-transform: uppercase;
  color: var(--gold-dark);
  background: var(--gold-soft);
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
}
.pax-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pax-grid .full { grid-column: 1 / -1; }
.pax-cell { min-width: 0; }
.pax-cell.full { grid-column: 1 / -1; }
.pax-card input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  transition: border-color .18s, box-shadow .18s;
}
.pax-card input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.pax-card input::placeholder { color: var(--ink-faint); }

/* --- Notlar --- */
.notes-box { background: var(--cream); border: 1px solid #F0DEC6; }
.notes-box textarea { min-height: 86px; resize: vertical; line-height: 1.5; }
.hint {
  font-size: 12.5px; color: var(--ink-soft);
  margin-top: 8px; display: flex; gap: 6px; align-items: flex-start;
  line-height: 1.4;
}
.hint .i {
  flex-shrink: 0; width: 16px; height: 16px;
  background: var(--gold); color: #fff; border-radius: 50%;
  font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 1px;
}

/* --- Telefonlar --- */
.phone-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px;
}
.phone-row .pn {
  font-size: 11px; font-weight: 700; color: var(--ink-soft);
  min-width: 18px; text-align: center;
}
.phone-row input { flex: 1; }
.phone-remove {
  flex-shrink: 0;
  width: 38px; height: 38px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--err);
  border-radius: var(--r-sm);
  font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.phone-remove:hover { background: var(--err-bg); border-color: var(--err); }
.add-phone {
  width: 100%;
  padding: 11px;
  border: 1.5px dashed var(--gold);
  background: transparent;
  color: var(--gold-dark);
  border-radius: var(--r-sm);
  font-family: var(--sans);
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  margin-top: 4px;
}
.add-phone:hover { background: var(--gold-soft); }
.add-phone:disabled { opacity: .4; cursor: not-allowed; }

/* --- Butonlar --- */
.actions { display: flex; gap: 12px; margin-top: 28px; }
.btn {
  flex: 1;
  padding: 15px;
  border-radius: var(--r-sm);
  font-family: var(--sans);
  font-size: 16px; font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .18s;
  -webkit-tap-highlight-color: transparent;
}
.btn-primary { background: var(--gold); color: #fff; border-color: var(--gold); flex: 2; letter-spacing: 0.3px; }
.btn-primary:hover { background: var(--gold-dark); border-color: var(--gold-dark); }
.btn-primary:active { transform: scale(0.985); }
.btn-primary:disabled { opacity: .6; cursor: wait; }
.btn-ghost { background: var(--surface); color: var(--ink-soft); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-alt); }

/* --- Hata durumu --- */
.field.invalid input,
.field.invalid select,
.field.invalid textarea { border-color: var(--err); background: var(--err-bg); }
.field-err { color: var(--err); font-size: 12.5px; margin-top: 5px; display: none; }
.field.invalid .field-err { display: block; }

/* Tekil alan hatasi (tum input/select/textarea + yolcu kartlari + telefonlar) */
input.input-error,
select.input-error,
textarea.input-error {
  border-color: var(--err) !important;
  background: var(--err-bg) !important;
}
.input-error-msg {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--err);
  font-size: 12.5px;
  font-weight: 600;
  margin-top: 5px;
  line-height: 1.3;
  animation: errIn .18s ease;
}
.input-error-msg::before {
  content: "!";
  flex-shrink: 0;
  width: 15px; height: 15px;
  background: var(--err); color: #fff;
  border-radius: 50%;
  font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
@keyframes errIn { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: translateY(0); } }

/* --- Sabit uyari bandi (gonderimde eksik alan varsa) --- */
.form-toast {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translate(-50%, -130%);
  width: calc(100% - 24px);
  max-width: 520px;
  background: var(--err);
  color: #fff;
  padding: 14px 18px;
  border-radius: 0 0 14px 14px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 11px;
  box-shadow: 0 8px 26px rgba(192, 71, 60, 0.38);
  z-index: 9999;
  transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}
.form-toast.show { transform: translate(-50%, 0); }
.form-toast.info {
  background: var(--gold-dark);
  box-shadow: 0 8px 26px rgba(168, 132, 63, 0.38);
}
.form-toast.info .ft-icon { color: var(--gold-dark); }
.form-toast .ft-icon {
  flex-shrink: 0;
  width: 24px; height: 24px;
  background: #fff;
  color: var(--err);
  border-radius: 50%;
  font-size: 15px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
.form-toast[dir="rtl"] { flex-direction: row-reverse; text-align: right; }

/* --- Basari ekrani --- */
.success-screen {
  display: none;
  text-align: center;
  padding: 40px 20px;
}
.success-screen.show { display: block; }
.success-screen .check {
  width: 72px; height: 72px; margin: 0 auto 20px;
  background: var(--ok-bg);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.success-screen .check svg { width: 36px; height: 36px; }
.success-screen h2 {
  font-family: var(--serif);
  font-size: 26px; color: var(--ink); margin-bottom: 12px;
}
.success-screen p { color: var(--ink-soft); font-size: 15px; line-height: 1.6; max-width: 380px; margin: 0 auto; }

.foot {
  text-align: center; margin-top: 26px;
  font-size: 12px; color: var(--ink-faint);
}

/* --- RTL (Arapca) --- */
[dir="rtl"] .lang-bar label,
[dir="rtl"] .counter-label { text-align: right; }
[dir="rtl"] .lang-bar select {
  background-position: left 12px center;
  padding-right: 12px; padding-left: 32px;
}
[dir="rtl"] .pax-tag { letter-spacing: 0; }

/* --- Mobil ince ayar --- */
@media (max-width: 420px) {
  .card { padding: 22px 16px; border-radius: var(--r-md); }
  .form-head h1 { font-size: 26px; }
  .section-title { font-size: 13.5px; }
  .brand .logo { font-size: 26px; }
}

/* Loading durumu */
.loading-overlay {
  display: none;
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.7);
  border-radius: var(--r-lg);
  align-items: center; justify-content: center;
  z-index: 5;
}
.loading-overlay.show { display: flex; }
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--line);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.card-pos { position: relative; }
