/* Shared extras for the sample sites. Works with js/samples.js. */

/* ---------- Photo slots ---------- */
[data-photo].has-photo { background-size: cover; background-position: center; }
.has-photo > .ph-art { opacity: 0; }
.tile { position: relative; overflow: hidden; }
.tile.has-photo { font-size: 0 !important; }
.tile figcaption, .tile .cap {
  position: absolute; left: 10px; bottom: 10px; font-size: .8rem; font-weight: 600;
  background: rgba(0,0,0,.55); color: #fff; padding: 3px 10px; border-radius: 20px; line-height: 1.5;
}

/* ---------- Slideshow ---------- */
.ss { position: relative; overflow: hidden; }
.ss-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity .9s ease;
  display: grid; place-items: center; background-size: cover; background-position: center;
}
.ss-slide.is-active { opacity: 1; }
.ss-slide .ph-art { transition: opacity .3s; line-height: 1; }
.ss-dots {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  display: flex; gap: 8px; z-index: 3;
}
.ss-dots button {
  width: 9px; height: 9px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  background: rgba(255,255,255,.55); box-shadow: 0 0 0 1px rgba(0,0,0,.15);
  transition: width .3s, background .3s;
}
.ss-dots button[aria-current="true"] { width: 24px; border-radius: 6px; background: #fff; }
/* A slightly bigger tap area on phones */
@media (pointer: coarse) { .ss-dots { gap: 12px; } .ss-dots button { width: 11px; height: 11px; } }

/* Full-width slideshow behind the hero text */
.ss-bg { position: absolute; inset: 0; z-index: 0; }
.ss-bg .ss-slide.has-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.6));
}
.hero-over { position: relative; z-index: 2; }

@media (prefers-reduced-motion: reduce) { .ss-slide { transition: none; } }

/* ---------- Design style button ---------- */
.style-toggle {
  position: fixed; right: 16px; bottom: 62px; z-index: 100;
  padding: 9px 14px; border-radius: 20px; border: none; cursor: pointer;
  background: #fff; color: #111827; font: 600 13px/1 system-ui, sans-serif;
  box-shadow: 0 4px 14px rgba(0,0,0,.25); white-space: nowrap;
}
.style-toggle:focus-visible, .ss-dots button:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }

/* Dots on light (non full-width) slideshows */
.ss:not(.ss-bg) .ss-dots button { background: rgba(0,0,0,.2); box-shadow: none; }
.ss:not(.ss-bg) .ss-dots button[aria-current="true"] { background: rgba(0,0,0,.65); }

/* Banner shown when a sample is opened with ?name= */
.try-note {
  position: fixed; left: 50%; top: 12px; transform: translateX(-50%); z-index: 200;
  background: #111827; color: #fff; padding: 9px 16px; border-radius: 30px;
  font: 600 13px/1.3 system-ui, sans-serif; box-shadow: 0 8px 24px rgba(0,0,0,.25);
  max-width: calc(100% - 32px); text-align: center; transition: opacity .5s, transform .5s;
}
.try-note.hide { opacity: 0; transform: translate(-50%, -20px); pointer-events: none; }

/* Hide the "Powered by Netlify" badge Netlify injects (hideable on the paid plan) */
#nl-badge-frame { display: none !important; }
