/* ==========================================================================
   Randevu düğmesi ve takvimi — WhatsApp düğmesinin hemen üstünde sabit.
   Takvim görünümü istenen booking-slot-calendar bileşeninin karşılığı:
   başlık + hafta şeridi + saat ızgarası. Renkler sitenin kendi jetonları.
   ========================================================================== */

/* --- yüzen düğme --------------------------------------------------------- */

.rdv-fab {
  /* Ortak etiket stilleri footer.css içindeki .contact-pill'de. */
  bottom: calc(32px + 44px + 10px + var(--wa-lift, 0px));
}

@media (max-width: 860px) {
  .rdv-fab { bottom: calc(24px + 40px + 10px + var(--wa-lift, 0px)); }
}

/* --- pencere ------------------------------------------------------------- */

.rdv {
  position: fixed;
  inset: 0;
  z-index: 195;              /* contact-modal (200) bunun üstünde açılır */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility 0s linear .2s;
}

.rdv[data-open="true"] {
  opacity: 1;
  visibility: visible;
  transition: opacity .2s ease, visibility 0s linear 0s;
}

.rdv__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 16, 96, .45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.rdv__panel {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--white);
  border: 1.5px solid var(--line-2);
  border-radius: var(--r-sm);
}

/* --- başlık -------------------------------------------------------------- */

.rdv__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 22px;
  border-bottom: 1px solid var(--line-soft);
}

.rdv__icon {
  display: none;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  background: var(--pink-tint);
  color: var(--indigo);
}

.rdv__icon svg { width: 21px; height: 21px; }

.rdv__headText { flex: 1; min-width: 0; }

.rdv__title { margin: 0; font-size: 22px; font-weight: 800; color: var(--ink); }
.rdv__sub   { margin: 2px 0 0; font-size: 12.5px; color: var(--muted-2); }

.rdv__close {
  flex: none;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  border-radius: var(--r-sm);
  color: var(--muted-2);
  cursor: pointer;
}

.rdv__close svg { width: 15px; height: 15px; }

/* --- gövde: solda ay ızgarası, sağda saatler ---------------------------- */

.rdv__body { padding: 20px 22px 24px; }

.rdv__split { display: flex; gap: 14px; }

.rdv__cal { flex: none; }

.rdv__viewControl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.rdv__month { margin: 0; font-size: 13.5px; font-weight: 700; color: var(--ink); }

.rdv__navBtn {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  border-radius: var(--r-sm);
  color: var(--muted-2);
  cursor: pointer;
}

.rdv__navBtn svg { width: 15px; height: 15px; }
.rdv__navBtn:disabled { color: var(--line-3); cursor: default; }

.rdv__table { border-collapse: separate; border-spacing: 0 2px; }

.rdv__weekday {
  width: 34px;
  height: 24px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted-2);
}

.rdv__cell { padding: 0; }

.rdv__dayBtn {
  position: relative;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  background: none;
  border: 0;
  border-radius: var(--r-sm);
  cursor: pointer;
}

.rdv__dayBtn[data-outside="true"] { color: var(--line-3); }

/* Geçmiş günler ve hafta sonları: üstü çizili ve tıklanamaz. */
.rdv__dayBtn[data-unavailable="true"] {
  color: var(--line-3);
  text-decoration: line-through;
  cursor: default;
}

/* Bugünün altındaki nokta. Seçiliyken beyaza dönüyor ki zemine kaybolmasın. */
.rdv__dayBtn[data-today="true"]::after {
  content: "";
  position: absolute;
  bottom: 3px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--indigo);
}

.rdv__dayBtn[data-on="true"] { background: var(--indigo); color: var(--white); }
.rdv__dayBtn[data-on="true"]::after { background: var(--white); }

/* --- saatler sütunu ------------------------------------------------------ */

.rdv__times {
  flex: 1;
  min-width: 0;
  padding-left: 14px;
  border-left: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
}

.rdv__dayLabel {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.rdv__slots {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 252px;             /* ay ızgarasıyla aynı yükseklik; gerisi kayar */
  overflow-y: auto;
  padding-right: 4px;
}

.rdv__slot {
  flex: none;
  padding: 7px 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  background: var(--white);
  border: 1.5px solid var(--line-2);
  border-radius: var(--r-sm);
  cursor: pointer;
}

.rdv__slot[data-on="true"] {
  background: var(--indigo);
  border-color: var(--indigo);
  color: var(--white);
}

/* yükleniyor / uygun saat yok */
.rdv__slotsMsg { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted-3); }

/* --- form ---------------------------------------------------------------- */

.rdv__form[hidden] { display: none; }

.rdv__form {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rdv__picked { margin: 0; font-size: 13px; font-weight: 700; color: var(--indigo); }

.rdv__fields { display: flex; gap: 10px; }

.rdv__field { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }

.rdv__field > span { font-size: 12.5px; font-weight: 600; color: var(--muted); }

.rdv__field input {
  width: 100%;
  height: 44px;
  padding: 11px 13px;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--ink);
  background: var(--bg-tint);
  border: 1.5px solid var(--line-2);
  border-radius: var(--r-sm);
}

.rdv__field input:focus {
  outline: none;
  border-color: var(--indigo);
  background: var(--white);
}

.rdv__phone { display: flex; gap: 6px; }
.rdv__phone input { flex: 1; min-width: 0; }
.rdv__phonePrefix { flex: none; }

.rdv__phonePrefix {
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  background: var(--bg-tint);
  border: 1.5px solid var(--line-2);
  border-radius: var(--r-sm);
}

.rdv__submit {
  height: 44px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  background: var(--indigo);
  border: 1.5px solid var(--indigo);
  border-radius: var(--r-sm);
  cursor: pointer;
}

.rdv__submit:disabled { opacity: .6; cursor: default; }

.rdv__error { margin: 0; font-size: 13px; color: #B42318; }

.rdv__note { margin: 0; font-size: 12px; line-height: 1.5; color: var(--muted-3); }

/* --- başarı -------------------------------------------------------------- */

.rdv__success { padding: 36px 24px 40px; text-align: center; color: var(--green); }
.rdv__success svg { width: 42px; height: 42px; }
.rdv__success h3 { margin: 12px 0 6px; font-size: 19px; font-weight: 800; color: var(--ink); }
.rdv__success p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--muted); }

@media (max-width: 560px) {
  /* Mobilde çerez bandı tam genişlik; bu düğme bandın tam üstüne biniyordu.
     WhatsApp düğmesiyle aynı şekilde, seçim yapılana kadar gizleniyor. */
  .tk-cookie-open .rdv-fab { display: none !important; }

  .rdv { padding: 14px; }
  .rdv__head { padding: 16px; }
  .rdv__body { padding: 14px 16px 18px; }
  /* Dar ekranda takvim ve saatler alt alta. */
  .rdv__split { flex-direction: column; gap: 14px; }
  .rdv__cal { align-self: center; }
  .rdv__times { padding-left: 0; padding-top: 14px; border-left: 0; border-top: 1px solid var(--line-soft); }
  .rdv__slots { max-height: 180px; }
  .rdv__fields { flex-direction: column; }
}
