/*
 * ARAMA PENCERESI - AIRBNB DUZENI (5 Ekim 2026, sahibi secti: "Arama acik
 * 1. konum" taslagi).
 *
 * Seciciyi (#picker) Airbnb'nin "Nereye?" penceresine cevirir: gri zemin,
 * ustte kapat + "Ada / parsel | Harita" sekmeleri, ortada kartlar (acik kart
 * buyuk ve golgeli, digerleri tek satir ozet), altta "Tumunu temizle" ve
 * pembe dugme. Butun kurallar #picker altinda: .pk-sheet / .pk-head
 * siniflarini kullanan SMS penceresi (otp-modal) etkilenmez.
 *
 * Yazi tipi Figtree; sayfada yuklu degilse sistem yazisina duser.
 */
#picker {
    --ab-ink: #222222;
    --ab-muted: #6A6A6A;
    --ab-line: #DDDDDD;
    --ab-line-2: #EBEBEB;
    --ab-soft: #F7F7F7;
    --ab-grad: linear-gradient(90deg, #E61E4D 0%, #E31C5F 50%, #D70466 100%);
    font-family: Figtree, "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--ab-ink);
}
#picker .pk-backdrop { background: rgba(0, 0, 0, .4); backdrop-filter: none; }
#picker .pk-sheet { background: var(--ab-soft); animation: pkaGel .26s cubic-bezier(.2, .8, .2, 1); }
@keyframes pkaGel { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes pkaGelMasa { from { opacity: 0; transform: translate(-50%, calc(-50% + 24px)); } to { opacity: 1; transform: translate(-50%, -50%); } }

/* --- Ust: kapat + sekmeler --- */
#picker .pka-ust {
    position: relative; flex: none; display: flex; align-items: center; justify-content: center;
    min-height: 64px; padding: calc(8px + var(--sat)) 20px 8px;
}
#picker .pka-kapat {
    position: absolute; left: 20px; top: calc(14px + var(--sat));
    width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--ab-line); background: #fff;
    color: var(--ab-ink); display: flex; align-items: center; justify-content: center; padding: 0; cursor: pointer;
}
#picker .pka-kapat svg { width: 14px; height: 14px; }
#picker .pka-sekme { display: flex; gap: 24px; font-size: 16px; font-weight: 600; }
#picker .pka-sekme > * { padding: 8px 0; color: var(--ab-muted); text-decoration: none; border-bottom: 2px solid transparent; }
#picker .pka-sekme .on { color: var(--ab-ink); border-bottom-color: var(--ab-ink); }
#picker .pka-sekme a:hover { color: var(--ab-ink); }

/* --- Kartlar --- */
#picker .pka-govde {
    flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
    display: flex; flex-direction: column; gap: 12px; padding: 0 12px 16px;
}
#picker .pka-kart { flex: none; background: #fff; border-radius: 16px; box-shadow: 0 1px 4px rgba(0, 0, 0, .06); }
#picker .pka-kart.on { border-radius: 24px; box-shadow: 0 8px 28px rgba(0, 0, 0, .12); }
#picker .pka-kart.on .pka-ozet { display: none; }
#picker .pka-kart:not(.on) .pka-acik { display: none; }
#picker .pka-ozet {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; height: 58px;
    padding: 0 20px; border: 0; background: none; font: inherit; color: var(--ab-ink); cursor: pointer; text-align: left;
}
#picker .pka-ozet span { flex: none; font-size: 14px; color: var(--ab-muted); }
#picker .pka-ozet b { min-width: 0; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#picker .pka-acik { padding: 22px 20px 20px; }

/* Liste adiminda konum karti kalan yuksekligi doldurur, liste kartin
   ICINDE kayar; alttaki ozet kartlar ve cubuk yerinde durur. */
#picker.pka-liste .pka-govde { overflow: hidden; }
#picker #pka-konum.on { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
#picker #pka-konum.on .pka-acik { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; padding-bottom: 0; }
#picker .pka-kaydir {
    flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
    margin: 0 -20px; padding: 2px 20px 14px;
}

/* --- Konum karti: baslik + arama --- */
#picker .pka-baslik { display: flex; align-items: center; gap: 12px; }
#picker .pk-back {
    width: 34px; height: 34px; border-radius: 50%; background: var(--ab-soft); color: var(--ab-ink); flex: none;
}
#picker .pk-back svg { width: 16px; height: 16px; }
#picker .pk-back[disabled] { display: none; }
#picker .pk-titles { align-items: flex-start; gap: 1px; }
#picker .pk-crumb { color: var(--ab-muted); font-size: 12px; font-weight: 600; text-align: left; }
#picker .pk-back[disabled] + .pk-titles .pk-crumb { display: none; }
#picker .pk-titles h2 {
    font-size: 26px; line-height: 30px; font-weight: 800; letter-spacing: -.02em; color: var(--ab-ink); text-align: left;
}
#picker .pk-search { padding: 0; margin: 16px 0 8px; background: none; }
#picker .pk-search input {
    height: 56px; padding: 0 44px 0 46px; border: 1px solid #B0B0B0; border-radius: 12px; background: #fff;
    font-size: 16px; font-weight: 500; color: var(--ab-ink);
}
#picker .pk-search input::placeholder { color: var(--ab-muted); font-weight: 400; }
#picker .pk-search input:focus { border-color: var(--ab-ink); box-shadow: inset 0 0 0 1px var(--ab-ink); }
#picker .pk-search-ico { left: 16px; right: auto; width: 18px; height: 18px; margin-top: 0; color: var(--ab-ink); }
#picker .pk-clear { right: 10px; width: 28px; height: 28px; background: var(--ab-soft); color: var(--ab-ink); }

