/* ============================================================
   guide-shared.css
   Loaded by every guide/list page (resource, recipe, onhand).
   Contains layout primitives, the account bar, auth modal,
   lists drawer, toast, and other chrome that is identical
   across all guide-page families.

   Pages must define these CSS custom properties in an inline
   :root block (values differ per page palette):
     --deep, --mid, --main, --light, --pale, --cream,
     --warm-gray, --text-dark, --radius, --tr,
     --shadow-card, --shadow-hover
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── Mobile/desktop content toggle ── */
#content-desktop { display: block; }
#content-mobile  { display: none;  }
@media screen and (max-width: 668px) {
  #content-desktop { display: none; }
  #content-mobile  { display: block; }
}

/* ── Base page — sticky footer pattern ── */
body { min-height: 100vh; background-color: #faf8f3; display: flex; flex-direction: column; }
body > .page { flex: 1; display: flex; flex-direction: column; }
.site-main { flex: 1; }
.page-content { padding-top: 3.125rem; }
input[type="search"] { color: #000000; }

/* ── Desktop: logo lives in nav, hide stacked branding ── */
@media (min-width: 1025px) {
  .ttm-header-wrap .site-branding { display: none !important; }
}

/* ── Legacy theme compat ── */
.ttm-btn-bgcolor-skincolor:hover { color: #000000 !important; }

/* ══════════════════════════════════════════════════════
   INTRO BANNER
   Pages override ::after (icon glyph/color) and
   __eyebrow colors inline if they differ from defaults.
══════════════════════════════════════════════════════ */
.events-intro {
  background: linear-gradient(135deg, var(--deep) 0%, var(--mid) 100%);
  padding: 3.5rem 0 3rem; position: relative; overflow: hidden;
}
.events-intro::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.events-intro::after {
  content: '\f3c5'; font-family: 'Font Awesome 6 Free'; font-weight: 900;
  position: absolute; right: 5%; top: 50%; transform: translateY(-50%);
  font-size: 12rem; color: rgba(255,255,255,.05); pointer-events: none;
}
.events-intro__inner { position: relative; max-width: 820px; margin: 0 auto; text-align: center; padding: 0 1.5rem; }
.events-intro__eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.22);
  border-radius: 50px; padding: .3rem .95rem;
  font-family: 'DM Sans', sans-serif; font-size: .82rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.85); margin-bottom: 1.1rem;
}
.events-intro h2 {
  font-family: 'Playfair Display', serif; font-size: clamp(1.8rem,4vw,2.7rem);
  font-weight: 700; color: #fff; line-height: 1.2; margin: 0 0 .9rem;
}
.events-intro p {
  font-family: 'DM Sans', sans-serif; font-size: 1.05rem;
  color: rgba(255,255,255,.75); line-height: 1.75; margin: 0 auto; max-width: 640px;
}
.events-intro p em { font-style: italic; color: var(--light); }

