/* ============================================================
   Booking Widget Styles — Side Stella Elite
   İki mod: .booking-widget--inline  (anasayfa slider altı)
            .booking-widget--fixed   (iç sayfa fixed bottom)
   ============================================================ */

/* ── Ortak Değişkenler ─────────────────────────────────────── */
:root {
  --bw-green: #2e7d32;
  --bw-green-hover: #1b5e20;
  --bw-glass-bg: rgba(35, 36, 38, 0.75);
  --bw-glass-border: rgba(255, 255, 255, 0.15);
  --bw-radius: 12px;
  --bw-input-radius: 8px;
  --bw-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  --bw-transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Ortak Widget Konteyner ─────────────────────────────── */
.booking-widget {
  font-family: "Poppins", sans-serif;
  z-index: 1000;
}

/* ── Inline Mod (Anasayfa) ──────────────────────────────── */
.booking-widget--inline {
  position: absolute;
  bottom: 10%;
  left: 0;
  right: 0;
  padding: 0 15px;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

/* ── Fixed Mod (İç Sayfalar) ────────────────────────────── */
.booking-widget--fixed {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1050;
  padding: 0;
  transform: translateY(100%);
  opacity: 0;
  animation: bw-slide-up 0.6s var(--bw-transition) forwards;
  animation-delay: 0.8s;
}

@keyframes bw-slide-up {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ── Form Kartı (Glassmorphism) ──────────────────────────── */
.booking-widget__card {
  background: var(--bw-glass-bg);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid var(--bw-glass-border);
  border-radius: var(--bw-radius);
  box-shadow: var(--bw-shadow);
  padding: 1.25rem 1.75rem;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
}

/* Fixed modda border-radius ve padding değişiklikleri */
.booking-widget--fixed .booking-widget__card {
  border-radius: var(--bw-radius) var(--bw-radius) 0 0;
  max-width: 80%;
  padding: 1rem 2rem;
}

/* ── Üst Satır (Garantir Etiketi) ────────────────────────── */
.booking-widget__guarantee {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 500;
}

.booking-widget__guarantee i {
  color: #66bb6a;
  font-size: 0.9rem;
}

/* Fixed modda guarantee gizle (yer tasarrufu) */
.booking-widget--fixed .booking-widget__guarantee {
  display: none;
}

/* ── Form Row ──────────────────────────────────────────── */
.booking-widget__row {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: nowrap;
}

/* ── Form Group (Her Input Alanı) ────────────────────────── */
.booking-widget__group {
  flex: 1;
  min-width: 0;
}

.booking-widget__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.booking-widget__input {
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--bw-input-radius);
  padding: 0.6rem 0.85rem;
  font-size: 0.9rem;
  font-family: "Poppins", sans-serif;
  color: #333;
  transition:
    border-color var(--bw-transition),
    box-shadow var(--bw-transition);
  outline: none;
}

.booking-widget__input:focus {
  border-color: var(--bw-green);
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.2);
}

.booking-widget__input::placeholder {
  color: #999;
  font-size: 0.85rem;
}

/* Number input spinners stilini iyileştir */
.booking-widget__input[type="number"] {
  -moz-appearance: textfield;
}

.booking-widget__input[type="number"]::-webkit-inner-spin-button,
.booking-widget__input[type="number"]::-webkit-outer-spin-button {
  opacity: 1;
  height: 28px;
}

/* ── Yeşil Buton ──────────────────────────────────────── */
.booking-widget__group--btn {
  flex: 0 0 auto;
}

.booking-widget__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--bw-green);
  color: #fff;
  border: none;
  border-radius: var(--bw-input-radius);
  padding: 0.6rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: "Poppins", sans-serif;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition:
    background var(--bw-transition),
    transform 0.2s ease,
    box-shadow 0.2s ease;
  white-space: nowrap;
  text-transform: none;
  min-height: 42px;
}

