/* ═══════════════════════════════════════════════════════════════
   AYBUGE — Görüşme / Randevu Modal
   ═══════════════════════════════════════════════════════════════ */

/* ── Overlay ──────────────────────────────────────────────────── */
.apt-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  visibility: hidden;
  opacity: 0;
  transition: opacity .25s ease, visibility .25s ease;
}

.apt-modal.is-open {
  visibility: visible;
  opacity: 1;
}

.apt-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 37, 64, .55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
}

/* ── Dialog ───────────────────────────────────────────────────── */
.apt-modal__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 64px -12px rgba(10, 37, 64, .22);
  overflow: hidden;
  transform: translateY(16px) scale(.98);
  transition: transform .3s cubic-bezier(.2,.8,.2,1);
  max-height: calc(100dvh - 32px);
  display: flex;
  flex-direction: column;
}

.apt-modal.is-open .apt-modal__dialog {
  transform: translateY(0) scale(1);
}

/* ── Header ───────────────────────────────────────────────────── */
.apt-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0;
}

.apt-modal__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.apt-modal__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #e0f7f8, #c8f0f2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1098a2;
  flex-shrink: 0;
}

.apt-modal__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #0a2540;
  letter-spacing: -.02em;
}

.apt-modal__step-label {
  margin: 2px 0 0;
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
}

.apt-modal__close {
  width: 36px;
  height: 36px;
  border: none;
  background: #f8fafc;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s, color .15s;
}

.apt-modal__close:hover {
  background: #f1f5f9;
  color: #0a2540;
}

/* ── Progress Bar ─────────────────────────────────────────────── */
.apt-modal__progress {
  display: flex;
  gap: 4px;
  padding: 0 24px;
  margin-bottom: 0;
  flex-shrink: 0;
}

.apt-modal__progress-bar {
  height: 3px;
  flex: 1;
  background: #e2e8f0;
  border-radius: 4px;
  transition: background .3s ease;
}

.apt-modal__progress-bar.is-active,
.apt-modal__progress-bar.is-done {
  background: #1098a2;
}

/* ── Body / Steps ─────────────────────────────────────────────── */
.apt-modal__body {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.apt-step {
  display: none;
  padding: 24px 24px 20px;
  animation: aptFadeIn .25s ease;
}

.apt-step.is-active {
  display: block;
}

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

.apt-step__title {
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 700;
  color: #0a2540;
  letter-spacing: -.01em;
}

/* ── Purpose Cards ────────────────────────────────────────────── */
.apt-purpose-list {
  display: grid;
  gap: 10px;
}

.apt-purpose-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #0a2540;
  cursor: pointer;
  text-align: left;
  transition: border-color .15s, background .15s, box-shadow .15s;
}

.apt-purpose-card:hover {
  border-color: #1098a2;
  background: #f0fbfc;
}

.apt-purpose-card.is-selected {
  border-color: #1098a2;
  background: #e8f8f9;
  box-shadow: 0 0 0 3px rgba(16,152,162,.12);
}

.apt-purpose-card__radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  flex-shrink: 0;
  transition: border-color .15s, background .15s;
  position: relative;
}

.apt-purpose-card.is-selected .apt-purpose-card__radio {
  border-color: #1098a2;
  background: #1098a2;
}

.apt-purpose-card.is-selected .apt-purpose-card__radio::after {
  content: '';
  position: absolute;
  inset: 3px;
  background: #fff;
  border-radius: 50%;
}

.apt-purpose-card__icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}

.apt-purpose-card__text {
  flex: 1;
  min-width: 0;
}

.apt-purpose-card__label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #0a2540;
}

.apt-purpose-card__desc {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: #64748b;
  margin-top: 2px;
}

/* ── Form Fields ──────────────────────────────────────────────── */
.apt-field {
  margin-bottom: 14px;
}

.apt-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
  letter-spacing: .01em;
}

.apt-label-optional {
  font-weight: 400;
  color: #94a3b8;
}

.apt-input,
.apt-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  color: #0a2540;
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
  box-sizing: border-box;
}

.apt-input:focus,
.apt-textarea:focus {
  border-color: #1098a2;
  box-shadow: 0 0 0 3px rgba(16,152,162,.12);
}

.apt-textarea {
  resize: vertical;
  min-height: 90px;
}

.apt-check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 4px;
}

.apt-check-row input[type="checkbox"] {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: #1098a2;
  flex-shrink: 0;
  cursor: pointer;
}

.apt-check-row label {
  font-size: 12px;
  color: #64748b;
  cursor: pointer;
  line-height: 1.5;
}

.apt-check-row a {
  color: #1098a2;
  text-decoration: underline;
}

/* ── Summary Box ──────────────────────────────────────────────── */
.apt-summary {
  background: #f0fbfc;
  border: 1px solid #b2e8ec;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.apt-summary__icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #1098a2;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}

.apt-summary__text strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #0a2540;
}

.apt-summary__text span {
  font-size: 12px;
  color: #1098a2;
}

/* ── Feedback ─────────────────────────────────────────────────── */
.apt-feedback {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
}

.apt-feedback--error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

/* ── Action Buttons ───────────────────────────────────────────── */
.apt-step__actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.apt-btn {
  flex: 1;
  min-height: 46px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all .2s ease;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.apt-btn--primary {
  background: #1098a2;
  color: #fff;
  box-shadow: 0 4px 12px rgba(16,152,162,.2);
}

.apt-btn--primary:hover {
  background: #087f8a;
  box-shadow: 0 6px 16px rgba(16,152,162,.3);
  transform: translateY(-1px);
}

.apt-btn--primary:disabled {
  background: #a0c4c7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.apt-btn--secondary {
  background: #f8fafc;
  color: #475569;
  border: 1.5px solid #e2e8f0;
}

.apt-btn--secondary:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.apt-btn--ghost {
  flex: none;
  background: transparent;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 500;
  padding: 0 12px;
}

/* ── Success Screen ───────────────────────────────────────────── */
.apt-success {
  text-align: center;
  padding: 16px 0 8px;
}

.apt-success__anim {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e0f7f8, #b2e8ec);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: #1098a2;
  animation: aptSuccessPop .4s cubic-bezier(.2,.8,.2,1);
}

@keyframes aptSuccessPop {
  from { transform: scale(.5); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.apt-success h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 800;
  color: #0a2540;
  letter-spacing: -.02em;
}

.apt-success p {
  margin: 0 0 24px;
  font-size: 14px;
  color: #64748b;
  line-height: 1.6;
}

/* ── Spinner ──────────────────────────────────────────────────── */
.apt-spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: aptSpin .6s linear infinite;
  display: none;
}

.apt-btn.is-loading .apt-spinner {
  display: block;
}

.apt-btn.is-loading .apt-btn-label {
  display: none;
}

@keyframes aptSpin {
  to { transform: rotate(360deg); }
}

/* ── Mobile ───────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .apt-modal {
    align-items: flex-end;
    padding: 0;
  }

  .apt-modal__dialog {
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
    max-height: 92dvh;
  }

  .apt-modal.is-open .apt-modal__dialog {
    transform: translateY(0);
  }
}
