/* Uygulama Arayüzü Faz 6.2
 * Yalnız mobil/PWA cihaz uyumu: safe-area, klavye, yön ve tam ekran.
 */
:root{
  --sp-vh:1vh;
  --sp-vvh:1vh;
  --sp-vvw:1vw;
  --sp-visual-height:100vh;
  --sp-visual-width:100vw;
  --sp-keyboard-height:0px;
  --sp-device-bottom-inset:0px;
}

html.sp-pwa-standalone,
html.sp-pwa-fullscreen{min-height:100%;background:var(--sp-bg,#f7f8fb)}
html.sp-pwa-standalone body,
html.sp-pwa-fullscreen body{min-height:calc(var(--sp-vvh) * 100)}

.sp-touch-device button,
.sp-touch-device a,
.sp-touch-device input,
.sp-touch-device select,
.sp-touch-device textarea{-webkit-tap-highlight-color:transparent}

@media(max-width:767px){
  body{overflow-x:hidden}
  img,video,iframe{max-width:100%;height:auto}
  input,select,textarea{font-size:16px!important}

  /* Mevcut 58×58 merkez Ekle düğmesine ve menü sırasına dokunmadan yalnız cihaz güvenli alanı eklenir. */
  .sp-mobile-bottom-nav,
  .sp-bottom-nav{
    padding-left:max(6px,env(safe-area-inset-left))!important;
    padding-right:max(6px,env(safe-area-inset-right))!important;
    padding-bottom:max(6px,env(safe-area-inset-bottom),var(--sp-device-bottom-inset))!important;
  }

  html.sp-pwa-standalone body,
  html.sp-pwa-fullscreen body{
    padding-left:env(safe-area-inset-left);
    padding-right:env(safe-area-inset-right);
  }

  html.sp-device-ios.sp-pwa-standalone .sp-header,
  html.sp-device-ios.sp-pwa-fullscreen .sp-header{
    padding-top:max(env(safe-area-inset-top),0px)!important;
  }

  /* Sanal klavye açıkken sabit alt menü form alanının/klavyenin üstüne binmez. */
  html.sp-keyboard-open .sp-mobile-bottom-nav.sp-global-mobile-nav,
  html.sp-keyboard-open .sp-mobile-bottom-nav,
  html.sp-keyboard-open .sp-bottom-nav{
    visibility:hidden!important;
    opacity:0!important;
    pointer-events:none!important;
  }

  .sp-account-main,
  .sp-mobile-shell,
  .sp-mobile-home-ui{min-width:0!important;max-width:100%!important}
}

/* iPhone landscape çentiklerinde sağ/sol içerik kesilmesini engeller. */
@media(max-width:1024px) and (orientation:landscape){
  html.sp-pwa-standalone .sp-site-main,
  html.sp-pwa-fullscreen .sp-site-main{
    padding-left:max(10px,env(safe-area-inset-left))!important;
    padding-right:max(10px,env(safe-area-inset-right))!important;
  }
}

/* Kısa yatay ekranlarda uygulama katmanları gerçek görsel viewport'u aşmasın. */
@media(orientation:landscape) and (max-height:520px){
  .sp-app-search-dialog,
  .sp-app-quick-dialog,
  .sp-app-center-dialog{
    max-height:calc(var(--sp-visual-height) - 20px)!important;
  }
}

@media(prefers-reduced-motion:reduce){
  html.sp-keyboard-open .sp-mobile-bottom-nav,
  html.sp-keyboard-open .sp-bottom-nav{transition:none!important;animation:none!important}
}
