/* Customer account: header icon + dropdown, popups (login / OTP / password),
   and the حسابي profile card. Colours come from the theme tokens, so light and
   dark mode both follow the site instead of a hard-coded white box. */

/* ---- header icon + dropdown ---- */
.acct{position:relative;display:inline-flex}
.acct-btn{width:38px;height:38px;border-radius:50%;border:1px solid var(--border);background:transparent;color:var(--heading);
  display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:.2s;padding:0}
.acct-btn:hover,.acct-btn[aria-expanded="true"]{border-color:var(--teal);color:var(--teal-text)}
.acct-btn.is-in{background:var(--btn-bg,var(--teal));border-color:var(--btn-bg,var(--teal));color:var(--btn-fg,#fff)}
.acct-btn.is-in:hover{filter:brightness(.94);color:#fff}
.acct-menu{position:absolute;top:calc(100% + 10px);inset-inline-end:0;z-index:60;width:300px;max-width:calc(100vw - 24px);
  background:var(--surface);color:var(--ink);border:1px solid var(--border);border-radius:16px;
  box-shadow:0 18px 44px rgba(0,0,0,.18);padding:10px;animation:acct-in .18s ease-out}
.acct-menu[hidden]{display:none}
@keyframes acct-in{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}
.acct-menu > a{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:10px;font-weight:600;color:var(--ink)}
.acct-menu > a:hover{background:rgba(var(--teal-rgb),.12);color:var(--teal-text)}
.acct-menu .acct-out{border-top:1px solid var(--border);border-radius:0 0 10px 10px;margin-top:4px;color:#c0392b}
.acct-hello{padding:8px 12px 10px;display:flex;flex-direction:column;border-bottom:1px solid var(--border);margin-bottom:4px}
.acct-hello small{color:var(--muted);text-align:start}
.acct-panel{padding:6px}
@media(max-width:820px){
  .acct{position:static}
  .acct-menu{position:absolute;inset-inline:12px;top:100%;width:auto}
}

/* ---- popup ---- */
.tz-modal-ov{position:fixed;inset:0;background:rgba(0,0,0,.55);z-index:99999;display:flex;align-items:center;
  justify-content:center;padding:20px;animation:acct-fade .15s ease-out}
@keyframes acct-fade{from{opacity:0}to{opacity:1}}
.tz-modal{background:var(--surface);color:var(--ink);border:1px solid var(--border);max-width:390px;width:100%;
  border-radius:18px;padding:24px;box-shadow:0 20px 60px rgba(0,0,0,.35);font-family:inherit}

/* ---- shared panel content (popup, dropdown, account page) ---- */
.tz-m-title{font-size:18px;font-weight:800;margin-bottom:6px;color:var(--heading)}
.tz-m-sub{color:var(--muted);font-size:13.5px;margin-bottom:14px;line-height:1.7}
.tz-m-sub b{color:var(--ink)}
.tz-m-note{color:var(--muted);font-size:12.5px;margin:2px 0 10px;line-height:1.6}
.tz-m-note:empty{display:none}
.tz-m-err{color:#d0453a;font-size:13px;min-height:18px;margin:2px 0 8px}
.tz-m-err.ok{color:var(--teal-text)}
:root[data-theme="dark"] .tz-m-err{color:#ff8a80}
.tz-m-main{width:100%;justify-content:center;padding:13px}
.tz-m-main.is-busy{opacity:.7;cursor:progress}
.tz-m-link{display:block;width:100%;background:none;border:0;color:var(--teal-text);padding:10px 6px 4px;cursor:pointer;
  font:inherit;font-size:13.5px;font-weight:700}
.tz-m-link:hover{text-decoration:underline}
.tz-m-muted{color:var(--muted);font-weight:600;padding-top:4px}
.tz-modal .field,.acct-menu .field,.acct-page-login .field{margin-bottom:10px;color:var(--ink);background:var(--surface)}
:root[data-theme="dark"] .tz-modal .field,:root[data-theme="dark"] .acct-menu .field{background:#151a18}
.tz-phone-row{display:flex;gap:8px}
.tz-phone-row select{width:auto;max-width:132px;flex:0 0 auto}
.tz-phone-row input{flex:1;min-width:0}
.tz-code{text-align:center;font-size:26px;letter-spacing:10px;font-weight:800;padding:12px}

/* ---- حسابي ---- */
.acct-page-login{max-width:420px;margin:10px auto;padding:22px}
.acct-profile{display:flex;align-items:center;gap:16px;padding:18px 20px;flex-wrap:wrap;margin-bottom:8px}
.acct-avatar{width:56px;height:56px;border-radius:50%;background:linear-gradient(135deg,var(--deep),var(--teal));color:#fff;
  display:flex;align-items:center;justify-content:center;font-size:24px;font-weight:800;flex:0 0 auto}
.acct-info{display:flex;flex-direction:column;flex:1;min-width:180px}
.acct-info b{font-size:18px;color:var(--heading)}
.acct-info span[dir="ltr"]{text-align:start}
.acct-user-note{font-size:12.5px}
.acct-actions{display:flex;gap:10px;flex-wrap:wrap}
#orders,#appointments{scroll-margin-top:90px}
.card .tag{background:rgba(var(--teal-rgb),.14);color:var(--teal-text);padding:2px 10px;border-radius:20px;font-size:12.5px;font-weight:700}

/* Fixed country code (Kuwait only): reads like part of the phone field. */
.cc-fixed{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;padding:0 14px;align-self:stretch;min-height:44px;
  margin-bottom:12px;border:1px solid var(--border);border-radius:12px;background:rgba(var(--teal-rgb),.08);
  color:var(--ink);font-weight:800;font-size:15px;letter-spacing:.3px}
.tz-phone-row .cc-fixed{margin-bottom:10px}

/* حسابي: collapsible طلباتي / حجوزاتي — click the row, the arrow turns, the history opens. */
.acct-sec{padding:0;margin:14px 0;overflow:hidden}
.acct-sec > summary{list-style:none;display:flex;align-items:center;gap:10px;padding:14px 18px;cursor:pointer;user-select:none}
.acct-sec > summary::-webkit-details-marker{display:none}
.acct-sec > summary .grp-title{margin:0;flex:1;font-size:18px}
.acct-count{min-width:28px;height:24px;padding:0 8px;border-radius:12px;background:rgba(var(--teal-rgb),.14);color:var(--teal-text);
  font-weight:800;font-size:13px;display:inline-flex;align-items:center;justify-content:center}
.acct-arrow{width:30px;height:30px;border-radius:50%;border:1px solid var(--border);display:inline-flex;align-items:center;justify-content:center;
  transition:transform .25s ease,background .2s}
.acct-arrow::before{content:"";width:8px;height:8px;border-right:2px solid var(--heading);border-bottom:2px solid var(--heading);
  transform:translateY(-2px) rotate(45deg)}
.acct-sec > summary:hover .acct-arrow{background:rgba(var(--teal-rgb),.12)}
.acct-sec[open] > summary .acct-arrow{transform:rotate(180deg)}
.acct-sec[open] > summary{border-bottom:1px solid var(--border)}
.acct-sec-body{padding:12px 18px 6px;animation:acct-in .2s ease-out}
.acct-item{border:1px solid var(--border);border-radius:14px;padding:14px 16px;margin-bottom:12px;background:var(--surface)}
.acct-item-head{display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px}

/* Code screen: live status under the input + spinner; locked buttons look locked. */
.tz-m-status{font-size:13px;min-height:20px;margin:0 0 4px;display:flex;align-items:center;gap:8px;color:var(--muted)}
.tz-m-status.is-ok{color:var(--teal-text);font-weight:700}
.tz-m-loading{display:flex;align-items:center;justify-content:center;gap:10px;padding:26px 0;color:var(--muted);font-weight:700}
.tz-spin{width:16px;height:16px;border-radius:50%;border:2px solid rgba(var(--teal-rgb),.25);border-top-color:var(--teal);
  animation:tz-spin .8s linear infinite;flex:0 0 auto}
@keyframes tz-spin{to{transform:rotate(360deg)}}
.tz-m-link:disabled{color:var(--muted);cursor:default;text-decoration:none;font-weight:600}
.btn:disabled,.btn[disabled]{opacity:.6;cursor:not-allowed;filter:none}
.tz-code:disabled{opacity:.5}

/* Demo sites: the code shown in place of a WhatsApp message. */
.tz-m-status.is-demo{display:block;background:rgba(var(--gold-rgb,194,167,94),.16);border:1px dashed var(--gold);
  color:var(--ink);border-radius:10px;padding:8px 10px;font-size:13px;line-height:1.7}
.tz-m-status.is-demo b{font-size:17px;letter-spacing:3px}
