/* ====================================================================
   mobile-user.css — Kullanıcı Sayfaları Global Mobil Düzeltmeleri
   appointments, profile, kuafor, user-profile sayfaları için
   ==================================================================== */

/* ═══════════════════════════════════════════════════════════════════
   RANDEVULARlM SAYFASI (appointments.html)
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 767px) {
  /* Sayfa başı */
  .appt-wrap.container,
  main.appt-wrap .container {
    padding: 16px 12px 80px;
  }

  .page-head h1 {
    font-size: 22px;
    font-weight: 800;
    margin: 4px 0 2px;
  }

  .page-head .muted.small {
    font-size: 13px;
  }

  /* Sekmeler — tam genişlik pill */
  #apptTabs.tabs {
    display: flex;
    width: 100%;
    background: #eef2f6;
    border-radius: 12px;
    padding: 4px;
    margin: 12px 0 16px;
    border: 1px solid #e5e7eb;
  }

  #apptTabs .tab {
    flex: 1;
    text-align: center;
    padding: 10px 8px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 800;
    min-height: 44px;
    transition: all 0.15s ease;
  }

  /* Kart kökü */
  .appt-root {
    padding: 10px;
    border-radius: 14px;
  }

  /* Randevu kartları — daha büyük ve okunabilir */
  .appt-item {
    padding: 14px !important;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
  }

  .appt-item .line {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .appt-item .line strong {
    font-size: 15px;
  }

  /* Rozet sağa hizala */
  .appt-item .line .badge {
    align-self: flex-start;
  }

  /* Meta bilgiler */
  .appt-item .meta {
    font-size: 13px;
    line-height: 1.5;
    margin-top: 6px;
    color: #6b7280;
  }

  /* Aksiyonlar — tam genişlik butonlar */
  .appt-item .actions {
    justify-content: stretch;
    margin-top: 12px;
    gap: 8px;
  }

  .appt-item .actions .btn-mini {
    flex: 1;
    text-align: center;
    padding: 10px;
    min-height: 40px;
    font-size: 13.5px;
  }

  /* Rozet büyüklüğü */
  .badge {
    font-size: 11px;
    padding: 4px 8px;
  }

  /* Modal — bottom sheet */
  .modal-ov {
    align-items: flex-end;
    padding: 0;
  }

  .modal {
    width: 100% !important;
    border-radius: 20px 20px 0 0 !important;
    max-height: 90vh;
    overflow-y: auto;
  }

  .modal .hd {
    padding: 14px 16px 12px;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
  }

  .modal .ct {
    padding: 14px 16px;
  }

  .footerbar {
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    position: sticky;
    bottom: 0;
    background: #fff;
    border-top: 1px solid #e5e7eb;
  }

  .footerbar .btn-outline,
  .footerbar .btn-danger,
  .footerbar .btn-primary {
    flex: 1;
    justify-content: center;
    min-height: 44px;
    font-size: 14px;
  }

  /* Boş durum */
  .empty {
    padding: 28px 16px;
  }

  .empty .empty-icon {
    font-size: 40px;
  }

  /* İOS zoom engelleme */
  .finput,
  textarea.finput,
  input.finput {
    font-size: 16px !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   KUAFÖR LİSTELEME SAYFASI (kuafor.html)
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 767px) {
  /* Kuaför kartları grid */
  .salon-grid,
  .kuafor-grid,
  [class*="grid-"] {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  /* Filtre bar */
  .filter-bar,
  .filter-row {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap !important;
    gap: 8px;
    padding-bottom: 4px;
  }

  .filter-bar::-webkit-scrollbar,
  .filter-row::-webkit-scrollbar { display: none; }

  .filter-chip,
  .filter-tag {
    flex-shrink: 0;
    white-space: nowrap;
  }

  /* Harita düğmesi */
  .map-btn,
  .harita-btn {
    position: fixed;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    box-shadow: 0 4px 16px rgba(0,0,0,.2);
  }
}

/* ═══════════════════════════════════════════════════════════════════
   KULLANICI PROFİL SAYFASI (profile.html, user-profile.html)
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 767px) {
  /* Layout mobilede tek kolon */
  .detail-wrap {
    grid-template-columns: 1fr !important;
    padding: 0 12px !important;
    gap: 12px;
    margin: 8px auto;
  }

  /* Galeri yükseklik azalt */
  .gallery img {
    height: 240px !important;
  }

  /* Hizmet satırları mobilede daha iyi */
  .service-row {
    grid-template-columns: 1fr auto !important;
    gap: 8px;
    padding: 12px;
  }

  .service-row .meta {
    grid-column: 1 / -1;
  }

  /* Rezervasyon paneli sticky */
  .book-panel,
  .booking-panel {
    position: static !important;
  }

  /* Section başlıkları */
  .section h2 {
    font-size: 18px;
  }

  /* Yorum kartları */
  .review-item {
    padding: 12px;
  }

  /* Puan yıldızları */
  .stars {
    font-size: 16px;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   RANDEVU ALMA MODALI (profile.html içindeki booking modal)
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 767px) {
  /* BUG FIX: .modal-overlay (auth/OTP/şifre modallari) ortada açılmalı — bottom-sheet DEĞİL.
     Eski kod align-items: flex-end !important koyuyordu, her sayfada modallar alta yapışıyordu. */
  .modal-overlay {
    align-items: center !important;
    padding: 20px !important;
  }

  /* .modal-box içindeki modallar — köşeler tam yuvarlak kalır */
  .modal-overlay .modal-box {
    border-radius: 20px !important;
    width: min(480px, 92vw) !important;
    max-height: 88vh;
    overflow-y: auto;
  }

  /* Randevu booking panel mobilede */
  .book-wrap,
  .booking-wrap {
    position: static !important;
    top: auto !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   NAVBAR — MOBİL İYİLEŞTİRMELERİ (index.html ve kuafor.html)
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 767px) {
  /* Arama kutusu gizle — mobilede zaten bottom nav veya ayrı filtre var */
  .search-section {
    display: none;
  }

  /* Logo boyutu */
  .logo-text {
    font-size: 20px !important;
  }

  /* Navbar padding */
  .navbar {
    padding: 0 16px !important;
  }

  /* Giriş / kayıt butonu — navbar'da ikonla yeterli, hero'da metin görünsün */
  .auth-text {
    display: none;
  }
  .hero-navbar-right .auth-text {
    display: inline !important;
  }

  /* İşletmeni listele — kısalt */
  .list-btn {
    font-size: 12px;
    padding: 7px 10px !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   FOOTER MOBİL
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 767px) {
  .footer {
    padding: 40px 16px 24px;
  }

  .foot-main {
    grid-template-columns: 1fr !important;
    gap: 24px;
  }

  .foot-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   İOS ZOOM ENGELLEMESİ (tüm kullanıcı sayfaları)
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 767px) {
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  input[type="date"],
  input[type="time"],
  input[type="password"],
  input[type="search"],
  textarea,
  select {
    font-size: 16px !important;
  }

  /* Tüm butonlar parmak dostu */
  button,
  .btn,
  [role="button"],
  a.btn-primary,
  a.btn-outline,
  a.btn-mini {
    min-height: 44px;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   AUTH MODAL MOBİL (tüm sayfalar)
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 767px) {
  /* Tarih seçici overlay */
  #sb-date-overlay .sb-date-box {
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 100%;
    bottom: 0;
    top: auto;
    position: fixed;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   SCROLL & DOKUNMA İYİLEŞTİRMELERİ
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 767px) {
  /* Momentum scroll */
  .appt-list,
  .panel,
  .modal .ct {
    -webkit-overflow-scrolling: touch;
  }

  /* Dokunma vurgusu kaldır */
  * {
    -webkit-tap-highlight-color: transparent;
  }

  /* Seçim rengi */
  ::selection {
    background: rgba(14, 165, 179, 0.2);
  }
}

/* ═══════════════════════════════════════════════════════════════════
   KARANLIK MOD İPTALİ — Kullanıcı sayfaları
   ═══════════════════════════════════════════════════════════════════ */
html, body {
  color-scheme: light only !important;
}



/* ═══════════════════════════════════════════════════════════════════

/* ═══════════════════════════════════════════════════════════════════
   MOBİL NAVBAR — Yeni yapı
   ═══════════════════════════════════════════════════════════════════ */

.mobile-navbar { display: none; }

@media (max-width: 767px) {

  /* Desktop nav gizle */
  .navbar { display: none !important; }

  /* ── Navbar kapsayıcı ── */
  .mobile-navbar {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 999;
    background: linear-gradient(160deg, #0a1a1c 0%, #0d2325 60%, #0a2020 100%);
    border-bottom: 1px solid rgba(14,165,179,.18);
    padding-bottom: 10px;
    transition: padding .25s ease,
                transform .38s cubic-bezier(0.4, 0, 0.2, 1),
                opacity .32s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* index.html: navbar başlangıçta gizli — hero search geçilince belirir */
  body.index-page .mobile-navbar {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
  }
  body.index-page.navbar-visible .mobile-navbar {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  /* index hero tam sayfa — navbar gizliyken üst boşluk yok */
  body.index-page:not(.navbar-visible) main,
  body.index-page:not(.navbar-visible) .hero-section {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }

  /*
   * Compact (scroll sonrası) navbar'ın hedef yüksekliği:
   * mob-compact-row: padding-top(10) + search-box(42) + navbar padding-bottom(10) = ~62px
   */
  :root {
    --mob-navbar-compact-h: 62px;
    --mob-navbar-h: 190px; /* expanded fallback — JS hemen günceller */
  }

  /* ── EXPANDED bölüm (JS tarafından kontrol edilir) ── */
  .mob-expanded {
    overflow: hidden;
    max-height: 200px;
    opacity: 1;
    transition: max-height .32s ease, opacity .25s ease;
  }

  /* Satır 1: İşletmeni Listele */
  .mob-top-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px 0;
  }

  .mob-list-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,.80);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: .01em;
    transition: color .15s;
  }
  .mob-list-btn:hover { color: #fff; }
  .mob-list-btn i { font-size: 11px; opacity: .7; }

  /* Satır 2: Logo */
  .mob-logo-row {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 16px 0;
  }

  .mob-logo-row .logo-text {
    font-size: 30px !important;
    color: #fff !important;
    text-decoration: none !important;
  }

  /* Satır 3: Konum + Zaman (expanded içinde) */
  .mob-extra-search {
    padding: 8px 12px 10px;
  }

  /* index.html: tek arama kutusu tam genişlik kaplasın */
  .mob-extra-search .mob-search-row {
    padding-right: 0;
  }
  .mob-extra-search .mob-search-main {
    flex: 1;
    min-width: 0;
  }

  /* ── COMPACT satır — yalnızca navbar collapsed olduğunda görünür ── */
  .mob-compact-row {
    display: none;
    align-items: center;
    gap: 0;
    padding: 10px 12px 0;
  }

  /* Logo: max-width animasyonu zaten boşluğu kontrol ediyor.
     Görünür olduğunda sağında 10px boşluk bırakır. */
  .mob-compact-logo {
    font-size: 20px !important;
    color: #fff !important;
    text-decoration: none !important;
    flex-shrink: 0;
    white-space: nowrap;
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    margin-right: 0;
    transition: max-width .38s cubic-bezier(.4,0,.2,1),
                opacity .3s cubic-bezier(.4,0,.2,1),
                margin-right .38s cubic-bezier(.4,0,.2,1);
  }

  /* JS max-width: 80px set ettiğinde margin-right de açılır */
  .mob-compact-logo[style*="max-width: 80px"],
  .mob-compact-logo[style*="max-width:80px"] {
    margin-right: 10px;
  }

  /* Compact satırında search kutusu tam genişliği kaplasın */
  .mob-compact-row .mob-search-main {
    flex: 1;
    min-width: 0;
  }

  /* Collapsed durumda compact-row göster */
  body.navbar-collapsed .mob-compact-row {
    display: flex;
  }

  /* ── Ortak arama kutusu ── */
  .mob-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 14px;
    background: rgba(255,255,255,.96);
    border-radius: 12px;
    border: none;
    font-family: inherit;
    text-align: left;
  }

  .mob-search-box i { color: #9ca3af; font-size: 13px; flex-shrink: 0; }

  .mob-search-box input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: #222;
    font-family: inherit;
  }
  .mob-search-box input::placeholder { color: #9ca3af; }

  /* ── profile.html mob-when-box: sağ kenardan boşluk ── */
  .mob-search-row {
    display: flex;
    gap: 8px;
    padding-right: 12px; /* sağ tarafla eşit boşluk */
  }

  /* Ana arama: tam genişlik */
  .mob-search-main { flex: 1; }

  /* Konum */
  .mob-search-loc { flex: 1; }

  /* Zaman kutusu */
  .mob-when-box {
    flex: 0 0 auto;
    min-width: 115px;
    cursor: pointer;
    transition: background .15s, border .15s;
    border: 1.5px solid transparent;
  }
  .mob-when-box.filled { background: #e6f9fa; border-color: #0ea5b3; }
  .mob-when-box.filled i { color: #0ea5b3; }

  .mob-when-text {
    font-size: 13px;
    color: #9ca3af;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
  }
  .mob-when-box.filled .mob-when-text { color: #0ea5b3; font-weight: 600; }

  /* ── filters-wrap: fixed, navbar hemen altında ── */
  .filters-wrap {
    position: fixed !important;
    top: 160px; /* JS setProperty ile günceller */
    left: 0 !important;
    right: 0 !important;
    margin-top: 0 !important;
    z-index: 998 !important;
    transition: top 0.42s cubic-bezier(0.4, 0, 0.2, 1) !important;
    will-change: top;
  }

  /* İçerik filters-wrap'ın altından başlasın — JS padding-top'u günceller */
  .list-page {
    padding-top: 230px !important;  /* navbar + filters yüksekliği (JS günceller) */
    transition: padding-top 0.42s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }

  #sortBar { display: none !important; }


  /* ── Zaman Seçici — Tam Sayfa ── */
  #timeOverlay {
    background: #fff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    display: none;
    place-items: unset !important;
  }
  #timeOverlay.active {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }
  #timeOverlay .time-box {
    width: 100% !important;
    min-height: 100dvh !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    overflow-y: auto !important;
    background: #fff !important;
  }
  #timeOverlay .time-box .time-close {
    position: static !important;
    background: transparent !important;
    border: none !important;
    width: 44px !important; height: 44px !important;
    margin: 16px 0 0 8px !important;
    color: #374151 !important;
    font-size: 17px !important;
  }
  #timeOverlay .time-box .time-close .fa-times::before { content: "\f053" !important; }
  #timeOverlay .time-box #timeTitle {
    text-align: left !important;
    font-size: 22px !important;
    font-weight: 800 !important;
    padding: 4px 20px 16px !important;
    margin: 0 !important;
    color: #111827 !important;
  }
  #timeOverlay .time-box #timeGrid {
    flex: 1 !important;
    padding: 8px 20px 20px !important;
    max-width: 100% !important;
    gap: 10px !important;
  }
  #timeOverlay .time-box .time-chip {
    padding: 12px 18px !important;
    font-size: 15px !important;
    border-radius: 12px !important;
    min-width: 80px !important;
    text-align: center !important;
  }
  #timeOverlay .time-box .time-actions {
    position: sticky !important;
    bottom: 0 !important;
    background: #fff !important;
    border-top: 1px solid #e5e7eb !important;
    padding: 14px 20px calc(14px + env(safe-area-inset-bottom, 0px)) !important;
    margin: 0 !important;
    justify-content: stretch !important;
    gap: 10px !important;
  }
  #timeOverlay .time-box .time-actions .btn,
  #timeOverlay .time-box .time-actions .auth-btn {
    flex: 1 !important;
    text-align: center !important;
    min-height: 48px !important;
    border-radius: 14px !important;
    font-size: 15px !important;
    justify-content: center !important;
  }
  #timeOverlay .time-box .time-actions [data-action="pick-date"] {
    order: -1 !important;
    background: #f3f4f6 !important;
    border-color: #e5e7eb !important;
    color: #374151 !important;
    flex: 0.8 !important;
  }
  #timeOverlay .time-box .time-actions [data-action="cancel"] { display: none !important; }
}

