/* ============================================================
   Oikosa — İlan Verme Sihirbazı Stilleri (v2)
   Design-system token'larıyla tam uyumlu.
   ============================================================ */

/* ---- Sayfa Kapsayıcı ---- */
.ilan-ver-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 16px 80px;
}

/* ---- Wizard Kartı ---- */
.wizard-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   Stepper — design-system/stepper.html kalıbına uygun
   ============================================================ */
.wizard-steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 28px 40px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  gap: 0;
}

/* Her adım noktası */
.step-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 64px;
  position: relative;
}

/* Adım numarası dairesi */
.step-num {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 600;
  background: var(--surface-2);
  color: var(--ink-3);
  border: 2px solid var(--line);
  transition: all .3s cubic-bezier(.4,0,.2,1);
  position: relative;
  z-index: 1;
}

/* Aktif adım */
.step-indicator.active .step-num {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(15,79,74,.12);
}

/* Tamamlanmış adım */
.step-indicator.completed .step-num {
  background: var(--mint);
  color: var(--teal);
  border-color: var(--mint-2);
}

/* Adım etiketi */
.step-lbl {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-3);
  margin-top: 8px;
  letter-spacing: .01em;
  text-align: center;
  transition: color .2s;
}

.step-indicator.active .step-lbl {
  color: var(--ink);
  font-weight: 600;
}

.step-indicator.completed .step-lbl {
  color: var(--teal);
  font-weight: 600;
}

/* Adımlar arası çizgi */
.step-line {
  flex: 1;
  height: 2px;
  background: var(--line);
  margin: 19px 8px 0;
  border-radius: 1px;
  transition: background .3s;
  min-width: 40px;
}

.step-line.done {
  background: var(--teal);
}

/* ============================================================
   Panel İçerikleri
   ============================================================ */
.wizard-content {
  padding: 44px 48px;
  min-height: 360px;
}

.wizard-panel {
  display: none;
  opacity: 0;
  transform: translateY(10px);
}

.wizard-panel.active {
  display: block;
  animation: wzFadeIn .35s cubic-bezier(.16,1,.3,1) forwards;
}

@keyframes wzFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Panel başlığı */
.wizard-panel h2 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -.02em;
  margin-bottom: 6px;
  line-height: 1.15;
}

.panel-desc {
  font-size: 15px;
  color: var(--ink-2);
  margin-bottom: 36px;
  line-height: 1.5;
}

/* ============================================================
   Seçim Kutuları (Select Boxes)
   ============================================================ */
.box-grid {
  display: grid;
  gap: 16px;
}

.box-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.box-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }

.select-box {
  position: relative;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: all .25s cubic-bezier(.16,1,.3,1);
  color: inherit;
  font-family: inherit;
  overflow: hidden;
}

/* Dekoratif arka plan gradyanı (hover & active) */
.select-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(15,111,86,.06), transparent 70%);
  opacity: 0;
  transition: opacity .3s;
}

.select-box:hover {
  border-color: var(--teal-2);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.select-box:hover::before {
  opacity: 1;
}

.select-box.active {
  border-color: var(--teal);
  background: var(--mint);
  box-shadow: 0 0 0 3px rgba(15,79,74,.10), var(--shadow-sm);
}

.select-box.active::before {
  opacity: 1;
  background: radial-gradient(ellipse at 50% 0%, rgba(15,111,86,.10), transparent 70%);
}

/* Kutu ikonu */
.box-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  transition: all .25s;
}

.box-icon i {
  font-size: 26px;
  color: var(--teal);
  transition: all .25s;
}

.select-box:hover .box-icon {
  background: var(--mint);
}

.select-box.active .box-icon {
  background: var(--teal);
}

.select-box.active .box-icon i {
  color: #fff;
}

/* Kutu başlığı */
.box-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
  transition: color .2s;
}

.select-box.active .box-title {
  color: var(--teal);
}

/* Kutu açıklaması */
.box-desc {
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.5;
}

/* Aktif kutuda tik işareti */
.select-box.active::after {
  content: "\ea5e"; /* ti-check */
  font-family: 'tabler-icons';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: 14px;
  display: grid;
  place-items: center;
}