.booking-widget__submit:hover {
  background: var(--bw-green-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(46, 125, 50, 0.35);
}

.booking-widget__submit:active {
  transform: translateY(0);
  box-shadow: none;
}

.booking-widget__submit i {
  font-size: 0.85rem;
}

/* ── Flatpickr Tema Uyumu & Izgara Hizalaması ────────────────────────────── */
.flatpickr-calendar {
  font-family: "Poppins", sans-serif;
  border-radius: 14px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.25);
  z-index: 99999 !important;
  padding: 8px 6px;
  box-sizing: border-box;
}

/* Ay & Yıl Başlık Alanı */
.flatpickr-months {
  align-items: center !important;
  position: relative !important;
  margin-bottom: 6px !important;
}

.flatpickr-months .flatpickr-month {
  height: 38px !important;
  background: transparent !important;
  color: #333 !important;
  fill: #333 !important;
}

.flatpickr-current-month {
  font-size: 1rem !important;
  font-weight: 600 !important;
  padding: 4px 0 0 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  width: 100% !important;
  left: 0 !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  padding: 0 4px !important;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  cursor: pointer !important;
}

.flatpickr-current-month .numInputWrapper {
  width: 60px !important;
  display: inline-block !important;
}

.flatpickr-current-month input.cur-year {
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  color: #333 !important;
  padding: 0 !important;
}

/* Sol / Sağ Ok Butonları */
.flatpickr-prev-month,
.flatpickr-next-month {
  padding: 6px !important;
  height: 32px !important;
  width: 32px !important;
  z-index: 10 !important;
}

.flatpickr-prev-month svg,
.flatpickr-next-month svg {
  width: 12px !important;
  height: 12px !important;
  fill: #333 !important;
}

/* Gün İsimleri (Pzt, Sal...) & Gün Sayıları (1, 2...) Kusursuz Izgara Hizalaması */
.flatpickr-weekdays {
  display: flex !important;
  width: 100% !important;
  height: 28px !important;
  align-items: center !important;
  margin-bottom: 4px !important;
}

.flatpickr-weekdayContainer {
  display: flex !important;
  width: 100% !important;
  flex: 1 !important;
}

.flatpickr-weekday {
  flex: 0 0 14.285% !important;
  width: 14.285% !important;
  max-width: 14.285% !important;
  text-align: center !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  color: #555 !important;
}

.flatpickr-days {
  width: 100% !important;
}

.dayContainer {
  display: flex !important;
  flex-wrap: wrap !important;
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  justify-content: flex-start !important;
}

.flatpickr-day {
  flex: 0 0 14.285% !important;
  width: 14.285% !important;
  max-width: 14.285% !important;
  height: 36px !important;
  line-height: 36px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  text-align: center !important;
  font-size: 0.85rem !important;
  border-radius: 6px !important;
  transition: background-color 0.2s ease !important;
  background: transparent !important;
  border-color: transparent !important;
}

/* Otomatik odaklanılan günlerin (.focused / :focus) gri görünmesini engelle */
.flatpickr-day.focused,
.flatpickr-day:focus {
  background: transparent !important;
  border-color: transparent !important;
  outline: none !important;
}

