/* ==========================================================================
   ALANYATRIPS — Rezervasyon formu, hızlı rezervasyon modalı, rezervasyon sorgulama
   ========================================================================== */

/* Tur detayında form yüklenince: yan sütun sabitlenmez (uzun form), fiyat listesi formda tekrar etmez */
.tour__side:has(.bk) { position: static; }
.book:has(.bk) .book__ages { display: none; }

.bk { display: grid; gap: 20px; }
.bk__title { margin: 0 44px 0 0; font-family: var(--serif); font-weight: 600; font-size: clamp(26px, 3vw, 32px); line-height: 1.1; }
.bk__step { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 12px; }
.bk__step legend { display: flex; align-items: center; gap: 10px; padding: 0; margin-bottom: 12px; font-weight: 700; font-size: 15px; }
.bk__num {
    display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
    background: var(--ink); color: var(--sand); font-size: 12px; font-weight: 700;
}
.bk__hint { margin: 0; font-size: 14px; color: var(--sea); font-weight: 600; min-height: 1em; }
.bk__hint:empty { display: none; }
.bk-grid { display: grid; gap: 12px; }
.field--sm { max-width: 160px; }
.field textarea { resize: vertical; min-height: 64px; }

.field-err { display: block; font-size: 13px; color: var(--danger); font-weight: 600; }
.field-err:empty { display: none; }
.field-err.is-ok { color: var(--wa); }

/* ---------- Takvim ---------- */
.cal-b { border: 1px solid var(--stone); border-radius: var(--radius-md); padding: 12px; background: var(--paper); }
.cal-b__nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-b__nav strong { font-size: 15px; text-transform: capitalize; }
.cal-b__arrow {
    width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--stone); background: var(--paper);
    font-size: 20px; line-height: 1; color: var(--ink); cursor: pointer;
}
.cal-b__arrow:hover { border-color: var(--ink); }
.cal-b__head, .cal-b__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-b__head span { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--mist); padding: 4px 0; }
.cal-b__grid { transition: opacity .15s; }
.cal-b__grid.is-loading { opacity: .4; pointer-events: none; }
.cal-b__day {
    position: relative; aspect-ratio: 1; min-height: 38px; border: 0; border-radius: var(--radius-sm);
    background: transparent; color: #A9A196; font: inherit; font-size: 14px; cursor: default;
    display: grid; place-items: center; align-content: center; gap: 0; padding: 0;
}
.cal-b__day.is-open { background: var(--sea-soft); color: var(--ink); font-weight: 700; cursor: pointer; }
.cal-b__day.is-open:hover { background: #DCEAEA; }
.cal-b__day.is-selected, .cal-b__day.is-selected:hover { background: var(--ink); color: var(--sand); }
.cal-b__day small { font-size: 10px; font-weight: 700; color: var(--cta); line-height: 1; }
.cal-b__day.is-selected small { color: var(--gold); }
.cal-b__day:disabled { text-decoration: line-through; text-decoration-color: rgba(79, 95, 101, .35); }
.cal-b__day:focus-visible, .cal-b__arrow:focus-visible, .stepper__btn:focus-visible { outline: none; box-shadow: var(--focus); }

/* ---------- Kişi sayısı ---------- */
.bk-age { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--stone-2); }
.bk-age:last-of-type { border-bottom: 0; }
.bk-age__label strong { display: block; font-size: 15px; }
.bk-age__label small { color: var(--mist); font-size: 13px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--stone); border-radius: var(--radius-btn); padding: 3px; flex: 0 0 auto; }
.stepper__btn {
    width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--sand-2); color: var(--ink);
    font-size: 20px; line-height: 1; cursor: pointer; transition: background .15s;
}
.stepper__btn:hover { background: var(--stone); }
.stepper__btn:disabled { opacity: .35; cursor: default; }
.stepper__btn--plus { background: var(--ink); color: var(--sand); }
.stepper__btn--plus:hover { background: var(--ink-2); }
.stepper__val { min-width: 34px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Telefon ---------- */
.phone { display: grid; grid-template-columns: 116px 1fr; gap: 8px; }
.phone select, .phone input {
    width: 100%; min-height: 48px; padding: 0 12px; border: 1px solid #D5CABA; border-radius: var(--radius-sm);
    background: var(--paper); font: inherit; color: var(--ink);
}
.phone select:focus, .phone input:focus { outline: none; border-color: var(--sea); box-shadow: var(--focus); }

/* ---------- Kupon + özet ---------- */
.bk-coupon { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.bk-coupon input {
    min-height: 44px; padding: 0 14px; border: 1px dashed #C9B795; border-radius: var(--radius-sm);
    font: inherit; text-transform: uppercase; letter-spacing: .06em; background: var(--paper);
}
.bk-coupon input:focus { outline: none; border-style: solid; border-color: var(--sea); box-shadow: var(--focus); }
.bk-sum { margin: 0; padding: 14px 16px; background: var(--sand); border-radius: var(--radius-md); display: grid; gap: 6px; }
.bk-sum:empty { display: none; }
.bk-sum div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.bk-sum dt { color: var(--mist); }
.bk-sum dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.bk-sum__disc dd { color: var(--wa); }
.bk-sum__total { padding-top: 8px; margin-top: 2px; border-top: 1px solid var(--stone); }
.bk-sum__total dt { color: var(--ink); font-weight: 700; }
.bk-sum__total dd { font-size: 20px; font-weight: 700; }

.bk-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--mist); line-height: 1.5; cursor: pointer; }
.bk-consent input { width: 20px; height: 20px; margin: 0; flex: 0 0 auto; accent-color: var(--ink); }
.bk-consent a { color: var(--sea); text-decoration: underline; text-underline-offset: 2px; }
.bk__submit { width: 100%; }
.bk__submit:disabled { opacity: .7; cursor: progress; }
.bk__pay { margin: -8px 0 0; text-align: center; font-size: 13px; color: var(--mist); }
.bk__msg { margin: 0; color: var(--danger); font-weight: 600; font-size: 14px; }
.bk__msg:empty { display: none; }
.bk--closed { padding: 16px; background: var(--sand); border-radius: var(--radius-md); }
.bk--closed p { margin: 0 0 12px; font-size: 14px; }