/* Hizli satirlar: konumum, fotograftan oku, son aramalar */
#picker .pka-satir {
    display: flex; align-items: center; gap: 16px; width: 100%; padding: 8px 0;
    border: 0; background: none; text-align: left; font: inherit; color: var(--ab-ink); cursor: pointer;
}
#picker .pka-satir:hover .pka-kutu { background: #E8E8E8; }
#picker .pka-satir.busy { opacity: .6; }
#picker .pka-kutu {
    flex: none; width: 52px; height: 52px; border-radius: 12px; background: #F0F0F0;
    display: flex; align-items: center; justify-content: center;
}
#picker .pka-kutu svg { width: 22px; height: 22px; }
#picker .pka-yazi { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
#picker .pka-yazi b { font-size: 15px; font-weight: 600; }
#picker .pka-yazi small { font-size: 13px; color: var(--ab-muted); line-height: 1.3; }
#picker .pka-ara-baslik { margin: 12px 0 2px; font-size: 12px; font-weight: 600; color: var(--ab-muted); }
#picker #pka-gps-not { margin: -2px 0 6px 68px; text-align: left; font-size: 13px; font-weight: 500; line-height: 1.35; color: var(--ab-muted); }
#picker #pka-gps-not.err { color: #C13515; }

/* Liste */
#picker .pk-list { flex: none; overflow: visible; padding: 4px 0 0; }
#picker .pk-group {
    padding: 14px 0 4px; font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ab-muted);
}
#picker .pk-item {
    padding: 15px 2px; border-bottom: 1px solid var(--ab-line-2); background: none;
    font-size: 15px; font-weight: 500; color: var(--ab-ink);
}
#picker .pk-item:hover, #picker .pk-item:active, #picker .pk-item:focus-visible { background: var(--ab-soft); }
#picker .pk-item.sel { color: var(--ab-ink); background: var(--ab-soft); font-weight: 700; }
#picker .pk-item .pk-item-arr, #picker .pk-item.sel .pk-item-arr { color: #B0B0B0; }
#picker .pk-item mark { background: none; color: inherit; font-weight: 800; padding: 0; }
#picker .pk-empty, #picker .pk-loading { padding: 28px 0; color: var(--ab-muted); }

/* --- Ada / parsel karti --- */
#picker .pk-num { flex: none; overflow: visible; }
#picker .pk-num-card { padding: 0; justify-items: stretch; gap: 6px; }
#picker .pk-num-card label {
    font-size: 26px; line-height: 30px; font-weight: 800; letter-spacing: -.02em; text-transform: none; color: var(--ab-ink);
}
#picker .pk-num-hint { margin: 0 0 10px; font-size: 14px; color: var(--ab-muted); text-align: left; }
#picker .pk-num-card input {
    height: 64px; padding: 0 18px; border: 1px solid #B0B0B0; border-radius: 12px; background: #fff;
    font-size: 28px; font-weight: 800; letter-spacing: .02em; text-align: left; color: var(--ab-ink);
}
#picker .pk-num-card input:focus { border-color: var(--ab-ink); box-shadow: inset 0 0 0 1px var(--ab-ink); }
#picker .pk-num-alt { margin-top: 14px; padding: 0; border: 0; background: none; gap: 10px; }
#picker .pk-error { text-align: left; color: #C13515; }
#picker .pk-alt { margin: 0; text-align: left; font-size: 14px; color: var(--ab-ink); }
#picker .pk-alt a, #picker .pk-alt a b { color: var(--ab-ink); }
#picker .pk-alt a b { text-decoration: underline; font-weight: 700; }

/* --- Alt cubuk --- */
#picker .pka-cubuk {
    flex: none; display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 14px 24px calc(14px + var(--sab)); background: #fff; border-top: 1px solid var(--ab-line-2);
}
#picker .pka-temizle {
    border: 0; background: none; padding: 8px 0; font: inherit; font-size: 16px; font-weight: 600;
    color: var(--ab-ink); text-decoration: underline; cursor: pointer;
}
#picker .pk-next {
    width: auto; min-height: 48px; padding: 0 24px; border-radius: 8px; background: var(--ab-grad);
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-size: 16px; font-weight: 600; box-shadow: none;
}
#picker .pk-next svg { width: 18px; height: 18px; }
#picker .pk-next:disabled { opacity: .75; cursor: default; }

/* Telefonda klavye acikken (arama kutusuna yazarken) ozet kartlar ve cubuk
   gizlenir; listeye yer kalsin. Enter ve listeye dokunmak yine calisir. */
@media (max-width: 699px) {
    #picker.pka-liste.pka-yaziyor .pka-kart:not(.on),
    #picker.pka-liste.pka-yaziyor .pka-cubuk { display: none; }
}

/* Masaustu: ortada pencere, ic duzen ayni. Pencere app.css'te
   translate(-50%, -50%) ile ortalaniyor; acilis animasyonu bu kaydirmayi
   korumali, yoksa pencere sag altta dogup ortaya ziplar (5 Ekim 2026). */
@media (min-width: 700px) {
    #picker .pk-sheet { width: 520px; height: min(760px, 90vh); border-radius: 24px; background: var(--ab-soft); animation-name: pkaGelMasa; }
    #picker .pka-ust { padding-top: 10px; }
    #picker .pka-kapat { top: 14px; }
    #picker .pka-govde { padding: 0 16px 16px; }
}
