body.bp-modal-open { overflow: hidden; }

.bp-dialog {
  color-scheme: dark;
  --bp-bg: #151a19;
  --bp-heading: #f4f6f1;
  --bp-secondary: #d1dcd3;
  --bp-button-text: #10251a;
  --bp-button-hover: #c1f7d7;
  --bp-surface: #1c2320;
  --bp-hover: #28312a;
  --bp-border: #4b594e;
  --bp-on: #23382b;
  --bp-muted: #afb9b4;
  --bp-mint: #a4efc4;
  --bp-line: #333b36;
  position: fixed;
  inset: 0 auto 0 0;
  width: min(510px, 90vw);
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-inline-start: 1px solid var(--bp-border);
  background: var(--bp-bg);
  color: var(--bp-heading);
  box-shadow: 12px 0 72px #0005;
  font: inherit;
  overflow: hidden;
}

.shopping-mode .bp-dialog {
  color-scheme: light;
  --bp-bg: #fff;
  --bp-heading: #192743;
  --bp-muted: #526075;
  --bp-mint: #163c85;
  --bp-line: #d6dbdf;
  --bp-secondary: #213857;
  --bp-button-text: #fff;
  --bp-button-hover: #0e2e6e;
  --bp-surface: #fafaf7;
  --bp-hover: #edf1f6;
  --bp-border: #a2afc4;
  --bp-on: #edf3fb;
}
.shopping-mode .bp-store img {
  filter: brightness(0) saturate(100%) invert(17%) sepia(51%) saturate(1544%) hue-rotate(193deg) brightness(89%);
}