/* ============================================================
   Detay Formu — Bölümler
   ============================================================ */
.form-section {
  border-bottom: 1px solid var(--line);
  padding-bottom: 32px;
  margin-bottom: 32px;
}

.form-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.form-section h3 {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.form-section h3 i {
  font-size: 22px;
  color: var(--teal);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--mint);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

/* Alan grid'i */
.field-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 24px;
}

.field-grid .field.full {
  grid-column: span 2;
}

/* Form alanları — design-system uyumlu */
.wizard-panel .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wizard-panel .field label {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ink-3);
  padding-left: 2px;
}

.wizard-panel .field select,
.wizard-panel .field input {
  font-family: var(--sans);
  font-size: 14.5px;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  outline: none;
  transition: all .18s;
  width: 100%;
  appearance: none;
}

.wizard-panel .field select:focus,
.wizard-panel .field input:focus {
  border-color: var(--teal);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(15,79,74,.08);
}

.wizard-panel .field input::placeholder {
  color: var(--ink-3);
}

/* Sayı inputlarındaki yukarı/aşağı ok (spinner) butonlarını kaldır */
.wizard-panel .field input[type="number"]::-webkit-outer-spin-button,
.wizard-panel .field input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.wizard-panel .field input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Disabled select (henüz il/ilçe seçilmemiş) */
.wizard-panel .field select:disabled {
  opacity: .55;
  cursor: not-allowed;
}

/* ============================================================
   Lokasyon haritası
   ============================================================ */
.loc-map-wrap {
  margin-top: 20px;
}

#ilan-map {
  width: 100%;
  height: 320px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--surface-2);
  z-index: 0;
}

.loc-map-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.4;
}

.loc-map-hint i {
  color: var(--teal);
  font-size: 16px;
  flex-shrink: 0;
}

/* Harita pini (divIcon) */
.ilan-pin {
  display: grid;
  place-items: center;
  color: var(--teal);
}
.ilan-pin i {
  font-size: 38px;
  color: var(--teal);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.35));
}

/* Yükleniyor ikonu dönüşü */
.loc-map-hint .spin {
  animation: ilanSpin 0.9s linear infinite;
}
@keyframes ilanSpin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   Segmented Controls
   ============================================================ */
.selector-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.seg-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.seg-field.full {
  grid-column: span 2;
}

.seg-label {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ink-3);
  padding-left: 2px;
}

.seg-control {
  display: flex;
  background: var(--surface-2);
  padding: 4px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  gap: 4px;
}

.seg-control button {
  flex: 1;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  border-radius: 8px;
  transition: all .18s;
  text-align: center;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

.seg-control button:hover {
  color: var(--ink);
}

.seg-control button.active {
  /* zemin + gölge artık kayan pill'de (bkz. style.css .seg-control::before) */
  color: var(--teal);
  font-weight: 600;
}

.seg-control.cols-4 button {
  flex: 0 0 calc(25% - 3px);
}

.seg-control.wrap {
  flex-wrap: wrap;
}

.seg-control.wrap button {
  flex: 1 0 calc(33.333% - 4px);
  padding: 10px 8px;
}

/* ============================================================
   Başarı Paneli
   ============================================================ */
.success-panel {
  text-align: center;
  padding: 60px 24px;
}

.success-icon {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--mint), var(--mint-2));
  color: var(--teal);
  display: grid;
  place-items: center;
  margin: 0 auto 28px;
  box-shadow: 0 8px 32px rgba(15,111,86,.15);
}

.success-icon i {
  font-size: 44px;
}

.success-panel h2 {
  font-family: var(--serif) !important;
  font-size: 30px !important;
  margin-bottom: 12px;
}

.success-panel p {
  font-size: 16px;
  color: var(--ink-2);
  max-width: 460px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.success-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
}

/* ============================================================
   Alt Navigasyon (Footer Bar)
   ============================================================ */
.wizard-footer {
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  padding: 20px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wizard-footer button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
}

.wizard-footer button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

/* Adım bilgisi (footer ortası) */
.wizard-step-info {
  font-size: 13px;
  color: var(--ink-3);
  font-weight: 500;
}

/* ============================================================
   Dark Mode
   ============================================================ */