/* ══════════════════════════════════════════════════════
   ACCOUNT BAR
══════════════════════════════════════════════════════ */
.acct-bar { background: #fff; border-bottom: 1px solid var(--pale); padding: .5rem 0; font-family: 'DM Sans', sans-serif; }
.acct-bar__inner { display: flex; align-items: center; justify-content: center; gap: .6rem; flex-wrap: wrap; }
.acct-bar__btn {
  display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .9rem;
  border-radius: 50px; border: none; cursor: pointer;
  font-family: 'DM Sans', sans-serif; font-size: .85rem; font-weight: 600; transition: all var(--tr);
}
.acct-bar__btn--outline { background: transparent; border: 1.5px solid var(--light); color: var(--mid) !important; }
.acct-bar__btn--outline:hover { border-color: var(--main); background: var(--pale); }
.acct-bar__btn--solid { background: var(--main); color: #fff !important; }
.acct-bar__btn--solid:hover { background: var(--deep); }
.acct-bar__btn--ghost { background: transparent; border: none; color: var(--warm-gray) !important; font-size: .82rem; }
.acct-bar__btn--ghost:hover { color: var(--main) !important; }
.acct-bar__user { color: var(--text-dark) !important; font-size: .9rem; font-weight: 600; }
.acct-bar__user i { color: var(--main); margin-right: .2rem; }
.acct-badge {
  background: var(--main); color: #fff; border-radius: 50px;
  padding: .05rem .45rem; font-size: .75rem; margin-left: .15rem; font-weight: 700;
}

/* ══════════════════════════════════════════════════════
   AUTH MODAL
   Targets both .modal-box and .hsc-modal-box (dual-classed
   in auth_modal.php) so either naming convention works.
══════════════════════════════════════════════════════ */
#authModal.modal-overlay {
  position: fixed !important; inset: 0 !important; z-index: 9999 !important;
  background: rgba(13,45,69,.55) !important; backdrop-filter: blur(4px) !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  opacity: 0 !important; pointer-events: none !important; transition: opacity .25s !important;
  padding: 1rem !important; overflow: hidden !important;
}
#authModal.modal-overlay.active { opacity: 1 !important; pointer-events: auto !important; }
#authModal .modal-box,
#authModal .hsc-modal-box {
  background: #fff !important; border-radius: 20px !important; width: 100% !important; max-width: 460px !important;
  box-shadow: 0 24px 80px rgba(13,45,69,.25) !important; overflow: hidden !important;
  transform: translateY(24px) scale(.97) !important;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1) !important;
  max-height: 90vh !important; overflow-y: auto !important;
  margin: 0 !important; float: none !important; position: relative !important;
}
#authModal.modal-overlay.active .modal-box,
#authModal.modal-overlay.active .hsc-modal-box { transform: translateY(0) scale(1) !important; }
#authModal .modal-header,
#authModal .hsc-modal-header {
  background: linear-gradient(135deg, var(--deep) 0%, var(--mid) 100%) !important;
  padding: 1.5rem 4rem 1.25rem 1.75rem !important; position: relative !important;
  border-bottom: none !important; border-radius: 0 !important; display: block !important;
}
#authModal .modal-header h3,
#authModal .hsc-modal-header h3 {
  font-family: 'Playfair Display', serif !important; font-size: 1.5rem !important;
  color: #fff !important; margin: 0 0 .25rem !important; padding: 0 !important;
  border: none !important; line-height: 1.3 !important;
}
#authModal .modal-header p,
#authModal .hsc-modal-header p {
  font-family: 'DM Sans', sans-serif !important; font-size: .9rem !important;
  color: rgba(255,255,255,.75) !important; margin: 0 !important; padding: 0 !important; line-height: 1.4 !important;
}
#authModal .modal-close,
#authModal .hsc-modal-close {
  position: absolute !important; top: 1rem !important; right: 1rem !important;
  background: rgba(255,255,255,.18) !important; border: none !important; color: #fff !important;
  width: 30px !important; height: 30px !important; border-radius: 50% !important; cursor: pointer !important;
  font-size: .85rem !important; display: flex !important; align-items: center !important; justify-content: center !important;
  transition: background var(--tr) !important; padding: 0 !important; line-height: 1 !important;
  box-shadow: none !important; opacity: 1 !important;
}
#authModal .modal-close:hover,
#authModal .hsc-modal-close:hover { background: rgba(255,255,255,.35) !important; }
#authModal .modal-body,
#authModal .hsc-modal-body { padding: 1.5rem 1.75rem !important; }

