/* ============================================================
   Yoolaz Delivery - Effects Layer (şüşə effekti + animasiyalar)
   Bütün panellərdə (ictimai sayt + admin/support/restoran/kuryer/müştəri)
   ortaq istifadə olunur. main.css/admin.css-dən SONRA yüklənməlidir.
   ============================================================ */

:root {
  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-bg-strong: rgba(255, 255, 255, 0.78);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-shadow: 0 8px 32px rgba(31, 41, 55, 0.08);
  --glass-blur: 14px;
  --ease-out: cubic-bezier(.16,1,.3,1);
}

/* ---------- Baza animasiyaları ---------- */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }
@keyframes pulseSoft { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,90,31,.35); } 50% { box-shadow: 0 0 0 8px rgba(255,90,31,0); } }
@keyframes shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

body { animation: fadeIn .35s var(--ease-out); }

/* Kartlar/elementlər səhifəyə daxil olanda yuxarı sürüşərək görünsün.
   nth-child ilə pillə-pillə gecikmə veririk (max 8 element). */
.restaurant-card, .icon-grid-item, .stat-card, .a-card, .menu-item-row, .banner-carousel {
  animation: fadeInUp .5s var(--ease-out) both;
}
.restaurant-grid > *:nth-child(1), .icon-grid > *:nth-child(1), .stat-grid > *:nth-child(1) { animation-delay: .02s; }
.restaurant-grid > *:nth-child(2), .icon-grid > *:nth-child(2), .stat-grid > *:nth-child(2) { animation-delay: .06s; }
.restaurant-grid > *:nth-child(3), .icon-grid > *:nth-child(3), .stat-grid > *:nth-child(3) { animation-delay: .10s; }
.restaurant-grid > *:nth-child(4), .icon-grid > *:nth-child(4), .stat-grid > *:nth-child(4) { animation-delay: .14s; }
.restaurant-grid > *:nth-child(5), .icon-grid > *:nth-child(5) { animation-delay: .18s; }
.restaurant-grid > *:nth-child(6), .icon-grid > *:nth-child(6) { animation-delay: .22s; }
.restaurant-grid > *:nth-child(7), .icon-grid > *:nth-child(7) { animation-delay: .26s; }
.restaurant-grid > *:nth-child(8), .icon-grid > *:nth-child(8) { animation-delay: .30s; }

/* ---------- Şüşə effekti (glassmorphism) ---------- */
.site-header, .admin-topbar {
  background: var(--glass-bg-strong) !important;
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  border-bottom: 1px solid var(--glass-border);
}

.admin-sidebar {
  background: linear-gradient(180deg, rgba(22,24,44,0.92), rgba(22,24,44,0.98)) !important;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
}

.glass, .a-card, .stat-card, .auth-card, .banner-carousel, .restaurant-header-card .badge-row .pill {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

/* Düymələr - şüşə + hover/press animasiyası */
.btn, .a-btn {
  position: relative;
  overflow: hidden;
  transition: transform .15s var(--ease-out), box-shadow .15s var(--ease-out), background .2s;
  will-change: transform;
}
.btn-primary, .a-btn-primary {
  background: linear-gradient(135deg, var(--primary, #ff5a1f), #ff7a3f) !important;
  box-shadow: 0 4px 14px rgba(255,90,31,.32);
  border: 1px solid rgba(255,255,255,.25);
}
.btn-outline, .a-btn-outline, .btn-text {
  background: rgba(255,255,255,.55) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.btn:hover, .a-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0,0,0,.14); }
.btn:active, .a-btn:active { transform: translateY(0) scale(.97); }

/* Kart hover animasiyası */
.restaurant-card, .icon-grid-item .icon-circle, .menu-item-row, .a-card, .stat-card {
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out);
}
.restaurant-card:hover { transform: translateY(-6px); box-shadow: 0 16px 32px rgba(0,0,0,.12); }
.menu-item-row:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(0,0,0,.08); }
.icon-grid-item:hover .icon-circle { transform: translateY(-4px) scale(1.05); box-shadow: 0 8px 18px rgba(255,90,31,.22); }

/* ---------- İkon sistemi (Bootstrap Icons) ---------- */
.bi { display: inline-flex; align-items: center; justify-content: center; line-height: 1; vertical-align: -0.125em; }
.icon-btn { display: inline-flex; align-items: center; gap: 6px; }
.icon-btn .bi { font-size: 1.05em; }

/* Sadəcə ikon olan dairəvi düymələr (header giriş/qeydiyyat və s.) */
.icon-round-btn {
  width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.6); backdrop-filter: blur(8px); border: 1px solid var(--glass-border);
  transition: transform .15s var(--ease-out), background .2s; font-size: 17px; color: var(--gray-900, #1f2937);
  position: relative;
}
.icon-round-btn:hover { transform: translateY(-2px) scale(1.05); background: #fff; }
.icon-round-btn.primary { background: linear-gradient(135deg, var(--primary,#ff5a1f), #ff7a3f); color: #fff; box-shadow: 0 4px 14px rgba(255,90,31,.35); }

/* ---------- "Mobil app" hiss - alt tab naviqasiya ---------- */
.mobile-tabbar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  border-top: 1px solid var(--glass-border);
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 24px rgba(0,0,0,.06);
}
.mobile-tabbar-inner { display: flex; justify-content: space-around; }
.mobile-tabbar a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 10.5px; font-weight: 600; color: var(--gray-600, #6b7280); padding: 4px 10px; border-radius: 12px;
  transition: color .15s, transform .15s;
}
.mobile-tabbar a .bi { font-size: 20px; }
.mobile-tabbar a.active { color: var(--primary, #ff5a1f); }
.mobile-tabbar a:active { transform: scale(.92); }
.tab-cart-badge {
  position: absolute; top: -2px; right: 4px; background: var(--primary,#ff5a1f); color: #fff;
  font-size: 9px; font-weight: 700; border-radius: 999px; padding: 1px 5px; min-width: 15px; text-align: center;
}
.mobile-tabbar a { position: relative; }

@media (max-width: 768px) {
  .mobile-tabbar { display: block; }
  body { padding-bottom: 74px; }
  .admin-body { padding-bottom: 0; } /* panel-lərdə öz sidebar-ı var, tabbar-a ehtiyac yoxdur */
}

/* ---------- Yüklənmə skeleton animasiyası (opsional istifadə üçün) ---------- */
.skeleton {
  background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: 8px;
}

.spinner {
  width: 18px; height: 18px; border: 2.5px solid rgba(0,0,0,.15); border-top-color: var(--primary, #ff5a1f);
  border-radius: 50%; display: inline-block; animation: spin .7s linear infinite;
}

/* Reduced motion - əlçatanlıq */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