[data-theme="dark"] .wizard-card {
  background: var(--surface);
  border-color: var(--line);
}

[data-theme="dark"] .wizard-steps {
  background: var(--surface);
  border-bottom-color: var(--line);
}

[data-theme="dark"] .step-num {
  background: var(--surface-2);
  border-color: var(--line);
}

[data-theme="dark"] .step-indicator.active .step-num {
  box-shadow: 0 0 0 4px rgba(31,155,120,.15);
}

[data-theme="dark"] .select-box {
  background: var(--surface);
  border-color: var(--line);
}

[data-theme="dark"] .select-box:hover {
  border-color: var(--teal-2);
}

[data-theme="dark"] .select-box.active {
  background: var(--mint);
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(31,155,120,.12), var(--shadow-sm);
}

[data-theme="dark"] .box-icon {
  background: var(--surface-2);
}

[data-theme="dark"] .select-box:hover .box-icon {
  background: var(--surface-3);
}

[data-theme="dark"] .select-box.active .box-icon {
  background: var(--teal);
}

[data-theme="dark"] .form-section {
  border-bottom-color: var(--line);
}

[data-theme="dark"] .form-section h3 {
  border-bottom-color: var(--line);
}

[data-theme="dark"] .form-section h3 i {
  background: var(--mint);
}

[data-theme="dark"] .wizard-panel .field select,
[data-theme="dark"] .wizard-panel .field input {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--ink);
}

[data-theme="dark"] .wizard-panel .field select:focus,
[data-theme="dark"] .wizard-panel .field input:focus {
  background: var(--surface);
}

[data-theme="dark"] .seg-control {
  background: var(--surface-2);
  border-color: var(--line);
}

[data-theme="dark"] .seg-control button.active {
  background: var(--surface-3);
}

[data-theme="dark"] .success-icon {
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
}

[data-theme="dark"] .wizard-footer {
  background: var(--surface-2);
  border-top-color: var(--line);
}

[data-theme="dark"] #ilan-map {
  border-color: var(--line);
}

[data-theme="dark"] .select-box::before {
  background: radial-gradient(ellipse at 50% 0%, rgba(31,155,120,.08), transparent 70%);
}

[data-theme="dark"] .select-box.active::before {
  background: radial-gradient(ellipse at 50% 0%, rgba(31,155,120,.12), transparent 70%);
}

[data-theme="dark"] .select-box.active::after {
  background: var(--teal);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
  .ilan-ver-page {
    padding: 24px 12px 40px;
  }

  .wizard-steps {
    padding: 20px 20px 16px;
    gap: 0;
  }

  .step-lbl {
    font-size: 10.5px;
  }

  .step-num {
    width: 32px;
    height: 32px;
    font-size: 12.5px;
  }

  .step-line {
    margin: 16px 4px 0;
    min-width: 20px;
  }

  .wizard-content {
    padding: 28px 20px;
  }

  .wizard-panel h2 {
    font-size: 22px;
  }

  .panel-desc {
    margin-bottom: 24px;
  }

  .box-grid.cols-3,
  .box-grid.cols-2 {
    grid-template-columns: 1fr;
  }

  .select-box {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 16px;
    padding: 20px;
  }

  .select-box::before { display: none; }

  .box-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 0;
    flex-shrink: 0;
    border-radius: 12px;
  }

  .box-icon i { font-size: 22px; }
  .box-desc { display: none; }
  .box-title { margin-bottom: 0; }

  .select-box.active::after {
    top: 50%;
    transform: translateY(-50%);
    right: 16px;
  }

  .field-grid,
  .selector-grid {
    grid-template-columns: 1fr;
  }

  .field-grid .field.full,
  .seg-field.full {
    grid-column: span 1;
  }

  .seg-control.cols-4 button {
    flex: 1 0 calc(50% - 3px);
  }

  .seg-control.cols-4 {
    flex-wrap: wrap;
  }

  .seg-control.wrap button {
    flex: 1 0 calc(50% - 4px);
  }

  .success-actions {
    flex-direction: column;
    gap: 12px;
  }

  .wizard-footer {
    padding: 16px 20px;
  }

  .wizard-step-info {
    display: none;
  }
}