/* Auth modal form internals */
.modal-form { display: none !important; }
.modal-form.active { display: block !important; }
.modal-field { margin-bottom: 1rem !important; }
.modal-field label {
  display: block !important; font-family: 'DM Sans', sans-serif !important; font-size: .88rem !important;
  font-weight: 700 !important; color: var(--mid) !important; margin-bottom: .35rem !important;
  letter-spacing: .06em !important; text-transform: uppercase !important;
}
.modal-field input {
  width: 100% !important; box-sizing: border-box !important; padding: .65rem 1rem !important;
  border: 2px solid var(--light) !important; border-radius: 10px !important;
  font-family: 'DM Sans', sans-serif !important; font-size: .98rem !important;
  color: var(--text-dark) !important; background: #fff !important;
  outline: none !important; transition: border-color var(--tr) !important;
  box-shadow: none !important; height: auto !important;
}
.modal-field input:focus { border-color: var(--main) !important; box-shadow: 0 0 0 3px rgba(41,128,185,.12) !important; }
.modal-submit {
  width: 100% !important; padding: .75rem !important; background: var(--main) !important;
  color: #fff !important; border: none !important; border-radius: 50px !important; cursor: pointer !important;
  font-family: 'DM Sans', sans-serif !important; font-weight: 700 !important; font-size: 1.02rem !important;
  letter-spacing: .04em !important; transition: background var(--tr) !important;
  margin-top: .25rem !important; box-shadow: none !important; outline: none !important;
  display: block !important; text-align: center !important;
}
.modal-submit:hover { background: var(--deep) !important; }
.modal-msg {
  font-family: 'DM Sans', sans-serif !important; font-size: .92rem !important;
  padding: .6rem .9rem !important; border-radius: 8px !important; margin-bottom: .85rem !important; display: none !important;
}
.modal-msg.error   { background: #fde8e8 !important; color: #b91c1c !important; display: block !important; }
.modal-msg.success { background: #d1fae5 !important; color: #065f46 !important; display: block !important; }

/* ══════════════════════════════════════════════════════
   BOOKMARK TOOLTIP  (shared across res + recipe cards)
══════════════════════════════════════════════════════ */
.bm-tooltip {
  position: absolute !important; bottom: calc(100% + 6px) !important; left: 50% !important;
  transform: translateX(-50%) !important; background: var(--deep) !important; color: #fff !important;
  font-family: 'DM Sans', sans-serif !important; font-size: .75rem !important;
  white-space: nowrap !important; padding: .22rem .55rem !important; border-radius: 6px !important;
  pointer-events: none !important; opacity: 0 !important; transition: opacity .18s !important; z-index: 10 !important;
  display: block !important;
}

/* ══════════════════════════════════════════════════════
   LIST PICKER  (add-to-list popup, shared across pages)
══════════════════════════════════════════════════════ */
.list-picker {
  position: absolute; bottom: calc(100% + 8px); right: 0;
  background: #fff; border: 1.5px solid var(--light); border-radius: 12px;
  box-shadow: 0 8px 32px rgba(13,45,69,.18);
  padding: .65rem .75rem; min-width: 210px; z-index: 200;
  display: none; flex-direction: column; gap: .3rem; font-family: 'DM Sans', sans-serif;
}
.list-picker.open { display: flex; }
.list-picker__head {
  font-size: .78rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--mid); margin-bottom: .2rem; padding-bottom: .35rem; border-bottom: 1px solid var(--pale);
}
.list-picker__item {
  display: flex; align-items: center; gap: .5rem; padding: .3rem .4rem;
  border-radius: 7px; cursor: pointer; transition: background var(--tr); font-size: .88rem; color: var(--text-dark);
}
.list-picker__item:hover { background: var(--pale); }
.list-picker__item i { color: var(--main); font-size: .75rem; width: 14px; text-align: center; }
.list-picker__item.in-list { font-weight: 600; color: var(--main); }
.list-picker__empty { font-size: .85rem; color: var(--warm-gray); padding: .2rem .4rem; }
.list-picker__new-btn {
  margin-top: .3rem; padding: .35rem .5rem; border-radius: 7px;
  border: 1.5px dashed var(--light); background: none; cursor: pointer;
  font-family: 'DM Sans', sans-serif; font-size: .85rem; color: var(--mid);
  display: flex; align-items: center; gap: .4rem; transition: all var(--tr); width: 100%;
}
.list-picker__new-btn:hover { border-color: var(--main); color: var(--main); background: var(--pale); }

/* ══════════════════════════════════════════════════════
   MY LISTS DRAWER
══════════════════════════════════════════════════════ */
.lists-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 400px; max-width: 96vw;
  background: #fff; box-shadow: -6px 0 40px rgba(13,45,69,.18);
  z-index: 9998; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .35s cubic-bezier(.4,0,.2,1);
}
.lists-drawer.open { transform: translateX(0); }
.lists-drawer__header {
  background: linear-gradient(135deg, var(--deep) 0%, var(--mid) 100%);
  padding: 1.4rem 1.5rem 1.1rem; display: flex; align-items: flex-start; justify-content: space-between;
}
.lists-drawer__header h3 { font-family: 'Playfair Display', serif; color: #fff; font-size: 1.25rem; margin: 0 0 .2rem; }
.lists-drawer__header p  { font-family: 'DM Sans', sans-serif; font-size: .82rem; color: rgba(255,255,255,.65); margin: 0; }
.lists-drawer__close {
  background: rgba(255,255,255,.15); border: none; color: #fff;
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: .9rem;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-left: 1rem;
  transition: background var(--tr);
}
.lists-drawer__close:hover { background: rgba(255,255,255,.3); }
.lists-drawer__body { flex: 1; overflow-y: auto; padding: 1.25rem 1.5rem; scrollbar-width: thin; scrollbar-color: var(--light) transparent; }
.lists-drawer__tabs { display: flex; background: var(--pale); border-radius: 50px; padding: 3px; margin-bottom: 1.2rem; gap: 3px; }
.lists-drawer__tab {
  flex: 1; text-align: center; padding: .4rem; border-radius: 50px; border: none; cursor: pointer;
  font-family: 'DM Sans', sans-serif; font-size: .88rem; font-weight: 600;
  background: transparent; color: var(--warm-gray) !important; transition: all var(--tr);
}
.lists-drawer__tab.active { background: var(--main); color: #fff !important; }
.lists-panel { display: none; }
.lists-panel.active { display: block; }

.new-list-form { display: flex; gap: .5rem; margin-bottom: 1.1rem; }
.new-list-form input {
  flex: 1; padding: .5rem .85rem; border: 2px solid var(--light); border-radius: 50px;
  font-family: 'DM Sans', sans-serif; font-size: .88rem; color: var(--text-dark);
  outline: none; transition: border-color var(--tr);
}
.new-list-form input:focus { border-color: var(--main); }
.new-list-form button {
  padding: .5rem 1rem; background: var(--main); color: #fff; border: none; border-radius: 50px;
  cursor: pointer; font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: .85rem;
  white-space: nowrap; transition: background var(--tr);
}
.new-list-form button:hover { background: var(--deep); }

.list-item {
  background: var(--pale); border: 1.5px solid var(--light); border-radius: 12px;
  padding: .85rem 1rem; margin-bottom: .65rem; cursor: pointer;
  transition: all var(--tr); position: relative;
}
.list-item:hover { border-color: var(--main); background: #e0f0fa; }
.list-item.active-list { border-color: var(--main); background: #d0e8f7; }
.list-item__name { font-family: 'DM Sans', sans-serif; font-weight: 700; font-size: .92rem; color: var(--deep) !important; margin: 0 0 .15rem; }
.list-item__meta { font-family: 'DM Sans', sans-serif; font-size: .78rem; color: var(--warm-gray) !important; }
.list-item__del {
  position: absolute; top: .5rem; right: .6rem; background: none; border: none;
  color: #ccc; cursor: pointer; font-size: .8rem; padding: .2rem .35rem;
  border-radius: 6px; transition: all var(--tr);
}
.list-item__del:hover { color: #b91c1c; background: #fde8e8; }

.list-resource { display: flex; align-items: flex-start; gap: .65rem; padding: .7rem 0; border-bottom: 1px solid var(--pale); }
.list-resource:last-child { border-bottom: none; }
.list-resource__icon {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  background: var(--pale); display: flex; align-items: center; justify-content: center;
  color: var(--main); font-size: .85rem;
}
.list-resource__info { flex: 1; min-width: 0; }
.list-resource__name { font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: .88rem; color: var(--deep) !important; margin: 0 0 .1rem; }
.list-resource__type { font-family: 'DM Sans', sans-serif; font-size: .75rem; color: var(--warm-gray) !important; }
.list-resource__rm {
  background: none; border: none; color: #ccc; cursor: pointer; font-size: .78rem;
  padding: .2rem .35rem; border-radius: 6px; transition: all var(--tr); flex-shrink: 0;
}
.list-resource__rm:hover { color: #b91c1c; background: #fde8e8; }

.drawer-empty { text-align: center; padding: 2.5rem 1rem; font-family: 'DM Sans', sans-serif; color: var(--warm-gray); }
.drawer-empty i { font-size: 2rem; color: var(--light); display: block; margin-bottom: .6rem; }

/* ── Toast notification ── */
.res-toast {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--deep); color: #fff; font-family: 'DM Sans', sans-serif;
  font-size: .88rem; font-weight: 600; padding: .6rem 1.4rem;
  border-radius: 50px; box-shadow: 0 6px 24px rgba(13,45,69,.25);
  opacity: 0; pointer-events: none; transition: all .3s; z-index: 99999; white-space: nowrap;
}
.res-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Drawer backdrop ── */
.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(13,45,69,.35);
  z-index: 9997; opacity: 0; pointer-events: none; transition: opacity .3s;
}
.drawer-backdrop.active { opacity: 1; pointer-events: auto; }

/* ── Card entry animation (was referenced but never defined — fixed here) ── */
@keyframes resFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Recipe / onhand empty state ── */
.rec-empty { padding: 4rem 2rem; text-align: center; font-family: 'DM Sans', sans-serif; color: var(--warm-gray); display: flex; flex-direction: column; align-items: center; }
.rec-empty i { font-size: 2.8rem; color: var(--light); margin-bottom: .7rem; }