/* ---------- Başarılı ---------- */
.bk--done { text-align: center; justify-items: center; padding: 8px 0; outline: none; }
.bk--done h2 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 30px; }
.bk--done p { margin: 0; color: var(--mist); }
.bk__check { width: 56px; height: 56px; border-radius: 50%; background: var(--sea-soft); position: relative; animation: bk-pop .35s ease-out; }
.bk__check::after {
    content: ""; position: absolute; left: 20px; top: 14px; width: 12px; height: 22px;
    border: solid var(--sea); border-width: 0 3px 3px 0; transform: rotate(45deg);
}
.bk__no { display: grid; gap: 2px; padding: 12px 22px; border: 1px dashed var(--brass); border-radius: var(--radius-md); }
.bk__no small { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--brass-text); font-weight: 700; }
.bk__no strong { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 22px; letter-spacing: .08em; color: var(--ink); }
.bk__done-total { font-size: 14px; }
.bk__done-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
@keyframes bk-pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- Hızlı rezervasyon modalı ---------- */
.bk-modal {
    width: min(560px, calc(100% - 24px)); max-height: calc(100dvh - 32px); padding: 0; border: 0;
    border-radius: var(--radius); background: var(--paper); color: var(--ink); box-shadow: var(--shadow-lg); overflow: hidden;
}
.bk-modal::backdrop { background: rgba(11, 37, 69, .55); backdrop-filter: blur(3px); }
.bk-modal[open] { animation: bk-rise .22s ease-out; display: flex; flex-direction: column; }
.bk-modal__body { padding: 26px 24px 24px; overflow-y: auto; overscroll-behavior: contain; }
.bk-modal__close {
    position: absolute; top: 14px; right: 14px; z-index: 2; width: 40px; height: 40px; border-radius: 50%;
    border: 1px solid var(--stone); background: var(--paper); font-size: 24px; line-height: 1; cursor: pointer; color: var(--ink);
}
.bk-modal__close:hover { border-color: var(--ink); }
.bk-loading { height: 280px; border-radius: var(--radius-md); background: linear-gradient(90deg, var(--sand) 0%, var(--sand-2) 50%, var(--sand) 100%); background-size: 200% 100%; animation: bk-shimmer 1.2s linear infinite; }
@keyframes bk-rise { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes bk-shimmer { to { background-position: -200% 0; } }

@media (max-width: 600px) {
    .bk-modal { width: 100%; max-width: none; max-height: 94dvh; margin: auto 0 0; border-radius: var(--radius) var(--radius) 0 0; }
    .bk-modal__body { padding: 22px 16px calc(20px + env(safe-area-inset-bottom)); }
    .phone { grid-template-columns: 104px 1fr; }
}
@media (min-width: 601px) {
    .bk-modal .bk-grid { grid-template-columns: 1fr 1fr; }
    .bk-modal .field--wide { grid-column: 1 / -1; }
}

/* Bot koruması: honeypot alanı görünmez */
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Rezervasyon sorgulama ---------- */
.track__form { max-width: 520px; display: grid; gap: 14px; padding: 24px; background: var(--paper); border: 1px solid var(--stone); border-radius: var(--radius); box-shadow: var(--shadow); }
.track__form input { text-transform: none; }
.track__form input[name="no"] { text-transform: uppercase; letter-spacing: .06em; }
.form-msg { margin: 0; color: var(--danger); font-weight: 600; font-size: 14px; }
.form-msg:empty { display: none; }
.track__result { max-width: 620px; margin-top: 24px; scroll-margin-top: 110px; }
.track-card { padding: 24px; background: var(--paper); border: 1px solid var(--stone); border-radius: var(--radius); box-shadow: var(--shadow); display: grid; gap: 18px; }
.track-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.track-card__head .eyebrow { margin-bottom: 4px; }
.track-card__no { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 22px; letter-spacing: .06em; }
.track-card__list { margin: 0; display: grid; }
.track-card__list div { display: grid; grid-template-columns: 38% 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--stone-2); }
.track-card__list dt { color: var(--mist); font-size: 14px; }
.track-card__list dd { margin: 0; font-weight: 600; }
.track-card .muted { color: var(--mist); font-weight: 400; }
.track-card .btn { justify-self: start; }