/* ═══════════════════════════════════════════════════════════════════
   MOBİL NAVBAR — SAYFA ÖZEL DÜZELTMELER
   index.html, profile.html, user-profile.html için
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 767px) {

  /* ── index.html: Hero butonlar hero içinde gösterilir ── */
  .hero-navbar-right {
    display: flex !important;
    position: absolute !important;
    left: 14px !important;
    right: 14px !important;
    top: calc(env(safe-area-inset-top, 0px) + 14px) !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: .5rem !important;
    z-index: 10 !important;
  }
  .hero-navbar-right .profile {
    padding: 8px 14px !important;
    font-size: 12.5px !important;
    gap: 5px !important;
    margin-right: auto !important;  /* sola yapışır, list-btn'i sağa iter */
  }
  .hero-navbar-right .hero-listele-btn {
    padding: 8px 14px !important;
    font-size: 12.5px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
  }
  .hero-navbar-right .hero-listele-btn i {
    font-size: 11px !important;
    opacity: .8 !important;
  }

  /* ── index.html: Hero sol üst logo gizle ── */
  .hero-logo {
    display: none !important;
  }

  /* ── index.html: Hero overlay normal akış ── */
  .hero-overlay {
    padding-top: 0 !important;
    justify-content: center !important;
  }

  /* Randevu hero da aynı offset */
  .appt-hero {
    padding-top: calc(var(--mob-navbar-h, 120px) + 16px) !important;
  }

  /* ── profile.html: İşletme detay sayfası içerik offseti ── */
  .detail-wrap {
    /*
     * Fallback: navbar expanded tam yüksekliği ~190px
     * JS --mob-navbar-h set edince bu değer geçersiz olur.
     * transition sadece collapse/expand sırasında aktif olsun —
     * ilk yüklemede animasyon olmasın diye .nav-ready class'ı bekliyoruz.
     */
    padding-top: calc(var(--mob-navbar-h, 190px) + 8px) !important;
  }
  .detail-wrap.nav-ready {
    transition: padding-top .42s cubic-bezier(.4,0,.2,1);
  }

  /* ── user-profile.html: Profil sayfası içerik offseti ── */
  body.has-mobile-navbar .container.page {
    padding-top: calc(var(--mob-navbar-h, 190px) + 8px) !important;
  }
  body.has-mobile-navbar.nav-ready .container.page {
    transition: padding-top .42s cubic-bezier(.4,0,.2,1);
  }

  /* ── profile.html: ShopBar navbar'ın hemen altında ── */
  .shopbar {
    top: var(--mob-navbar-h, 190px) !important;
  }
  .nav-ready .shopbar {
    transition: top .42s cubic-bezier(.4,0,.2,1);
  }

  /* ── navbar.html ile yüklenen sayfalar (user-profile.html) ── */
  body.has-mobile-navbar main {
    padding-top: calc(var(--mob-navbar-h, 190px) + 8px) !important;
  }
  body.has-mobile-navbar.nav-ready main {
    transition: padding-top .42s cubic-bezier(.4,0,.2,1);
  }

  /* ── hero ve diğer offset'ler ── */
  .nav-ready .hero-overlay,
  .nav-ready .appt-hero {
    transition: padding-top .42s cubic-bezier(.4,0,.2,1);
  }
}