/* ============================================================
   Avokado Bar — Sipariş Sistemi v3 (menü / garson / yazdırma / admin)
   Ortak stiller. Renk-tipografi token'ları colors_and_type.css'ten gelir.
   ============================================================ */

/* Scrollbar hiçbir v3 yüzeyinde görünmez (zorunlu kural) —
   html dahil: belge seviyesindeki scrollbar da gizlenir. */
html { scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar { display: none; width: 0; height: 0; }

.avb3-noscroll { scrollbar-width: none; -ms-overflow-style: none; }
.avb3-noscroll::-webkit-scrollbar { display: none; width: 0; height: 0; }

body.avb3-body,
body.avb3-body * {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
body.avb3-body::-webkit-scrollbar,
body.avb3-body *::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }

body.avb3-body {
  margin: 0;
  background: #EBE5DA;
  font-family: 'Causten', ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.avb3-body input,
body.avb3-body button,
body.avb3-body textarea,
body.avb3-body select { font-family: inherit; }

/* Animasyonlar */
@keyframes avb3SheetUp { from { transform: translateY(48px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes avb3Fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes avb3SlideIn { from { transform: translateX(40px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes avb3Toast {
  0%   { transform: translate(-50%, 16px); opacity: 0; }
  12%  { transform: translate(-50%, 0);    opacity: 1; }
  88%  { transform: translate(-50%, 0);    opacity: 1; }
  100% { transform: translate(-50%, 8px);  opacity: 0; }
}

/* Basılı durum yardımcıları (inline handler yerine class) */
.avb3-press      { transition: transform 180ms cubic-bezier(0.2,0.8,0.2,1); }
.avb3-press:active      { transform: scale(0.98); }
.avb3-press-mid:active  { transform: scale(0.95); }
.avb3-press-hard:active { transform: scale(0.9); }

/* Hover yardımcıları */
.avb3-hover-card:hover    { background: #FDFCF9 !important; }
.avb3-hover-olive:hover   { background: #575749 !important; }
.avb3-hover-faint:hover   { background: rgba(0,0,0,0.03) !important; }
.avb3-hover-green:hover   { background: #A8B80F !important; }

/* Müşteri menüsü sahnesi: mobil tam ekran, masaüstünde ortalanmış 430px kolon */
.avb3-stage {
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  background: #EBE5DA;
}
.avb3-column {
  width: 100%;
  max-width: 430px;
  height: 100dvh;
  background: #F5F0E8;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 48px rgba(40,40,30,0.12);
}
/* Mobil: iOS Safari'de 100dvh gerçek görünür alanla her zaman örtüşmüyor
   (araç çubuğu açılıp kapanırken altta boşluk kalıyor). position:fixed + inset:0
   tarayıcının görünür alanına birebir oturur — boşluk oluşmaz. */
@media (max-width: 480px) {
  html, body {
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
    background: #F5F0E8;
  }
  .avb3-stage {
    position: fixed;
    inset: 0;
    min-height: 0;
    background: #F5F0E8;
  }
  .avb3-column {
    max-width: none;
    height: 100%;
    box-shadow: none;
  }
  /* Personel giriş kapısı ve admin paneli .avb3-column içinde değil —
     onlar da görünür alana birebir otursun, altta boşluk kalmasın. */
  .avb3-screen {
    position: fixed;
    inset: 0;
    min-height: 0 !important;
    overflow-y: auto;
  }
}

/* Yazdırma istasyonu: yalnız fiş(ler) basılır (76mm).
   Mutfak ve servis ayrı fiş → her fiş kendi sayfasına. */
@media print {
  body.avb3-print-station * { visibility: hidden; }
  body.avb3-print-station .avb-print-area,
  body.avb3-print-station .avb-print-area * { visibility: visible; }
  body.avb3-print-station .avb-noprint { display: none !important; }
  body.avb3-print-station .avb-print-area {
    position: absolute; left: 0; top: 0; width: 76mm;
  }
  body.avb3-print-station .avb-receipt {
    box-shadow: none !important; border-radius: 0 !important; margin: 0 !important;
    break-inside: avoid; page-break-inside: avoid;
  }
  body.avb3-print-station .avb-receipt + .avb-receipt {
    break-before: page; page-break-before: always;
  }
}
