/**
 * HBR Data — Kariyer / Başvuru (hd-career) · DOSYA 09
 * Yalnızca career.html'e özel stiller. Ortak katman (token'lar, header,
 * footer, sayfa hero, kicker, CTA) css/hd-core.css'tedir ve bu dosyadan
 * ÖNCE yüklenir. Bu sayfada css/style.css ve css/sandbox-styles.css YÜKLENMEZ.
 *
 * İşlevsel sözleşme (JS dondurucu — yalnızca stiller değişir):
 * - searchable-dropdown.js'in ürettiği sınıflar (.sd-*, .searchable-dropdown-container,
 *   .active/.selected/.has-value durumları) bu dosyada hd token'larıyla stillenir.
 * - recorder.js'in yönettiği #start-record/#stop-record/#reset-record/#timer vb.
 *   elemanların görünümleri buradan gelir; display açma/kapama JS'tedir.
 * Form bileşeni (.hd-form/.hd-field/.hd-consent/.form-note) hd-contact.css ile
 * aynı görsel dilde, bu dosyada bağımsız tanımlıdır.
 */

/* ---------- Durum renkleri (yalnızca bu dosyada kullanılır) ---------- */
:root {
  --hd-error: #B3261E;
  --hd-emerald-a06: rgba(14, 107, 79, 0.06);
  --hd-emerald-a15: rgba(14, 107, 79, 0.15);
  --hd-emerald-a35: rgba(14, 107, 79, 0.35);
  --hd-error-a15: rgba(179, 38, 30, 0.12);
  --hd-error-a30: rgba(179, 38, 30, 0.30);
  --hd-ink-a10: rgba(18, 32, 26, 0.10);
  --hd-ink-a25: rgba(18, 32, 26, 0.25);
}

:root[data-hd-theme="dark"] {
  --hd-error: #FF8A80;
  --hd-emerald-a06: rgba(47, 191, 143, 0.06);
  --hd-emerald-a15: rgba(47, 191, 143, 0.15);
  --hd-emerald-a35: rgba(47, 191, 143, 0.35);
  --hd-error-a15: rgba(248, 113, 113, 0.15);
  --hd-error-a30: rgba(248, 113, 113, 0.30);
  --hd-ink-a10: rgba(236, 234, 225, 0.10);
  --hd-ink-a25: rgba(236, 234, 225, 0.25);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-hd-theme="light"]) {
    --hd-error: #FF8A80;
    --hd-emerald-a06: rgba(47, 191, 143, 0.06);
    --hd-emerald-a15: rgba(47, 191, 143, 0.15);
    --hd-emerald-a35: rgba(47, 191, 143, 0.35);
    --hd-error-a15: rgba(248, 113, 113, 0.15);
    --hd-error-a30: rgba(248, 113, 113, 0.30);
    --hd-ink-a10: rgba(236, 234, 225, 0.10);
    --hd-ink-a25: rgba(236, 234, 225, 0.25);
  }
}

/* ---------- Sayfa düzeni ---------- */
.hd-career-form-wrap {
  max-width: 720px;
  margin-inline: auto;
}

/* ---------- Form bloğu: 1px çerçeveli kart (hd-contact ile aynı dil) ---------- */
.hd-form {
  border: 1px solid var(--hd-line);
  padding: clamp(24px, 4vw, 40px);
  display: flex;
  flex-direction: column;
}

.hd-field { display: flex; flex-direction: column; margin-bottom: 20px; }

.hd-label {
  font-family: var(--hd-font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hd-ink-soft);
  margin-bottom: 8px;
}

.hd-optional { text-transform: none; letter-spacing: 0; font-size: 11px; color: var(--hd-ink-soft); }

.required { color: var(--hd-emerald); font-weight: 600; margin-left: 2px; }

.hd-field input[type="text"],
.hd-field input[type="email"],
.hd-field input[type="tel"],
.hd-field input[type="url"],
.hd-field input[type="number"],
.hd-field textarea {
  width: 100%;
  min-height: 44px;
  padding: 12px 14px;
  background: var(--hd-paper-2);
  border: 1px solid var(--hd-line);
  color: var(--hd-ink);
  font-family: var(--hd-font-body);
  font-size: 0.95rem;
  border-radius: 0;
}

.hd-field textarea { min-height: 110px; padding-top: 12px; resize: vertical; }

