/* Bagdad account gate
   Desktop: centered split card (brand + form), like a retail sign-in page.
   Phone: bottom sheet with a compact brand strip.
   Inspired by clear retail account flows (Well Food drawer clarity,
   Daraz form focus, Apex simple Sign in, Bata account chip). */

.account-modal{
  position:fixed;
  inset:0;
  z-index:10050;
  display:none;
  align-items:center;
  justify-content:center;
  padding:max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  background:rgba(12, 24, 18, .62);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}
.account-modal.is-open{display:flex}
body.signin-open{overflow:hidden}

.account-modal-card{
  position:relative;
  width:min(880px, 100%);
  max-height:min(760px, calc(100dvh - 32px));
  margin:0;
  display:grid;
  grid-template-columns:minmax(240px, 300px) minmax(0, 1fr);
  overflow:auto;
  border:0;
  border-radius:22px;
  background:#fff;
  box-shadow:0 28px 70px rgba(0,0,0,.28);
  animation:bbfAuthIn .22s ease;
}
@keyframes bbfAuthIn{
  from{transform:translateY(10px) scale(.985); opacity:.7}
  to{transform:none; opacity:1}
}

.wf-brand-pane{
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(240,215,164,.28), transparent 55%),
    linear-gradient(165deg, #0b8a45 0%, #087f3e 42%, #123b29 100%);
  color:#fff;
  padding:32px 26px;
  display:flex;
  flex-direction:column;
  gap:14px;
  min-height:100%;
}
.wf-brand-lockup{
  display:flex;
  align-items:center;
  gap:10px;
}
.wf-brand-lockup img{
  width:52px;
  height:52px;
  border-radius:50%;
  object-fit:cover;
  border:2px solid rgba(255,255,255,.7);
  background:#fff;
}
.wf-brand-lockup strong{display:block; font-size:14px; letter-spacing:.01em}
.wf-brand-lockup small{display:block; opacity:.82; font-size:11px; letter-spacing:.08em; text-transform:uppercase}
.wf-brand-pane h3{
  margin:8px 0 0;
  font:700 28px/1.15 "Playfair Display", Georgia, serif;
}
.wf-brand-pane p{margin:0; color:rgba(255,255,255,.88); font-size:14px; line-height:1.5}
.wf-brand-pane ul{
  list-style:none;
  margin:8px 0 0;
  padding:0;
  display:grid;
  gap:10px;
}
.wf-brand-pane li{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:13px;
  font-weight:700;
}
.wf-brand-pane li::before{
  content:"";
  width:18px;
  height:18px;
  flex:0 0 18px;
  border-radius:50%;
  background:rgba(255,255,255,.16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l5 5L19 7'/%3E%3C/svg%3E") center/12px no-repeat;
}

.wf-form-pane, #authPanel{
  padding:28px 32px 26px;
  min-width:0;
}
.account-modal-card > #authPanel{grid-column:2}
.wf-eyebrow{
  margin:0 0 6px;
  color:#087f3e;
  font-size:11px;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
}
.wf-signin-title{
  margin:0 0 6px;
  font:700 30px/1.1 "Playfair Display", Georgia, serif;
  color:#17351f;
  letter-spacing:-.02em;
}
.account-muted{
  display:block;
  margin:0 0 16px;
  color:#667068;
  font-size:14px;
}
.account-brand{display:none}
.account-security{display:block; margin:14px 0 0; color:#7b877f; font-size:12px}

.account-tabs{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:6px;
  margin:0 0 16px;
  padding:4px;
  background:#f4f7f5;
  border-radius:12px;
}
.account-tabs button{
  min-height:40px;
  border:0;
  border-radius:9px;
  background:transparent;
  color:#536057;
  font-weight:800;
  cursor:pointer;
}
.account-tabs button.active{
  background:#fff;
  color:#087f3e;
  box-shadow:0 2px 8px rgba(16,49,32,.08);
}

.wf-field, .account-field{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:6px;
  margin:0 0 14px;
  width:100%;
}
.wf-field label, .account-field label{
  display:block;
  width:100%;
  margin:0;
  color:#17351f;
  font-size:13px;
  font-weight:800;
}
.wf-req{color:#c0392b}
.wf-field input, .account-field input, .account-field textarea, .wf-pass input{
  display:block;
  width:100%;
  max-width:100%;
  min-height:48px;
  box-sizing:border-box;
  border:1px solid #d7e0da;
  border-radius:12px;
  background:#fbfcfb;
  padding:12px 14px;
  font:inherit;
  font-size:16px;
  color:#111;
  transition:border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.wf-field input:focus, .account-field input:focus, .account-field textarea:focus{
  outline:none;
  border-color:#087f3e;
  background:#fff;
  box-shadow:0 0 0 4px rgba(8,127,62,.12);
}
.wf-pass{position:relative}
.wf-pass input{padding-right:72px}
.wf-eye{
  position:absolute;
  right:8px;
  bottom:8px;
  min-width:54px;
  height:32px;
  border:0;
  background:#eef6f1;
  color:#087f3e;
  border-radius:8px;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
}
.wf-login, #emailLoginForm .wf-login, .account-primary-btn{
  width:100%;
  min-height:50px;
  margin-top:4px;
  border:0;
  border-radius:12px;
  background:linear-gradient(135deg, #0a9a4b 0%, #087f3e 60%, #066c34 100%);
  color:#fff;
  font-weight:800;
  letter-spacing:.04em;
  font-size:15px;
  cursor:pointer;
  box-shadow:0 8px 18px rgba(8,127,62,.24);
}
.wf-login:hover, .account-primary-btn:hover{filter:brightness(1.05)}
.wf-login:disabled, .wf-google:disabled, .wf-apple:disabled{opacity:.65; cursor:wait}
.wf-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:12px 0 4px;
  font-size:13px;
}
.wf-remember{display:flex; align-items:center; gap:8px; color:#333; font-weight:600}
.wf-remember input{width:16px; height:16px; accent-color:#087f3e}
.wf-lost{
  border:0;
  background:transparent;
  color:#087f3e;
  font-weight:800;
  cursor:pointer;
  padding:0;
}
.wf-or{
  display:flex;
  align-items:center;
  gap:12px;
  color:#8a948e;
  font-size:11px;
  font-weight:800;
  letter-spacing:.12em;
  margin:16px 0 12px;
}
.wf-or::before, .wf-or::after{content:""; flex:1; height:1px; background:#e6eee8}
.wf-social{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}
.wf-google, .wf-apple, .wf-more button{
  width:100%;
  min-height:46px;
  border:1px solid #e1e8e3;
  background:#fff;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  font-weight:800;
  font-size:13px;
  cursor:pointer;
  color:#17351f;
}
.wf-google:hover, .wf-apple:hover{border-color:#087f3e; background:#f7fbf8}
.wf-google svg, .wf-google img{width:18px; height:18px; flex:0 0 18px}
.wf-apple::before{
  content:"";
  width:16px;
  height:16px;
  background:#111;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M16.4 12.6c0-2.3 1.9-3.4 2-3.5-1.1-1.6-2.8-1.8-3.4-1.8-1.4-.2-2.8.8-3.5.8s-1.8-.8-3-.8c-1.5 0-3 .9-3.8 2.3-1.6 2.8-.4 7 1.2 9.3.8 1.1 1.7 2.3 2.9 2.3 1.2 0 1.6-.7 3-.7s1.8.7 3 .7 2-1.1 2.8-2.2c.9-1.3 1.2-2.5 1.3-2.6-.1 0-2.5-1-2.5-3.8zM14.7 6.5c.6-.8 1.1-1.9.9-3-1 .1-2.1.7-2.8 1.5-.6.7-1.2 1.8-1 2.9 1.1.1 2.2-.5 2.9-1.4z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M16.4 12.6c0-2.3 1.9-3.4 2-3.5-1.1-1.6-2.8-1.8-3.4-1.8-1.4-.2-2.8.8-3.5.8s-1.8-.8-3-.8c-1.5 0-3 .9-3.8 2.3-1.6 2.8-.4 7 1.2 9.3.8 1.1 1.7 2.3 2.9 2.3 1.2 0 1.6-.7 3-.7s1.8.7 3 .7 2-1.1 2.8-2.2c.9-1.3 1.2-2.5 1.3-2.6-.1 0-2.5-1-2.5-3.8zM14.7 6.5c.6-.8 1.1-1.9.9-3-1 .1-2.1.7-2.8 1.5-.6.7-1.2 1.8-1 2.9 1.1.1 2.2-.5 2.9-1.4z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.wf-more{display:contents}
.wf-switch{
  margin:16px 0 0;
  text-align:center;
  color:#667068;
  font-size:14px;
}
.wf-switch button{
  border:0;
  background:transparent;
  color:#087f3e;
  font-weight:800;
  cursor:pointer;
  text-decoration:underline;
}
.account-status{margin:10px 0 0; font-size:13px; color:#087f3e; min-height:1.2em}
.account-status.error{color:#b42318}
.account-close{
  position:absolute;
  top:14px;
  right:14px;
  z-index:2;
  width:36px;
  height:36px;
  border:0;
  border-radius:50%;
  background:rgba(255,255,255,.92);
  color:#17351f;
  font-size:0;
  cursor:pointer;
  box-shadow:0 2px 8px rgba(0,0,0,.12);
}
.account-close::before{
  content:"×";
  font-size:22px;
  line-height:36px;
  font-weight:500;
}
.account-modal-card #profilePanel{display:block; padding:28px 32px}
.account-modal-card #profilePanel[hidden]{display:none}
.account-profile-head, .profile-photo-row, .account-logout{display:flex}

/* Header sign-in chip — always tappable, never pushes the logo off-screen */
.wf-header-signin{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:40px;
  max-width:148px;
  padding:0 16px 0 12px;
  border:1.5px solid rgba(8,127,62,.55);
  border-radius:999px;
  background:transparent;
  color:#087f3e;
  font:800 14px/1 Inter, Arial, sans-serif;
  letter-spacing:.01em;
  white-space:nowrap;
  cursor:pointer;
  box-shadow:none;
  -webkit-tap-highlight-color:transparent;
  transition:background .18s ease, border-color .18s ease, color .18s ease;
}
.wf-header-signin:not(:has(.account-mini-avatar))::before{
  content:"";
  width:18px;
  height:18px;
  flex:0 0 auto;
  background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4.4 3.6-7 8-7s8 2.6 8 7'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4.4 3.6-7 8-7s8 2.6 8 7'/%3E%3C/svg%3E") center/contain no-repeat;
}
.wf-header-signin:hover{
  background:rgba(8,127,62,.08);
  border-color:#087f3e;
  color:#066c34;
  filter:none;
  transform:none;
}
.wf-header-signin:active{background:rgba(8,127,62,.14); transform:scale(.98)}
.wf-header-signin:focus-visible{outline:3px solid #c9974b; outline-offset:3px}
.wf-header-signin:has(.account-mini-avatar){
  max-width:168px;
  padding:0 12px 0 5px;
  background:transparent;
  color:#17351f;
  border:1.5px solid rgba(8,127,62,.4);
  box-shadow:none;
}
.account-mini-avatar{
  width:30px;
  height:30px;
  border-radius:50%;
  display:inline-grid;
  place-items:center;
  background:#087f3e;
  color:#fff;
  font-size:13px;
  font-weight:800;
  overflow:hidden;
}
.account-mini-avatar img{width:100%; height:100%; object-fit:cover}
.account-login-label, .account-name-label{
  overflow:hidden;
  text-overflow:ellipsis;
}

.header-main{min-width:0}
.header-actions{flex:0 0 auto; margin-left:auto}
.logo-wrap{min-width:0}
.foods-banner{max-width:min(34vw, 210px)}

@media (max-width: 760px){
  .account-modal{align-items:flex-end; padding:0}
  .account-modal-card{
    width:100%;
    max-height:94dvh;
    grid-template-columns:1fr;
    border-radius:20px 20px 0 0;
  }
  .wf-brand-pane{min-height:0; padding:18px 16px 8px; gap:8px}
  .wf-brand-pane h3{font-size:22px; margin:0}
  .wf-brand-pane p, .wf-brand-pane ul{display:none}
  .wf-form-pane, #authPanel, .account-modal-card #profilePanel{padding:8px 16px 22px}
  .account-modal-card > #authPanel{grid-column:1}
  .wf-signin-title{font-size:26px}
  .wf-social{grid-template-columns:1fr}
  .account-close{top:10px; right:10px}
  .wf-header-signin{min-height:40px; max-width:118px; padding:0 12px 0 10px; font-size:13px; gap:6px}
  .wf-header-signin:not(:has(.account-mini-avatar))::before{width:16px; height:16px}
}
@media (max-width: 420px){
  .wf-header-signin{width:42px; max-width:42px; padding:0; border-radius:12px}
  .wf-header-signin .account-login-label{position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0)}
  .wf-header-signin:has(.account-mini-avatar){width:auto; max-width:42px; padding:0; border-radius:12px}
  .wf-header-signin .account-name-label{display:none}
}
@media (prefers-reduced-motion: reduce){
  .account-modal-card, .wf-header-signin{animation:none; transition:none}
  .wf-header-signin:hover{transform:none}
}

/* Dedicated sign-in page */
body.signin-page{background:#f6f3ec}
body.signin-page .signin-stage{
  min-height:calc(100dvh - 180px);
  display:grid;
  place-items:center;
  padding:28px 16px 48px;
}
body.signin-page .account-modal{
  position:static;
  display:flex;
  background:transparent;
  backdrop-filter:none;
  padding:0;
}
body.signin-page .account-modal-card{box-shadow:0 18px 50px rgba(23,53,31,.12)}
