/* Mobile drawer menu — shared by every page (see static/js/mobile-menu.js).
   Plain CSS on purpose: static/css/tailwind.css is a pre-built static file,
   so new Tailwind classes would silently not exist in it. Colours are the
   live navbar's tokens: #3D2010 brown, #6B3E1E secondary, #D97706/#B45309
   amber, #F5E6C8 gold, #F7EDDD hover, #DBC2B0 border, #DC2626 sign-out. */

/* ---- burger button (existing #menu-btn, or injected on app pages) ---- */
.rs-burger {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; min-width: 44px; padding: 0; margin: 0;
  border: 0; border-radius: 12px; background: transparent; color: #3D2010;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.rs-burger:hover { background: rgba(61, 32, 16, 0.06); }
.rs-burger:focus-visible, .rs-drawer :focus-visible { outline: 2px solid #D97706; outline-offset: 2px; }
.rs-burger .material-symbols-outlined { font-size: 28px; }

/* ---- backdrop + panel (z-index: header 50 < WhatsApp 999 < 1000/1001 < page skeletons 9999) ---- */
.rs-drawer-backdrop {
  position: fixed; inset: 0; z-index: 1000; background: rgba(61, 32, 16, 0.45);
  opacity: 0; visibility: hidden;
  transition: opacity 0.22s ease, visibility 0s linear 0.22s;
}
.rs-drawer-backdrop.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }
.rs-drawer-backdrop { touch-action: none; }

.rs-drawer {
  position: fixed; top: 0; right: 0; z-index: 1001;
  width: min(86vw, 340px); height: 100vh; height: 100dvh;
  display: flex; flex-direction: column;
  background: #fff; color: #3D2010; font-family: 'Inter', system-ui, sans-serif;
  box-shadow: -8px 0 32px rgba(61, 32, 16, 0.22);
  transform: translateX(100%); visibility: hidden;
  transition: transform 0.22s ease, visibility 0s linear 0.22s;
  overscroll-behavior: contain;
}
.rs-drawer.is-open { transform: translateX(0); visibility: visible; transition-delay: 0s; }

.rs-drawer-top {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
  min-height: 64px; padding: 8px 8px 8px 20px;
  background: #F5E6C8; border-bottom: 1px solid #DBC2B0;
}
.rs-drawer-title { font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #6B3E1E; }
.rs-drawer-close {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 12px; background: transparent; color: #3D2010; cursor: pointer;
}
.rs-drawer-close:hover { background: rgba(61, 32, 16, 0.08); }
.rs-drawer-close-icon { font-size: 28px; }

.rs-drawer-scroll { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 16px 12px; }

/* account block */
.rs-drawer-account { display: flex; align-items: center; gap: 12px; padding: 8px 8px 16px; }
.rs-drawer-account.is-guest { flex-direction: column; align-items: stretch; gap: 10px; }
.rs-drawer-avatar {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #D97706, #B45309);
}
.rs-drawer-who { flex: 1; min-width: 0; }
.rs-drawer-name { font-size: 16px; font-weight: 600; color: #3D2010; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-drawer-caption { font-size: 12px; color: #6B3E1E; opacity: 0.8; }
.rs-drawer-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; border-radius: 9999px; font-size: 15px; font-weight: 600; text-decoration: none;
}
.rs-drawer-btn-outline { border: 1.5px solid #D97706; color: #3D2010; background: transparent; }
.rs-drawer-btn-outline:hover { background: rgba(217, 119, 6, 0.10); }
.rs-drawer-btn-solid { border: 1.5px solid transparent; color: #fff; background: linear-gradient(180deg, #D97706, #B45309); }
.rs-drawer-btn-icon { font-size: 20px; }

/* link rows (>= 52px tall) */
.rs-drawer-nav { display: flex; flex-direction: column; gap: 2px; }
.rs-drawer-row {
  position: relative; display: flex; align-items: center; gap: 14px;
  width: 100%; min-height: 52px; padding: 0 14px; box-sizing: border-box;
  border: 0; border-radius: 12px; background: transparent; color: #3D2010;
  font: inherit; font-size: 16px; font-weight: 500; text-align: left; text-decoration: none; cursor: pointer;
}
.rs-drawer-row:hover { background: #F7EDDD; }
.rs-drawer-row.is-current { background: #F7EDDD; color: #B45309; font-weight: 700; }
.rs-drawer-row.is-current::before {
  content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px;
  border-radius: 0 4px 4px 0; background: #D97706;
}
.rs-drawer-icon { font-size: 24px; color: #6B3E1E; }
.rs-drawer-row.is-current .rs-drawer-icon { color: #D97706; }
.rs-drawer-divider { height: 1px; margin: 12px 8px; background: #DBC2B0; }
.rs-drawer-section { padding: 0 14px 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #6B3E1E; opacity: 0.75; }
.rs-drawer-signout, .rs-drawer-signout .rs-drawer-icon { color: #DC2626; }
.rs-drawer-signout:hover { background: #FEF2F2; }

/* pinned Book Now */
.rs-drawer-footer {
  flex: 0 0 auto; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid #DBC2B0; background: #fff;
}
.rs-drawer-book {
  display: flex; align-items: center; justify-content: center; height: 52px;
  border-radius: 9999px; font-size: 16px; font-weight: 700; color: #fff; text-decoration: none;
  background: linear-gradient(180deg, #D97706, #B45309); box-shadow: 0 4px 12px rgba(217, 119, 6, 0.35);
}
.rs-drawer-book:hover { filter: brightness(1.08); }

/* loading skeleton (same colour/animation as nav-auth.js's navbar skeleton) */
.rs-skel { background: #d8c8b8; animation: rsDrawerPulse 1.3s ease-in-out infinite; }
.rs-skel-bar { height: 14px; width: 60%; border-radius: 7px; }
@keyframes rsDrawerPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

body.rs-drawer-open { overflow: hidden; }

/* desktop: the desktop navbar is used; nothing of the drawer may show */
@media (min-width: 768px) {
  .rs-burger, .rs-drawer, .rs-drawer-backdrop { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  .rs-drawer, .rs-drawer-backdrop { transition: none; }
  .rs-skel { animation: none; }
}
