/* ---------- "Biz Sizi Arayalım" — the callback request dialog (front page) ----------
 * One first-party round phone launcher fixed bottom-right, stacked above the WhatsApp dock, and one
 * centred dialog holding the request form. On the front page it opens once by itself after 30 s
 * unless the visitor closed it before in this browser; buttons marked data-callback-open (İletişim)
 * and the launcher open it at any time (docs/DECISIONS.md D-2026-09-11-01, D-2026-09-16-03). callback-request.js validates the form and posts JSON to the backend, which
 * stores the request and e-mails it to the business. Colours come from the site tokens in site.css. */
.callback { position: fixed; right: 22px; bottom: calc(max(22px, env(safe-area-inset-bottom)) + 66px); z-index: 80; }
.callback-launcher {
  display: inline-flex; align-items: center;
  height: 52px; min-width: 52px; padding: 0; overflow: hidden; border: 0; border-radius: 999px;
  background: var(--heading); color: #fff; box-shadow: 0 7px 22px rgba(30,115,190,.28);
  cursor: pointer; font: inherit;
  transition: background .18s ease;
}
/* Same reveal as the WhatsApp launcher (site.css .contact-launcher-label): the label opens on hover,
   keyboard focus and while the dialog is open; below 640px only the icon shows. */
.callback-launcher-label {
  max-width: 0; padding-right: 0; overflow: hidden; white-space: nowrap; font-size: .86rem;
  font-weight: 700; transition: max-width .26s ease, padding-right .26s ease;
}
.callback-launcher:hover .callback-launcher-label,
.callback-launcher:focus-visible .callback-launcher-label,
.callback-launcher[aria-expanded="true"] .callback-launcher-label { max-width: 220px; padding-right: 18px; }
.callback-launcher:hover, .callback-launcher[aria-expanded="true"] { background: #185f9e; }
.callback-launcher-icon { flex: none; display: grid; place-items: center; width: 52px; height: 52px; }
.callback-launcher-icon svg { width: 28px; height: 28px; fill: currentColor; }

.ci-callback {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 16px;
  margin: 22px 0; padding: 18px 20px; border: 1px solid #cfe0f5; border-radius: 16px; background: #f3f8ff;
}
.ci-callback strong { display: block; color: #1b2a44; font-size: 1.05rem; }
.ci-callback span { display: block; margin-top: 2px; color: #5d6777; font-size: .92rem; }
.ci-callback-button {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 20px; border: 0;
  border-radius: 12px; background: var(--heading); color: #fff; font: inherit; font-weight: 700; cursor: pointer;
}
.ci-callback-button:hover { background: #185f9e; }
.ci-callback-button svg { width: 20px; height: 20px; fill: currentColor; }

.callback-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(20,30,46,.46); }
.callback-dialog {
  position: fixed; left: 50%; top: 50%; z-index: 91; transform: translate(-50%, -50%);
  box-sizing: border-box; width: min(460px, calc(100vw - 32px)); max-height: calc(100dvh - 32px);
  overflow: auto; overscroll-behavior: contain;
  border: 1px solid #dfe5ee; border-radius: 16px; background: #fff; color: var(--ink);
  box-shadow: 0 24px 60px rgba(22,48,92,.28);
}
.callback-backdrop[hidden], .callback-dialog[hidden], .callback-status[hidden],
.callback-done[hidden], .callback-form[hidden] { display: none !important; }
body.callback-open { overflow: hidden; }

.callback-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  padding: 18px 18px 12px; border-bottom: 1px solid var(--line);
}
.callback-kicker { margin: 0 0 2px; color: var(--heading); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.callback-title { margin: 0; font-size: 1.25rem; line-height: 1.3; color: var(--ink); }
.callback-close {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 1px solid transparent; border-radius: 50%; background: transparent; color: #697286; cursor: pointer;
}
.callback-close:hover { background: #f2f5f9; color: var(--ink); }
.callback-close svg { width: 19px; height: 19px; fill: currentColor; }

.callback-body { padding: 16px 18px 20px; }
.callback-lead { margin: 0 0 14px; color: #4a5568; font-size: .9rem; line-height: 1.55; }
.callback-form { display: grid; gap: 14px; }
.callback-field { display: grid; gap: 6px; }
.callback-field > label, .callback-windows legend { font-size: .86rem; font-weight: 700; }
.callback-form input, .callback-form select, .callback-form button { font: inherit; }
.callback-form input:not([type="checkbox"]):not([type="radio"]), .callback-form select {
  box-sizing: border-box; width: 100%; min-height: 46px; padding: 10px 12px;
  border: 1px solid #9ba5b5; border-radius: 7px; color: #172033; background: #fff;
}
.callback-form input:focus-visible, .callback-form select:focus-visible { outline: 3px solid var(--gold); outline-offset: 1px; }
.callback-windows { margin: 0; padding: 0; border: 0; min-width: 0; }
.callback-windows legend { padding: 0; margin-bottom: 6px; }
.callback-window-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.callback-window-options label {
  display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 12px;
  border: 1px solid #9ba5b5; border-radius: 7px; cursor: pointer; font-size: .9rem;
}
.callback-window-options input { width: 18px; height: 18px; margin: 0; accent-color: var(--heading); }
.callback-consent { display: flex; align-items: flex-start; gap: 10px; font-size: .8rem; line-height: 1.5; cursor: pointer; }
.callback-consent input { flex: 0 0 20px; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--heading); }
.callback-consent a { color: var(--heading); }
.callback-status {
  margin: 0; padding: 10px 12px; border: 1px solid #be4b50; border-radius: 7px;
  color: #84262c; background: #fff5f5; font-size: .84rem; line-height: 1.5;
}
.callback-submit { border: 0; cursor: pointer; justify-self: start; min-height: 46px; }
.callback-submit:disabled { opacity: .65; cursor: wait; }
.callback-done { display: grid; gap: 8px; padding: 6px 0 2px; }
.callback-done h3 { font-size: 1.05rem; color: #128c4d; }
.callback-done p { color: #4a5568; font-size: .9rem; line-height: 1.55; }

@media (max-width: 640px) {
  .callback { right: 14px; bottom: calc(max(14px, env(safe-area-inset-bottom)) + 64px); }
  .callback-launcher { height: 50px; min-width: 50px; }
  .callback-launcher-icon { width: 50px; height: 50px; }
  .callback-launcher-label { display: none; }
  .callback-dialog {
    left: 12px; right: 12px; top: auto; bottom: max(12px, env(safe-area-inset-bottom)); transform: none;
    width: auto; max-height: calc(100dvh - 24px - env(safe-area-inset-bottom)); border-radius: 18px;
  }
  .callback-window-options { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .callback-launcher, .callback-launcher-label { transition: none; } }
