/* squareposh "Template details" on the template demos (platform/demo-details.php).
   A white pill at the bottom of the screen opens a dark card above it. Its own
   type and colors whatever the template looks like. Closed, the pill sits under the
   template's header, menus and pop-ups (z-index 45); open, the card comes over the
   header (150) and closes when you tap or tab away. Lifted over bars fixed to the
   bottom of the screen (--sqdd-lift, demo-details.js). */

.sqdd {
  --sqdd-lift: 0px;
  --sqdd-ink: #fff;
  --sqdd-soft: rgba(255, 255, 255, .74);
  --sqdd-mute: rgba(255, 255, 255, .62);
  --sqdd-line: rgba(255, 255, 255, .12);
  --sqdd-fill: rgba(255, 255, 255, .08);
  --sqdd-card: #121214;
  position: fixed; left: 50%; bottom: calc(16px + var(--sqdd-lift) + env(safe-area-inset-bottom, 0px)); z-index: 45; width: max-content;
  transform: translateX(-50%); transition: bottom .3s ease;
  margin: 0; padding: 0; border: 0; color: #111; text-align: left; letter-spacing: normal; text-transform: none; font-style: normal;
  font: 400 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.sqdd.is-open, .sqdd:has(> .sqdd__box[open]) { z-index: 150; }
.sqdd *, .sqdd *::before, .sqdd *::after { box-sizing: border-box; }
.sqdd :is(h2, h3, p, ul, li) { max-width: none; margin: 0; padding: 0; border: 0; background: none; font: inherit; color: inherit; letter-spacing: inherit; text-transform: none; text-align: inherit; }
.sqdd ul { list-style: none; }
.sqdd li::before, .sqdd li::marker, .sqdd summary::before, .sqdd summary::after { content: none; }
.sqdd a { color: inherit; text-decoration: none; background-image: none; }
.sqdd svg { flex: none; display: block; width: 16px; height: 16px; }
.sqdd .sqdd__i { fill: none; stroke: currentColor; }
.sqdd summary { list-style: none; cursor: pointer; }
.sqdd summary::-webkit-details-marker { display: none; }
.sqdd summary::marker { content: ""; }

/* The pill */
.sqdd .sqdd__pill {
  position: relative; z-index: 1; display: inline-flex; align-items: center; min-height: 46px; padding: 0 20px; border-radius: 999px; white-space: nowrap;
  background: #fff; color: #111; font-size: 14.5px; font-weight: 650;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .07), 0 14px 34px -12px rgba(0, 0, 0, .5), 0 4px 10px -4px rgba(0, 0, 0, .18);
  transition: box-shadow .2s ease, transform .2s ease; user-select: none; -webkit-tap-highlight-color: transparent;
}
.sqdd .sqdd__pill:hover { box-shadow: 0 0 0 1px rgba(0, 0, 0, .1), 0 18px 40px -12px rgba(0, 0, 0, .55), 0 4px 10px -4px rgba(0, 0, 0, .2); }
.sqdd .sqdd__pill:focus-visible { outline: 3px solid #2563eb; outline-offset: 3px; }
.sqdd__pill-closed, .sqdd__pill-open { display: inline-flex; align-items: center; gap: 9px; }
.sqdd .sqdd__pill svg { width: 18px; height: 18px; }
.sqdd__pill-open { display: none; }
.sqdd__box[open] .sqdd__pill-closed { display: none; }
.sqdd__box[open] .sqdd__pill-open { display: inline-flex; }
.sqdd .sqdd__pill { padding-right: 20px; }
.sqdd__box[open] .sqdd__pill { padding-right: 8px; }
.sqdd__pill-x { display: grid; place-items: center; width: 32px; height: 32px; margin-left: 6px; border-left: 1px solid rgba(0, 0, 0, .12); padding-left: 6px; box-sizing: content-box; }

/* The card, above the pill */
.sqdd__panel {
  position: absolute; left: 50%; bottom: calc(100% + 12px); transform: translateX(-50%);
  display: flex; flex-direction: column; width: min(420px, calc(100vw - 24px));
  max-height: max(260px, min(640px, calc(100vh - 250px - var(--sqdd-lift))));
  border-radius: 20px; border: 1px solid rgba(255, 255, 255, .08); background: var(--sqdd-card); color: var(--sqdd-ink);
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .6), 0 10px 24px -12px rgba(0, 0, 0, .4); overflow: hidden;
}
@supports (height: 100dvh) { .sqdd__panel { max-height: max(260px, min(640px, calc(100dvh - 250px - var(--sqdd-lift)))); } }
.sqdd__box[open] .sqdd__panel { animation: sqdd-in .24s cubic-bezier(.2, .8, .2, 1); }
@keyframes sqdd-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

.sqdd__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 22px 16px; border-bottom: 1px solid var(--sqdd-line); }
.sqdd .sqdd__name { font-size: 17px; font-weight: 800; line-height: 1.2; letter-spacing: .07em; text-transform: uppercase; }
.sqdd .sqdd__by { margin-top: 4px; color: var(--sqdd-mute); font-size: 13px; }
.sqdd .sqdd__price { display: grid; justify-items: end; flex: none; text-align: right; }
.sqdd__price strong { font-size: 22px; font-weight: 800; line-height: 1.05; letter-spacing: -.01em; }
.sqdd__price span { margin-top: 3px; color: var(--sqdd-mute); font-size: 13px; }

