/*
 * Outfitter Blocks — structural, variant-neutral layout for the block widgets.
 * Colour/type come from the theme Design Pack + the per-instance Style-tab vars
 * (--obk-*). Nothing here hardcodes a palette, so a skin swap reskins blocks.
 */

/* Editor "no content yet" hint. */
.obk-editor-empty {
  padding: 24px;
  border: 1px dashed currentColor;
  opacity: 0.6;
  text-align: center;
}

/* Reset inherited margins on the plain markup (Design Pack rules then win). */
.obk-block :where(p, blockquote, span, div, h2, h3, h4) {
  margin: 0;
}

.obk-tst {
  text-align: var(--obk-align, left);
}

.obk-quote__name,
.obk-quote__role {
  display: block;
}

/* Neutral fallbacks (overridden per-variant by the Design Pack). */
.obk-quote__text {
  font-family: var(--obk-body-font, inherit);
  color: var(--obk-text-color, inherit);
}

.obk-quote__name {
  font-family: var(--obk-heading-font, inherit);
  color: var(--obk-heading-color, inherit);
}

.obk-quote__mark {
  font-family: var(--obk-heading-font, inherit);
  color: var(--obk-accent-color, inherit);
}

.obk-quote__rating {
  color: var(--obk-highlight-color, var(--obk-accent-color, currentColor));
  letter-spacing: 4px;
  font-size: 14px;
}

/* ── Single big quote ──────────────────────────────────────────────────── */
.obk-tst--single {
  display: flex;
  flex-direction: column;
  gap: var(--obk-gap, 80px);
  text-align: var(--obk-align, center);
}

.obk-tst--single .obk-quote {
  max-width: 1100px;
  margin-inline: auto;
}

.obk-tst--single .obk-quote__cite {
  justify-content: center;
}

/* ── Quote grid ────────────────────────────────────────────────────────── */
.obk-tst--grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--obk-gap, 24px);
}

/* ── Carousel (scroll-snap; editor-safe, no JS hide) ───────────────────── */
.obk-tst--carousel {
  overflow: hidden;
}

.obk-tst__track {
  display: flex;
  gap: var(--obk-gap, 24px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 14px;
  -webkit-overflow-scrolling: touch;
}

.obk-tst--carousel .obk-quote--card {
  flex: 0 0 min(420px, 85%);
  scroll-snap-align: start;
}

/* ── Shared card ───────────────────────────────────────────────────────── */
.obk-quote--card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 36px;
  background: var(--obk-bg, transparent);
  border: 1px solid var(--obk-border-color, rgba(0, 0, 0, 0.12));
}

.obk-quote__cite {
  display: flex;
  align-items: center;
  gap: 14px;
}

.obk-quote__photo img {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

@media (max-width: 600px) {
  .obk-tst--grid {
    grid-template-columns: 1fr;
  }
}

/* ── Posts — alternate styles (the "journal" style reuses the Design Pack) ── */
/* The entry image is an <a>; make it honour the Design Pack's fixed height. */
.obk-posts .entry-img {
  display: block;
}

.obk-posts__items {
  display: grid;
  gap: var(--obk-gap, 32px);
}

.obk-posts--cards .obk-posts__items,
.obk-posts--overlay .obk-posts__items {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.obk-posts--list .entry {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  align-items: center;
}

.obk-posts--list .entry-img {
  margin-bottom: 0;
  height: 200px;
}

.obk-posts--overlay .entry {
  position: relative;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  overflow: hidden;
}

.obk-posts--overlay .entry-img {
  position: absolute;
  inset: 0;
  height: auto;
  margin: 0;
}

.obk-posts--overlay .entry-date,
.obk-posts--overlay .entry-title,
.obk-posts--overlay .entry-excerpt {
  position: relative;
  z-index: 2;
}

.obk-posts--minimal .obk-posts__items {
  gap: 0;
}

.obk-posts--minimal .entry {
  padding: 28px 0;
  border-bottom: 1px solid var(--obk-border-color, rgba(232, 223, 201, 0.14));
}

@media (max-width: 700px) {
  .obk-posts--list .entry {
    grid-template-columns: 1fr;
  }
}

/* ── Ticker — static (non-scrolling) alternate ───────────────────────────── */
.obk-ticker--static .ticker-track {
  animation: none;
  width: auto;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Stats — plain grid alternate (drop the band rules) ───────────────────── */
.obk-stats--grid .stats-grid {
  border: 0;
  margin-top: 0;
}

/* ── CTA — inset panel alternate ─────────────────────────────────────────── */
.obk-cta--inset {
  max-width: 1100px;
  margin-inline: auto;
}

/* ── Hero — extra overlay layer (darkness control) over the bg photo ──────── */
.obk-hero .hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #0c0d09;
  opacity: var(--obk-overlay, 0);
  pointer-events: none;
}

/* Standing editor-safe rule: never let entrance/scroll animations hide the
   widget's content while editing. */
body.elementor-editor-active .obk-block,
body.elementor-editor-active .obk-block * {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
}