.flatpickr-day:hover {
  background: #f0f0f0 !important;
  color: #333 !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected.focused,
.flatpickr-day.selected:focus,
.flatpickr-day.selected:hover {
  background: var(--bw-green) !important;
  color: #fff !important;
  border-color: var(--bw-green) !important;
}

.flatpickr-day.today {
  border: 1px solid var(--bw-green) !important;
  background: transparent !important;
}

.flatpickr-day.today.selected {
  background: var(--bw-green) !important;
  color: #fff !important;
}

/* ── Responsive ──────────────────────────────────────── */

/* --- Tablet ve Mobil (768px ve altı) ---------------------------------------- */
@media (max-width: 768px) {
  /* iOS Otomatik Zoom Engelleme (Input font-size min 16px) */
  .booking-widget__input {
    font-size: 16px !important;
  }

  /* Flatpickr Mobil Modal Düzeni */
  .flatpickr-calendar {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 310px !important;
    max-width: 92vw !important;
    box-shadow:
      0 0 0 9999px rgba(0, 0, 0, 0.5),
      0 12px 35px rgba(0, 0, 0, 0.4) !important;
    border-radius: 16px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    margin: 0 !important;
    padding: 10px 8px !important;
  }

  /* Ok işaretlerini mobilde kaldır */
  .flatpickr-calendar.arrowTop:before,
  .flatpickr-calendar.arrowTop:after,
  .flatpickr-calendar.arrowBottom:before,
  .flatpickr-calendar.arrowBottom:after {
    display: none !important;
  }

  .flatpickr-days,
  .dayContainer {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
  }

  /* Inline mod (Anasayfa slider altı) */
  .booking-widget--inline {
    bottom: 5%;
    padding: 0 10px;
  }

  .booking-widget--inline .booking-widget__card {
    padding: 1rem;
  }

  .booking-widget--inline .booking-widget__row {
    flex-wrap: wrap;
    gap: 0.6rem;
  }

  .booking-widget--inline .booking-widget__group {
    flex: 1 1 calc(50% - 0.3rem);
    min-width: calc(50% - 0.3rem);
  }

  .booking-widget--inline .booking-widget__group--btn {
    flex: 1 1 100%;
  }

  .booking-widget--inline .booking-widget__submit {
    width: 100%;
  }

  /* Fixed mod (İç sayfalar) — Sağ alt köşeye yaslı, dikey alt alta sıralı */
  .booking-widget--fixed {
    position: fixed;
    bottom: 10px;
    right: 10px;
    left: auto;
    width: 230px;
    max-width: calc(100vw - 80px);
    padding: 0;
    z-index: 1050;
  }

  .booking-widget--fixed .booking-widget__card {
    max-width: 100%;
    padding: 0.75rem;
    border-radius: var(--bw-radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  }

  .booking-widget--fixed .booking-widget__row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
  }

  .booking-widget--fixed .booking-widget__group {
    width: 100%;
    flex: none;
    min-width: 0;
  }

  .booking-widget--fixed .booking-widget__label {
    display: block;
    font-size: 0.65rem;
    margin-bottom: 0.2rem;
  }

  .booking-widget--fixed .booking-widget__input {
    width: 100%;
    padding: 0.45rem 0.6rem;
  }

  .booking-widget--fixed .booking-widget__input[type="number"] {
    max-width: 100%;
  }

  .booking-widget--fixed .booking-widget__group--btn {
    width: 100%;
    flex: none;
    margin-top: 0.2rem;
  }

  .booking-widget--fixed .booking-widget__submit {
    width: 100%;
    padding: 0.5rem;
    font-size: 0.8rem;
    min-height: 36px;
    justify-content: center;
  }
}

/* --- Küçük mobil (480px ve altı) ----------------------------------- */
@media (max-width: 480px) {
  /* Inline mod */
  .booking-widget--inline {
    bottom: 3%;
  }

  .booking-widget--inline .booking-widget__group {
    flex: 1 1 100%;
    min-width: 100%;
  }

  .booking-widget--inline .booking-widget__label {
    font-size: 0.7rem;
  }

  .booking-widget--inline .booking-widget__input {
    padding: 0.5rem 0.7rem;
  }

  /* Fixed mod — Sağ altta daha da kompakt dikey kart */
  .booking-widget--fixed {
    width: 200px;
    max-width: calc(100vw - 75px);
    right: 10px;
    bottom: 10px;
  }

  .booking-widget--fixed .booking-widget__card {
    padding: 0.6rem;
  }

  .booking-widget--fixed .booking-widget__label {
    font-size: 0.62rem;
    margin-bottom: 0.15rem;
  }

  .booking-widget--fixed .booking-widget__input {
    padding: 0.35rem 0.5rem;
  }

  .booking-widget--fixed .booking-widget__submit {
    padding: 0.45rem;
    font-size: 0.75rem;
    min-height: 34px;
  }

  .booking-widget--fixed .booking-widget__submit i {
    display: inline-block;
    font-size: 0.75rem;
  }
}