.sqdd__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px 22px 20px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .25) transparent; }
.sqdd .sqdd__text { color: var(--sqdd-soft); font-size: 14.5px; line-height: 1.55; }
.sqdd .sqdd__for { margin-top: 10px; color: var(--sqdd-soft); font-size: 14px; line-height: 1.5; }
.sqdd__for strong { color: var(--sqdd-ink); font-weight: 650; }
.sqdd .sqdd__h { margin: 22px 0 10px; color: var(--sqdd-mute); font-size: 13px; font-weight: 700; line-height: 1.3; letter-spacing: .09em; text-transform: uppercase; }

/* The demo bar's switches */
.sqdd__switches[hidden] { display: none; }
.sqdd__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sqdd .sqdd__chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 15px; border-radius: 999px;
  border: 1px solid var(--sqdd-line); background: var(--sqdd-fill); color: var(--sqdd-ink); font-size: 14px; font-weight: 600; line-height: 1.2;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.sqdd .sqdd__chip:hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .22); }
.sqdd .sqdd__chip[aria-current] { background: #fff; border-color: #fff; color: #111; }
.sqdd .sqdd__chip svg { width: 16px; height: 16px; }
.sqdd__dot { width: 16px; height: 16px; border-radius: 50%; background: linear-gradient(135deg, var(--sw, #999) 0 50%, var(--sw2, #eee) 50% 100%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); }
.sqdd__chip[aria-current] .sqdd__dot { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .2); }

/* Page and template links, two to a row */
.sqdd__links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 14px; }
.sqdd__links a { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 3px 0; color: var(--sqdd-ink); font-size: 14.5px; font-weight: 500; }
.sqdd__links a > svg { width: 15px; height: 15px; box-sizing: content-box; padding: 6px; border-radius: 8px; background: var(--sqdd-fill); color: var(--sqdd-soft); transition: background-color .15s ease, color .15s ease; }
.sqdd__links a > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sqdd__links a:hover > span { text-decoration: underline; text-underline-offset: 3px; }
.sqdd__links a:hover > svg { background: rgba(255, 255, 255, .16); color: var(--sqdd-ink); }
.sqdd__links a[aria-current] { font-weight: 700; }
.sqdd__links a[aria-current] > svg { background: #fff; color: #111; }

/* Other templates, folded away */
.sqdd__more { margin-top: 18px; border-top: 1px solid var(--sqdd-line); }
.sqdd .sqdd__more > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding-top: 4px; color: var(--sqdd-ink); font-size: 14.5px; font-weight: 650; }
.sqdd__more > summary svg { color: var(--sqdd-mute); transition: transform .2s ease; }
.sqdd__more[open] > summary svg { transform: rotate(180deg); }
.sqdd__more > summary:hover span { text-decoration: underline; text-underline-offset: 3px; }
.sqdd__more .sqdd__links { padding-bottom: 4px; }

.sqdd__foot { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px 22px 18px; border-top: 1px solid var(--sqdd-line); }
.sqdd__foot:has(> :only-child) { grid-template-columns: 1fr; }
.sqdd .sqdd__btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 8px 14px; border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .3); color: var(--sqdd-ink); font-size: 14.5px; font-weight: 650; line-height: 1.2; text-align: center;
  transition: background-color .15s ease, border-color .15s ease;
}
.sqdd .sqdd__btn:hover { background: var(--sqdd-fill); border-color: rgba(255, 255, 255, .5); }
.sqdd .sqdd__btn--main { border-color: #fff; background: #fff; color: #111; }
.sqdd .sqdd__btn--main:hover { background: #e9e9ec; border-color: #e9e9ec; }

.sqdd__panel :focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 6px; }
.sqdd__panel .sqdd__chip:focus-visible, .sqdd__panel .sqdd__btn:focus-visible { border-radius: 999px; }
.sqdd__panel .sqdd__btn:focus-visible { border-radius: 12px; }

@media (max-width: 520px) {
  .sqdd__head { padding: 18px 18px 14px; }
  .sqdd__body { padding: 14px 18px 18px; }
  .sqdd__foot { padding: 12px 18px 16px; }
  .sqdd .sqdd__btn { font-size: 14px; padding-inline: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .sqdd, .sqdd * { transition: none !important; }
  .sqdd__box[open] .sqdd__panel { animation: none; }
}
@media print { .sqdd { display: none !important; } }
