/* BOOKDIT App — navy and white only. */
:root {
  --bd-navy: #111E48;
  --bd-navy-90: #26335c;
  --bd-line: #dfe3ee;
  --bd-soft: #f3f5fa;
  --bd-safe: env(safe-area-inset-bottom, 0px);
}

/* ---------- Buttons ---------- */
.bdapp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--bd-navy); color: #fff !important; border: 2px solid var(--bd-navy);
  border-radius: 999px; padding: 13px 26px; font: inherit; font-weight: 700; font-size: 16px; line-height: 1.2;
  text-decoration: none !important; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform .15s ease, background .15s ease;
}
.bdapp-btn:active { transform: scale(.97); }
.bdapp-btn:disabled { opacity: .6; }
.bdapp-btn--line { background: #fff; color: var(--bd-navy) !important; }
.bdapp-btn--sm { padding: 9px 16px; font-size: 14px; }
.bdapp-link { background: none; border: 0; padding: 8px 0; color: var(--bd-navy); font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; }
[hidden] { display: none !important; }

/* ---------- App mode ---------- */
html.bdapp-has-tabs body { padding-bottom: calc(74px + var(--bd-safe)) !important; }
html.bdapp-standalone { -webkit-tap-highlight-color: transparent; }
html.bdapp-standalone body { overscroll-behavior-y: none; }
html.bdapp-has-tabs .et_pb_scroll_top { bottom: calc(84px + var(--bd-safe)) !important; }

/* One bottom bar only: the app's tabs replace the theme's quick links for logged-in members. */
html.bdapp-has-tabs nav.tabbar { display: none !important; }
html.bdapp-standalone nav.tabbar { bottom: calc(10px + var(--bd-safe)) !important; }
html.bdapp-theme-tabs body { padding-bottom: calc(84px + var(--bd-safe)) !important; }

/* App screens: compact page header, no breadcrumb, no supplier/client switch for members. */
html.bdapp-standalone .ph-head { padding-top: 22px !important; padding-bottom: 22px !important; }
html.bdapp-standalone .ph-head .crumb { display: none !important; }
html.bdapp-standalone .ph-head h1 { font-size: 26px !important; line-height: 1.15 !important; margin: 0 !important; }
html.bdapp-standalone.bdapp-in .aud { display: none !important; }

/* App screens: the long website footer becomes one tidy line. */
html.bdapp-standalone footer.foot { display: none !important; }
.bdapp-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; padding: 22px 20px 26px; font-size: 13px; }
.bdapp-legal a { color: #5a6584 !important; text-decoration: none !important; font-weight: 600; }

header.nav .menu-btn.bdapp-menu-right { margin-left: auto !important; }

/* Cookie notice sits above the bottom bar, not under it. */
html.bdapp-standalone .bd-ck { bottom: calc(90px + var(--bd-safe)) !important; }

.bdapp-tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; /* above the page, below the menu drawer */
  display: flex; justify-content: space-around; align-items: stretch;
  background: #fff; border-top: 1px solid var(--bd-line);
  padding: 6px 4px calc(6px + var(--bd-safe));
  box-shadow: 0 -6px 24px rgba(17, 30, 72, .08);
}
.bdapp-tab {
  flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 4px 2px; color: #5a6584 !important; text-decoration: none !important;
  font-size: 11px; font-weight: 600; line-height: 1.1; letter-spacing: .01em;
}
.bdapp-tab__ico { position: relative; display: flex; align-items: center; justify-content: center; width: 52px; height: 30px; border-radius: 999px; transition: background .2s ease; }
.bdapp-tab.is-active { color: var(--bd-navy) !important; }
.bdapp-tab.is-active .bdapp-tab__ico { background: var(--bd-navy); color: #fff; }
.bdapp-tab__label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.bdapp-badge {
  position: absolute; top: -3px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box;
  border-radius: 999px; background: #fff; color: var(--bd-navy); border: 2px solid var(--bd-navy);
  font-size: 10px; font-weight: 800; line-height: 14px; text-align: center;
}
.bdapp-tab.is-active .bdapp-badge { border-color: #fff; }

/* ---------- Install banner + alerts nudge ---------- */
.bdapp-banner {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + var(--bd-safe)); z-index: 55; max-width: 520px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px; padding: 12px 10px 12px 12px;
  background: var(--bd-navy); color: #fff; border-radius: 18px;
  box-shadow: 0 12px 32px rgba(17, 30, 72, .35);
  animation: bdapp-up .35s cubic-bezier(.2, .8, .2, 1);
}
.bdapp-banner img { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.bdapp-banner__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; line-height: 1.35; }
.bdapp-banner__txt strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bdapp-banner__txt span { opacity: .85; }
.bdapp-banner .bdapp-btn { background: #fff; color: var(--bd-navy) !important; border-color: #fff; flex: none; }
.bdapp-banner__x { background: none; border: 0; color: #fff; opacity: .7; font-size: 24px; line-height: 1; padding: 4px 6px; cursor: pointer; flex: none; }
@keyframes bdapp-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- How-to sheet ---------- */
.bdapp-sheet {
  position: fixed; inset: 0; z-index: 99999; background: rgba(17, 30, 72, .55);
  display: flex; align-items: flex-end; justify-content: center;
}
.bdapp-sheet__panel {
  width: 100%; max-width: 480px; background: #fff; color: var(--bd-navy);
  border-radius: 24px 24px 0 0; padding: 24px 24px calc(24px + var(--bd-safe)); box-sizing: border-box;
  animation: bdapp-up .3s cubic-bezier(.2, .8, .2, 1);
}
.bdapp-sheet__panel img { border-radius: 14px; display: block; margin-bottom: 12px; }
.bdapp-sheet__panel h3 { color: var(--bd-navy); font-size: 20px; margin: 0 0 10px; padding: 0; }
.bdapp-sheet__panel ol, .bdapp-install__steps ol { list-style: decimal outside !important; margin: 0 0 18px 0 !important; padding: 0 0 0 22px !important; line-height: 1.6; }
.bdapp-sheet__panel ol li, .bdapp-install__steps ol li { list-style: decimal outside !important; display: list-item !important; margin: 0 0 6px !important; padding: 0 0 0 4px !important; }
.bdapp-sheet__panel ol li::marker, .bdapp-install__steps ol li::marker { font-weight: 800; color: var(--bd-navy); }
.bdapp-sheet__panel p { line-height: 1.5; margin: 0 0 16px; padding: 0; }
.bdapp-sheet__panel .bdapp-btn { width: 100%; }
.bdapp-note { font-size: 13px; opacity: .8; }
.bdapp-ico-share {
  display: inline-block; width: 16px; height: 18px; vertical-align: -3px;
  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%3Cpath d='M12 3v12M7 8l5-5 5 5'/%3E%3Cpath d='M5 12v8h14v-8'/%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%3Cpath d='M12 3v12M7 8l5-5 5 5'/%3E%3Cpath d='M5 12v8h14v-8'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- Get the app page ---------- */
.bdapp-install { max-width: 560px; margin: 0 auto; color: var(--bd-navy); }
.bdapp-install__hero { text-align: center; background: var(--bd-navy); color: #fff; border-radius: 28px; padding: 40px 24px 32px; }
.bdapp-install__hero img { width: 120px; height: 120px; border-radius: 28px; box-shadow: 0 12px 32px rgba(0, 0, 0, .3); margin: 0 auto 20px; display: block; }
.bdapp-install__hero h2 { color: #fff; font-size: 28px; line-height: 1.2; margin: 0 0 10px; padding: 0; }
.bdapp-install__hero p { color: rgba(255, 255, 255, .85); line-height: 1.5; margin: 0 auto 22px; max-width: 34ch; padding: 0; }
.bdapp-install__hero .bdapp-btn { background: #fff; color: var(--bd-navy) !important; border-color: #fff; min-width: 220px; }
.bdapp-install__done { margin-top: 12px !important; font-weight: 600; }
.bdapp-install__steps { margin-top: 16px; border: 2px solid var(--bd-navy); border-radius: 22px; padding: 22px 22px 8px; }
.bdapp-install__steps h3 { color: var(--bd-navy); font-size: 19px; margin: 0 0 10px; padding: 0; }
.bdapp-install__steps p { line-height: 1.5; padding: 0 0 14px; }
.bdapp-install__steps .bdapp-btn { margin-bottom: 14px; }
.bdapp-install__perks { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.bdapp-install__perks li { background: var(--bd-soft); border-radius: 16px; padding: 14px 16px; line-height: 1.4; }

/* ---------- Alerts page ---------- */
.bdapp-alerts { max-width: 640px; margin: 0 auto; color: var(--bd-navy); }
.bdapp-alerts__card { background: var(--bd-navy); color: #fff; border-radius: 22px; padding: 22px; display: grid; gap: 14px; }
.bdapp-alerts__card h3 { color: #fff; font-size: 19px; margin: 0 0 6px; padding: 0; }
.bdapp-alerts__card p { color: rgba(255, 255, 255, .85); margin: 0; padding: 0; line-height: 1.5; }
.bdapp-alerts__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.bdapp-alerts__card .bdapp-btn { background: #fff; color: var(--bd-navy) !important; border-color: #fff; }
.bdapp-alerts__card .bdapp-btn--line { background: transparent; color: #fff !important; }
.bdapp-alerts__card .bdapp-link { color: #fff; }
.bdapp-alerts__h { color: var(--bd-navy); font-size: 17px; margin: 26px 0 10px; padding: 0; }
.bdapp-alerts__empty { background: var(--bd-soft); border-radius: 16px; padding: 18px; }
.bdapp-alerts__list { list-style: none !important; margin: 0 !important; padding: 0 !important; display: grid; gap: 8px; }
.bdapp-alerts__list li { list-style: none !important; margin: 0; padding: 0; }
.bdapp-alerts__list a {
  display: grid; gap: 3px; padding: 14px 16px; border: 1px solid var(--bd-line); border-radius: 16px;
  color: var(--bd-navy) !important; text-decoration: none !important; background: #fff;
}
.bdapp-alerts__list li.is-new a { border: 2px solid var(--bd-navy); }
.bdapp-alerts__list span { font-size: 14px; line-height: 1.45; opacity: .85; }
.bdapp-alerts__list time { font-size: 12px; opacity: .6; }

/* ---------- Fixes for the theme on phones (bottom bar overlaps) ---------- */
@media (max-width: 760px) {
  /* Sign-up / checkout "Next" bar stays visible above the bottom bar. */
  .mact { bottom: calc(84px + var(--bd-safe)) !important; }
  html.bdapp-has-tabs .mact { bottom: calc(76px + var(--bd-safe)) !important; }
  /* "Back to dashboard" button on a supplier's own page. */
  .todash { bottom: calc(90px + var(--bd-safe)) !important; }
  html.bdapp-has-tabs .todash { bottom: calc(82px + var(--bd-safe)) !important; }
}
@media (max-width: 760px) {
  /* Cookie policy table: swipe sideways inside the table instead of the whole page. */
  table.ltab { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