.hd-field input::placeholder,
.hd-field textarea::placeholder { color: var(--hd-ink-soft); opacity: 1; }

.hd-field input:focus,
.hd-field textarea:focus {
  outline: 2px solid var(--hd-emerald);
  outline-offset: 2px;
  border-color: var(--hd-emerald);
}

/* "Diğer" kaynak serbest metni (career-init.js görünürlüğü yönetir) */
.hd-hear-other { margin-top: 8px; }

#hear-about-other-input {
  width: 100%;
  min-height: 44px;
  padding: 12px 14px;
  background: var(--hd-paper-2);
  border: 1px solid var(--hd-line);
  color: var(--hd-ink);
  font-family: var(--hd-font-body);
  font-size: 0.95rem;
  border-radius: 0;
}

#hear-about-other-input:focus {
  outline: 2px solid var(--hd-emerald);
  outline-offset: 2px;
  border-color: var(--hd-emerald);
}

/* ---------- Mono numaralı bölüm başlıkları (01 KİMLİK … 06 ONAY) ---------- */
.hd-form-sec {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 28px 0 20px;
  padding-top: 22px;
  border-top: 1px solid var(--hd-line);
  font-family: var(--hd-font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hd-ink-soft);
}

.hd-form > .hd-form-sec:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

/* ---------- Honeypot: ekran okuyucudan ve görsel akıştan gizli ---------- */
.honeypot-wrap {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Onay satırı ---------- */
.hd-consent {
  border-top: 1px solid var(--hd-line);
  padding-top: 20px;
  margin-top: 4px;
  margin-bottom: 24px;
}

.hd-consent-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.hd-consent-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex: none;
  accent-color: var(--hd-emerald);
}

.hd-consent-label span { color: var(--hd-ink-soft); font-size: 0.85rem; line-height: 1.55; }

.hd-consent-label a { color: var(--hd-ink); text-decoration-color: var(--hd-line); }

.hd-consent-label a:hover { color: var(--hd-emerald); text-decoration-color: var(--hd-emerald); }

/* ---------- Gönderim durumu ---------- */
.form-note {
  font-family: var(--hd-font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--hd-ink-soft);
}

.form-note:not(:empty) { margin-bottom: 16px; }

.form-note.success { color: var(--hd-emerald); }

.form-note.error { color: var(--hd-error); }

.form-note.info { color: var(--hd-ink-soft); }

.hd-form-submit { align-self: stretch; }

/* ============================================================
   Searchable Dropdown (js/searchable-dropdown.js çıktısı)
   Sınıf adları ve durum sınıfları (.active/.selected/.has-value/.sd-multi)
   JS sözleşmesidir — yalnızca renk/font değerleri hd token'larına bağlıdır.
   ============================================================ */
.searchable-dropdown-container {
  position: relative;
  width: 100%;
}

.sd-trigger {
  width: 100%;
  min-height: 44px;
  padding: 8px 14px;
  background: var(--hd-paper-2);
  border: 1px solid var(--hd-line);
  border-radius: 0;
  color: var(--hd-ink);
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.sd-trigger-values {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}

.sd-tag {
  background: var(--hd-emerald-a15);
  color: var(--hd-emerald);
  border: 1px solid var(--hd-emerald-a35);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.sd-tag-remove {
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.15s ease;
}

.sd-tag-remove:hover {
  opacity: 1;
  color: var(--hd-error);
}

.sd-trigger:hover,
.sd-trigger:focus {
  border-color: var(--hd-emerald);
  background: var(--hd-emerald-a06);
  outline: none;
}

.sd-trigger svg {
  color: var(--hd-ink-soft);
  flex: none;
  transition: transform 0.2s ease, color 0.2s ease;
}

.searchable-dropdown-container.active .sd-trigger svg {
  transform: rotate(180deg);
  color: var(--hd-emerald);
}

.sd-selected-text {
  color: var(--hd-ink-soft);
}

.sd-selected-text.has-value {
  color: var(--hd-ink);
  font-weight: 500;
}

.sd-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--hd-paper);
  border: 1px solid var(--hd-line);
  border-radius: 0;
  box-shadow: 0 16px 40px var(--hd-ink-a10);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
  overflow: hidden;
}

.searchable-dropdown-container.active .sd-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.sd-search-wrap {
  padding: 10px;
  border-bottom: 1px solid var(--hd-line);
  background: var(--hd-paper-2);
}

