/* /demo: live <dpd-*> components on the DPD demo store */

/* DPD's own colors for every component on the page, the drawer and dialogs
   included (the style picker overrides these inside its stage) */
:root {
  --dpd-primary: #5837ab;
  --dpd-radius: 12px;
}

.nav-cart-button {
  font-size: 0.875rem;
}

.demo-hero-code pre {
  margin: 0;
  border-radius: 12px;
  overflow-x: auto;
}
.demo-hero-code code {
  font-size: 0.85rem;
  border-radius: 12px;
}

.demo-band {
  background: #f6f4fb;
  padding-top: 4rem;
  padding-bottom: 4rem;
}
.demo-page > .fabrx-section.bg-white {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.demo-step {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  background: #ece6f8;
  color: #5837ab;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.demo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.5rem;
}

.demo-panel {
  padding: 1.5rem;
  border: 1px solid #e7e3f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(40, 20, 90, 0.06);
}

/* keep the big product image from towering over the cart beside it */
dpd-product[layout="detail"]::part(image) {
  max-height: 340px;
  width: auto;
  margin: 0 auto;
}

.demo-coupons {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  background: #fff;
  border: 1px dashed #c9bde6;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* the "your own sales page" mockup */
.demo-sales-page {
  padding: 2rem;
  border-radius: 16px;
  background: linear-gradient(135deg, #fdf6ec, #f9ece0);
  border: 1px solid #efdcc8;
  color: #3b2a20;
}
.demo-sales-kicker {
  margin-bottom: 0.25rem;
  color: #a05a2c;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.demo-sales-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.75rem;
  color: #3b2a20;
}
.demo-sales-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

/* style picker */
.demo-theme-picker {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}
.demo-theme-stage {
  padding: 1.5rem;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e7e3f0;
  transition: background-color 0.2s;
}
.demo-theme-stage[data-theme="midnight"] {
  background: #030712;
  border-color: #1f2937;
}
.demo-theme-stage[data-theme="bookshop"] {
  background: #f5ecdf;
}
.demo-theme-stage dpd-product {
  display: block;
  max-width: 320px;
  margin: 0 auto;
}
.demo-theme-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

/* code blocks */
.demo-code {
  margin-top: 1rem;
  border-radius: 12px;
  background: #282c34;
  overflow: hidden;
}
.demo-code-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem 0.5rem 1rem;
  color: #c8ccd4;
  font-size: 0.85rem;
  cursor: pointer;
  list-style: none;
}
.demo-code-bar::-webkit-details-marker {
  display: none;
}
details.demo-code > .demo-code-bar span::before {
  content: "\25B8";
  display: inline-block;
  margin-right: 0.5rem;
  transition: transform 0.15s;
}
details.demo-code[open] > .demo-code-bar span::before {
  transform: rotate(90deg);
}
.demo-code-open .demo-code-bar {
  cursor: default;
}
.demo-copy {
  padding: 0.15rem 0.6rem;
  border: 1px solid #4b5263;
  border-radius: 6px;
  background: transparent;
  color: #c8ccd4;
  font-size: 0.8rem;
}
.demo-copy:hover {
  background: #3a3f4b;
}
.demo-code pre {
  margin: 0;
}
.demo-code pre code.hljs {
  padding: 0.25rem 1rem 1rem;
  font-size: 0.85rem;
  white-space: pre;
  overflow-x: auto;
}

/* event log */
.demo-log {
  border-radius: 16px;
  background: #1e1b2e;
  color: #e6e1f5;
  font-family: SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  overflow: hidden;
  min-height: 320px;
}
.demo-log-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1rem;
  background: #2a2640;
}
.demo-log-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4b4566;
}
.demo-log-title {
  margin-left: 0.5rem;
  color: #a79fc6;
}
.demo-log ol {
  margin: 0;
  padding: 0.75rem 1rem 1rem;
  list-style: none;
}
.demo-log li {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 0.75rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid #2f2a45;
  animation: demo-log-in 0.4s ease-out;
}
.demo-log li.demo-log-empty {
  display: block;
  color: #8a83a6;
  border: 0;
}
@keyframes demo-log-in {
  from { background: rgba(183, 148, 246, 0.25); }
  to { background: transparent; }
}

.demo-classic {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 150px;
}
.demo-classic-label {
  color: #6b7280;
  font-size: 0.9rem;
}

@media (max-width: 575.98px) {
  .demo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }
  .demo-log li {
    grid-template-columns: auto 1fr;
  }
  .demo-sales-page {
    padding: 1.5rem;
  }
}

/* the Cast & Crumb store, shown in a browser window */
.demo-hero-link {
  margin-top: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
}
.demo-hero-link a {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
}
.demo-real-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 1.5rem;
}
.demo-real-link {
  color: #5837ab;
  font-weight: 600;
}
.demo-browser-stack {
  display: block;
}
.demo-browser {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e3ddd2;
  box-shadow: 0 24px 50px rgba(40, 20, 90, 0.14);
  transition: transform 0.2s;
}
.demo-browser-stack:hover .demo-browser {
  transform: translateY(-4px);
}
.demo-browser-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  background: #f1eee8;
  border-bottom: 1px solid #e3ddd2;
}
.demo-browser-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d8d2c8;
}
.demo-browser-url {
  flex: 1;
  margin-left: 10px;
  padding: 2px 10px;
  border-radius: 6px;
  background: #fff;
  color: #6b6157;
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.demo-browser img {
  display: block;
  width: 100%;
  height: auto;
}