.bp-dialog[open] { animation: bp-enter 190ms cubic-bezier(.18,.76,.19,1); }
.bp-dialog::backdrop { background: rgb(6 10 9 / .66); backdrop-filter: blur(3px); }
.bp-dialog *, .bp-dialog *::before, .bp-dialog *::after { box-sizing: border-box; }
.bp-sheet { height: 100%; display: flex; flex-direction: column; }
.bp-bar {
  min-height: 63px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: 27px 21px;
  border-bottom: 1px solid var(--bp-line);
}
.bp-store { display: inline-flex; align-items: center; gap: 9px; color: var(--bp-secondary); font-size: .88rem; }
.bp-store img { width: 25px; height: 21px; object-fit: contain; }
.bp-store:hover { color: var(--bp-mint); }
.bp-close {
  position: relative;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
}
.bp-close::before,.bp-close::after {
  content: '';
  position: absolute;
  left: 12px;
  top: 20px;
  width: 18px;
  height: 1.5px;
  background: var(--bp-heading);
  transform: rotate(45deg);
}
.bp-close::after { transform: rotate(-45deg); }
.bp-close:hover { background: var(--bp-hover); }
.bp-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding: 28px 30px 32px;
}
.bp-title {
  color: var(--bp-heading);
  margin: 0 0 7px;
  font-size: clamp(1.6rem, 2.5vw, 2rem);
  line-height: 1.5;
  letter-spacing: -.035em;
}
.bp-title:focus { outline: none; }
.bp-intro,.bp-description,.bp-specs dd,.bp-answer p {
  color: var(--bp-muted);
  margin: 0;
  font-size: .96rem;
  line-height: 1.85;
}
.bp-image {
  margin: 19px 0 23px;
  height: 150px;
  border-radius: 5px;
  overflow: hidden;
  background: var(--bp-surface);
}
.bp-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bp-product { background: #dde2e4; }
.bp-product img { object-fit: contain; mix-blend-mode: multiply; }
.bp-choices legend {
  padding: 0;
  margin: 19px 0 11px;
  font-size: 1.03rem;
  color: var(--bp-heading);
  font-weight: 700;
}
.bp-contact-list,.bp-link-list,.bp-specs { margin: 0; padding: 0; list-style: none; }
.bp-contact-list li,.bp-link-list li,.bp-specs > div { border-top: 1px solid var(--bp-line); }
.bp-option-link { display: grid; gap: 2px; padding: 14px 0 15px; text-decoration: none; }
.bp-option-link strong,.bp-specs dt,.bp-answer h3 { margin: 0; font-size: 1.03rem; color: var(--bp-heading); }
.bp-description { text-align: right; }
.bp-option-link strong { color: var(--bp-mint); }
.bp-option-link:hover strong,.bp-contact:hover .bp-contact-value { text-decoration: underline; text-underline-offset: 4px; }
.bp-contact-list { margin-block-start: 24px; }
.bp-contact { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 16px 0; }
.bp-contact strong { color: var(--bp-heading); font-size: .96rem; }
.bp-contact-value { color: var(--bp-mint); font-size: .96rem; overflow-wrap: anywhere; }
.bp-contact-value[dir=auto] { unicode-bidi: plaintext; }
.bp-service { margin-block: 20px 0; padding-block-start: 17px; border-block-start: 1px solid var(--bp-line); color: var(--bp-muted); font-size: .94rem; }
.bp-specs dd[dir=auto] { text-align: right; }
.bp-specs > div { padding-block: 14px; }
.bp-specs dt { font-weight: 700; margin-bottom: 3px; }
.bp-actions {
  display: flex;
  align-items: stretch;
  justify-content: start;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 15px 30px max(16px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--bp-line);
  background: var(--bp-surface);
}
.bp-actions[hidden] { display: none; }
.bp-primary,.bp-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  min-height: 43px;
  border-radius: 4px;
  color: var(--bp-mint);
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
}
.bp-primary { color: var(--bp-button-text); background: var(--bp-mint); }
.bp-primary:hover { background: var(--bp-button-hover); }
.bp-secondary { color: var(--bp-secondary); border: 1px solid var(--bp-border); }
.bp-secondary:hover { background: var(--bp-hover); }
.bp-choices { min-width: 0; margin: 0; padding: 0; border: 0; }
.bp-choices legend { margin: 0 0 12px; }
.bp-options { display: flex; flex-wrap: wrap; gap: 6px; }
.bp-choice { position: relative; cursor: pointer; flex: 1 0 27%; }
.bp-choice input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(100%); }
.bp-choice span {
  display: grid;
  place-items: center;
  min-height: 43px;
  padding: 6px;
  background: var(--bp-surface);
  color: var(--bp-secondary);
  border: 1px solid var(--bp-border);
  border-radius: 4px;
  font-size: .9rem;
}
.bp-choice input:checked + span { background: var(--bp-on); border-color: var(--bp-mint); color: var(--bp-mint); }
.bp-choice input:focus-visible + span,.bp-dialog :is(a,button):focus-visible { outline: 2px solid var(--bp-mint); outline-offset: 3px; }
.bp-answer { margin-top: 21px; padding-top: 15px; border-top: 1px solid var(--bp-line); }
.bp-answer p { margin-top: 4px; }

@keyframes bp-enter { from { opacity: .85; transform: translateX(-20px); } }
@media (max-width: 620px) {
  .bp-dialog {
    inset: auto 0 0;
    width: 100%;
    height: fit-content;
    max-height: 88dvh;
    border: 1px solid var(--bp-line);
    border-bottom: 0;
    border-radius: 13px 13px 0 0;
  }
  .bp-dialog .bp-sheet { height: auto; max-height: 88dvh; }
  .bp-dialog[open] { animation-name: bp-rise; }
  .bp-bar { min-height: 51px; padding-inline: 19px 10px; }
  .bp-content { padding: 17px 20px 22px; }
  .bp-image { height: clamp(95px, 19dvh, 140px); margin: 16px 0; }
  .bp-actions { padding-inline: 20px; gap: 7px; }
  .bp-primary,.bp-secondary { flex-grow: 1; }
  @keyframes bp-rise { from { transform: translateY(20px); } }
}
@media (max-height: 520px) {
  .bp-image { height: 90px; }
  .bp-actions { padding-block: 7px; }
}
@media (prefers-reduced-motion: reduce) { .bp-dialog[open] { animation: none; } }