.sd-search-input {
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  background: var(--hd-paper);
  border: 1px solid var(--hd-line);
  border-radius: 0;
  color: var(--hd-ink);
  font-family: var(--hd-font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.sd-search-input:focus { border-color: var(--hd-emerald); }

.sd-list {
  list-style: none;
  max-height: 240px;
  overflow-y: auto;
  padding: 4px;
}

.sd-list::-webkit-scrollbar { width: 6px; }

.sd-list::-webkit-scrollbar-track { background: transparent; }

.sd-list::-webkit-scrollbar-thumb { background: var(--hd-line); border-radius: 3px; }

.sd-item {
  padding: 10px 12px;
  font-size: 0.9rem;
  color: var(--hd-ink-soft);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.sd-item:hover {
  background: var(--hd-emerald-a06);
  color: var(--hd-emerald);
}

.sd-item.selected {
  background: var(--hd-emerald);
  color: var(--hd-paper);
}

.sd-no-results {
  padding: 20px;
  text-align: center;
  color: var(--hd-ink-soft);
  font-size: 0.85rem;
}

/* ============================================================
   Ses kaydı ve CV blokları
   recorder.js / career-init.js / hd-site.js'in yönettiği elemanlar
   (#start-record, #stop-record, #reset-record, #recording-status, #timer,
   #audio-file-trigger, #file-name, #audio-preview-container, #cv-file-trigger,
   #cv-file-name) — display açma/kapama JS'te, görünüm burada.
   ============================================================ */
.hd-rec-block {
  border: 1px solid var(--hd-line);
  background: var(--hd-paper-2);
  padding: clamp(18px, 3vw, 26px);
  margin-bottom: 24px;
}

.hd-rec-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.hd-rec-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--hd-emerald-a15);
  color: var(--hd-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.hd-rec-title {
  margin: 0;
  font-family: var(--hd-font-body);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--hd-ink);
  letter-spacing: -0.01em;
}

.hd-rec-desc {
  font-size: 0.85rem;
  color: var(--hd-ink-soft);
  margin: 0 0 16px;
  line-height: 1.55;
}

.hd-rec-controls {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
}

.hd-rec-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 9px 16px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0;
  font-family: inherit;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.hd-rec-btn--start {
  background: var(--hd-emerald-a15);
  color: var(--hd-emerald);
  border-color: var(--hd-emerald-a35);
}

.hd-rec-btn--start:hover { border-color: var(--hd-emerald); }

.hd-rec-btn--stop {
  background: var(--hd-error-a15);
  color: var(--hd-error);
  border-color: var(--hd-error-a30);
}

.hd-rec-btn--stop:hover { border-color: var(--hd-error); }

.hd-rec-btn--reset {
  background: var(--hd-ink-a10);
  color: var(--hd-ink-soft);
  border-color: var(--hd-ink-a25);
}

.hd-rec-btn--reset:hover { color: var(--hd-ink); }

.hd-rec-btn--ghost {
  min-height: 0;
  padding: 7px 12px;
  background: transparent;
  border-style: dashed;
  border-color: var(--hd-emerald-a35);
  color: var(--hd-ink-soft);
  font-size: 0.75rem;
}

.hd-rec-btn--ghost:hover { color: var(--hd-emerald); border-color: var(--hd-emerald); }

.hd-rec-status { align-items: center; gap: 7px; }

.hd-rec-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hd-error);
  animation: recblink 0.9s ease-in-out infinite;
}

.hd-rec-timer {
  font-family: var(--hd-font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--hd-error);
  font-variant-numeric: tabular-nums;
}

.hd-rec-upload {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px dashed var(--hd-line);
}

.hd-rec-upload .hd-label { display: block; margin-bottom: 8px; }

.hd-rec-upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hd-file-name {
  font-family: var(--hd-font-mono);
  font-size: 0.75rem;
  color: var(--hd-ink-soft);
  overflow-wrap: anywhere;
}

.hd-audio-preview { margin-top: 14px; }

.hd-audio-preview audio {
  width: 100%;
  height: 38px;
  display: block;
  accent-color: var(--hd-emerald);
}

/* Kayıt yanıp sönme animasyonu (recorder.js'in beklediği isim: recblink) */
@keyframes recblink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
  .hd-form-submit { align-self: stretch; width: 100%; }
  .hd-rec-controls { align-items: stretch; }
}