.status { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 6px; font-size: 13px; font-weight: 700; background: var(--sand-2); color: var(--ink); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status--pending, .status--awaiting_payment { background: #FBF1E2; color: #8A5A12; }
.status--confirmed { background: #E6F2EC; color: #1B6B42; }
.status--completed { background: var(--sea-soft); color: var(--sea); }
.status--cancelled, .status--refunded { background: #F7E7E1; color: var(--danger); }

@media (prefers-reduced-motion: reduce) {
    .bk__check, .bk-modal[open], .bk-loading { animation: none; }
}

/* ---------- R2: adım adım rezervasyon ---------- */
.bk-steps { list-style: none; margin: 0 0 18px; padding: 0; display: flex; gap: 6px; counter-reset: s; }
.bk-steps li { flex: 1; display: grid; justify-items: center; gap: 6px; cursor: pointer; font-size: 11px; font-weight: 700; color: var(--mist); text-align: center; position: relative; }
.bk-steps li::before { content: ""; position: absolute; top: 15px; left: -50%; right: 50%; height: 3px; background: var(--stone); z-index: 0; }
.bk-steps li:first-child::before { display: none; }
.bk-steps li.is-done::before, .bk-steps li.is-active::before { background: var(--grad, var(--sea)); }
.bk-steps span { position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); border: 2px solid var(--stone); color: var(--mist); font-size: 13px; transition: all .25s ease; }
.bk-steps li.is-active span { background: var(--grad, var(--sea)); border-color: transparent; color: #fff; transform: scale(1.1); box-shadow: 0 6px 16px rgba(14, 116, 144, .35); }
.bk-steps li.is-done span { background: var(--sea); border-color: var(--sea); color: #fff; }
.bk-steps li.is-active { color: var(--ink); }
.bk-steps em { font-style: normal; line-height: 1.2; max-width: 90px; }
.bk--wizard .bk__step { border: 0; padding: 0; margin: 0; animation: bk-step .3s ease both; }
.bk--wizard .bk__step > legend { font-size: 18px; margin-bottom: 14px; }
@keyframes bk-step { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.bk-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }
.bk-nav .btn { min-width: 120px; }
.bk--wizard .bk__submit { width: 100%; margin-top: 12px; }
@media (max-width: 520px) { .bk-steps em { display: none; } }

/* Modal: üst katman yerine sabit katman (Google otel önerileri üstte görünür) */
.bk-shade { position: fixed; inset: 0; z-index: 9000; background: rgba(11, 37, 69, .55); backdrop-filter: blur(3px); animation: bk-fade .2s ease; }
@keyframes bk-fade { from { opacity: 0; } to { opacity: 1; } }
.bk-modal[open] { position: fixed; inset: 0; margin: auto; z-index: 9001; }
html.bk-lock, html.bk-lock body { overflow: hidden; }
.pac-container { z-index: 9500 !important; border-radius: 12px; box-shadow: 0 14px 34px rgba(11, 37, 69, .22); font-family: var(--sans); }
@media (max-width: 600px) { .bk-modal[open] { margin: auto 0 0; inset: auto 0 0 0; } }

/* Otel adı önerisi (sunucu taraflı Google Places) */
.bk .field { position: relative; }
.bk-ac { position: absolute; left: 0; right: 0; z-index: 40; margin: 0; padding: 4px; list-style: none; background: #fff; border: 1px solid var(--stone, #D9E7F2); border-radius: 10px; box-shadow: 0 12px 28px rgba(11, 37, 69, 0.14); max-height: 300px; overflow-y: auto; }
.bk-ac[hidden] { display: none; }
.bk-ac [role=option] { display: grid; gap: 2px; padding: 10px 12px; border-radius: 8px; cursor: pointer; }
.bk-ac [role=option] strong { font-size: 14px; font-weight: 600; color: var(--ink, #0B2545); }
.bk-ac [role=option] small { font-size: 12.5px; color: var(--mist, #4A5D73); }
.bk-ac [role=option]:hover, .bk-ac [role=option][aria-selected=true] { background: var(--paper, #F2F8FC); }
.bk-ac__by { padding: 6px 12px 4px; font-size: 11px; color: var(--mist, #4A5D73); text-align: right; }
