/*
 * BTW Core components. Uses the theme's design tokens (CSS custom properties)
 * with fallbacks, so the components match the theme without a theme release.
 */

/* Campaign / notice bar (cart, checkout, shop): narrow and quiet */
.btw-core-notice {
  max-width: 660px;
  /* Top margin: the cart and checkout titles have no bottom margin. */
  margin: var(--space-sm, 16px) 0 var(--space-md, 24px);
  padding: 10px 14px;
  background: var(--bg-cream, #f0ede6);
  border-left: 2px solid var(--accent-orange, #d4762a);
  color: var(--text-black, #0a0a0a);
  font-family: var(--font-body, 'Helvetica Neue', Helvetica, Arial, sans-serif);
  font-size: 13px;
  line-height: 1.5;
}

.btw-core-notice strong {
  font-family: var(--font-heading, 'Oswald', Arial, sans-serif);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.btw-core-notice a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.btw-core-notice + .btw-core-notice {
  margin-top: calc(-1 * var(--space-sm, 16px));
}

/* Hidden by the theme's date guard once its time window is over */
.btw-core-notice[hidden] {
  display: none !important;
}

@media (max-width: 600px) {
  .btw-core-notice {
    padding: 12px 14px;
    font-size: 13px;
  }
}

/* Gift-advice form ([btw_gift_advice]) */
.btw-advice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 24px;
  max-width: 760px;
  margin: var(--space-md, 24px) 0 var(--space-lg, 48px);
  font-family: var(--font-body, 'Helvetica Neue', Helvetica, Arial, sans-serif);
}

.btw-advice__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}

.btw-advice__field--message,
.btw-advice__legal,
.btw-advice__actions,
.btw-advice__msg,
.btw-advice__done {
  grid-column: 1 / -1;
}

.btw-advice label {
  font-family: var(--font-heading, 'Oswald', Arial, sans-serif);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.btw-advice__optional {
  font-family: var(--font-body, Arial, sans-serif);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--gray-medium, #666);
}

.btw-advice input,
.btw-advice select,
.btw-advice textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--text-black, #0a0a0a);
  border-radius: 0;
  background: #fff;
  color: var(--text-black, #0a0a0a);
  font: inherit;
  font-size: 15px;
}

.btw-advice textarea {
  min-height: 96px;
  resize: vertical;
}

.btw-advice [aria-invalid="true"] {
  border-color: var(--accent-red, #e04b2c);
  box-shadow: inset 0 0 0 1px var(--accent-red, #e04b2c);
}

.btw-advice__error {
  color: var(--accent-red, #e04b2c);
  font-size: 13px;
}

.btw-advice__legal {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--gray-dark, #333);
}

.btw-advice__legal a {
  color: inherit;
  text-decoration: underline;
}

.btw-advice__actions {
  margin: 0;
}

.btw-advice__actions .btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

.btw-advice__msg {
  margin: 0;
  padding: 12px 16px;
  background: var(--bg-cream, #f0ede6);
  border-left: 4px solid var(--accent-olive, #b5ad82);
}

.btw-advice__msg--invalid,
.btw-advice__msg--rate,
.btw-advice__msg--error {
  border-left-color: var(--accent-red, #e04b2c);
}

.btw-advice__msg[hidden] {
  display: none !important;
}

/* Honeypot: off-screen, not display:none (some bots skip hidden fields). */
.btw-advice__hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* No-JavaScript result after the redirect (#btw-advice-sent / -failed). */
.btw-advice__done {
  display: none;
  margin: 0;
  padding: 12px 16px;
  background: var(--bg-cream, #f0ede6);
  border-left: 4px solid var(--accent-olive, #b5ad82);
}

.btw-advice__done:target {
  display: block;
}

.btw-advice__done--failed {
  border-left-color: var(--accent-red, #e04b2c);
}

@media (max-width: 640px) {
  .btw-advice {
    grid-template-columns: 1fr;
  }
}

/* Home page teaser (btw_front_page_sections): a contained card with a photo */
.btw-advice-teaser {
  max-width: var(--container-max, 1400px);
  margin: var(--space-xl, 80px) auto;
  padding: 0 var(--space-lg, 48px);
}

.btw-advice-teaser__inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  background: var(--bg-cream, #f0ede6);
  overflow: hidden;
}

.btw-advice-teaser__media {
  margin: 0;
  min-height: 320px;
}

.btw-advice-teaser__media img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 460px;
  object-fit: cover;
  object-position: center 45%;
}

.btw-advice-teaser__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: var(--space-sm, 16px);
  padding: var(--space-xl, 80px) var(--space-lg, 48px);
}

.btw-advice-teaser__title {
  margin: 0;
  font-family: var(--font-heading, 'Oswald', Arial, sans-serif);
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 600;
  line-height: 1.05;
  text-transform: uppercase;
}

.btw-advice-teaser__text {
  margin: 0 0 var(--space-xs, 8px);
  max-width: 440px;
  font-size: 15px;
  line-height: 1.55;
}

@media (max-width: 768px) {
  .btw-advice-teaser {
    margin: var(--space-lg, 48px) auto;
    padding: 0 var(--space-sm, 16px);
  }

  .btw-advice-teaser__inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .btw-advice-teaser__media {
    min-height: 0;
  }

  .btw-advice-teaser__media img {
    aspect-ratio: 4 / 3;
    height: auto;
    max-height: none;
  }

  .btw-advice-teaser__body {
    padding: var(--space-lg, 48px) var(--space-md, 24px);
  }
}

/* Home page: a slim campaign strip right under the hero */
.btw-core-band {
  max-width: 760px;
  margin: var(--space-lg, 48px) auto 0;
  padding: 0 var(--space-md, 24px);
}

.btw-core-band[hidden] {
  display: none !important;
}

.btw-core-band__inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-sm, 16px);
  padding: 10px 14px;
  background: var(--bg-cream, #f0ede6);
  border-left: 2px solid var(--accent-orange, #d4762a);
  font-family: var(--font-body, 'Helvetica Neue', Helvetica, Arial, sans-serif);
  font-size: 13px;
  line-height: 1.5;
}

.btw-core-band__copy {
  margin: 0;
}

.btw-core-band__copy strong {
  font-family: var(--font-heading, 'Oswald', Arial, sans-serif);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.btw-core-band__link {
  flex-shrink: 0;
  color: inherit;
  font-family: var(--font-heading, 'Oswald', Arial, sans-serif);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 600px) {
  .btw-core-band {
    margin-top: var(--space-md, 24px);
    padding: 0 var(--space-sm, 16px);
  }

  .btw-core-band__inner {
    flex-direction: column;
    gap: 6px;
  }
}
