/**
 * Banner QRCode1 — authoritative presentation = legacy mynews-yellow subscribe
 * contract, scoped under #content-banner-qrcode1 so Gold1 is not globally altered.
 *
 * Source archaeology (read-only):
 *   barfusskollektiv2/modules/content/blocks/block-banner_qrcode1.php
 *   barfusskollektiv2/themes/mynews-yellow/css/style.css (.subscribe …)
 *   production https://barfusskollektiv.ch/ (same DOM + max-width:200px QR)
 *
 * Bootstrap grid (col-lg-4 / col-lg-8) comes from the active theme.
 * Breakpoint: side-by-side at ≥992px; below that columns stack (Bootstrap lg).
 */

/* --- section shell (legacy .subscribe) --- */
#content-banner-qrcode1.content-banner-qrcode1.subscribe {
  position: relative;
  background: #ffc107;
  padding: 0;
  margin: 0;
}

/* Keep Gold1 .container usable inside the full-bleed yellow band.
   Use legacy Bootstrap 4 container max-widths so, when columns stack,
   the full-bleed .subscribe yellow remains as a WIDER left rail beside
   the dark newsletter (ts-newsletter:after covers the right bleed only). */
#content-banner-qrcode1 > .container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 15px;
  padding-right: 15px;
  box-sizing: border-box;
}

@media (min-width: 576px) {
  #content-banner-qrcode1 > .container {
    max-width: 540px;
  }
}

@media (min-width: 768px) {
  #content-banner-qrcode1 > .container {
    max-width: 720px;
  }
}

@media (min-width: 992px) {
  #content-banner-qrcode1 > .container {
    max-width: 960px;
  }
}

@media (min-width: 1200px) {
  #content-banner-qrcode1 > .container {
    max-width: 1140px;
  }
}

/*
 * Stacked (< lg): keep a legacy-thick yellow LEFT rail beside the dark QR band.
 * Below ~576px (and when Gold1 page chrome already insets the section) a plain
 * max-width:100% container collapses the rail to a sliver (~8px). Legacy shows
 * ~40px. Cap the container so ~3rem yellow remains on each side; :after still
 * paints the dark bleed to the right edge only.
 */
@media (max-width: 991.98px) {
  #content-banner-qrcode1 > .container {
    max-width: min(720px, calc(100% - 6rem));
  }
}

/* Match legacy Bootstrap 4 row gutters (15px), not Gold1's 32px gutters */
#content-banner-qrcode1 > .container > .row {
  --bs-gutter-x: 30px;
  --bs-gutter-y: 0;
  margin-left: -15px;
  margin-right: -15px;
}

#content-banner-qrcode1 > .container > .row > [class*="col-"] {
  padding-left: 15px;
  padding-right: 15px;
}

/* --- yellow call-to-action (legacy .subscribe-call-to-acton) --- */
#content-banner-qrcode1 .subscribe-call-to-acton {
  min-height: 115px;
  padding: 30px 0 0 30px;
  box-sizing: border-box;
}

#content-banner-qrcode1 .subscribe-call-to-acton h3 {
  font-size: 18px;
  margin-top: 0;
  margin-bottom: 5px;
  font-weight: 700;
  color: #212529;
  text-transform: uppercase;
}

#content-banner-qrcode1 .subscribe-call-to-acton h4 {
  color: #fff;
  font-size: 24px;
  margin: 0;
  font-weight: 700;
  text-transform: uppercase;
}

@media (max-width: 575px) {
  #content-banner-qrcode1 .subscribe-call-to-acton {
    text-align: center;
    padding: 30px 0;
    min-height: auto;
  }
}

/* --- dark QR column (legacy .ts-newsletter) --- */
#content-banner-qrcode1 .ts-newsletter {
  background: #252525;
  position: relative;
  min-height: 115px;
  padding: 15px 0 0 50px;
  box-sizing: border-box;
  margin: 0;
  /* legacy also uses .row.align-items-center on this node */
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

/* Neutralize nested Bootstrap .row gutters inside the newsletter
   (legacy markup uses class "ts-newsletter row align-items-center"). */
#content-banner-qrcode1 .ts-newsletter.row {
  margin-left: 0;
  margin-right: 0;
  --bs-gutter-x: 0;
  --bs-gutter-y: 0;
}

#content-banner-qrcode1 .ts-newsletter.row > * {
  padding-left: 0;
  padding-right: 0;
  width: auto;
  max-width: 100%;
  flex-shrink: 0;
}

@media (max-width: 767px) {
  #content-banner-qrcode1 .ts-newsletter {
    padding-top: 20px;
    padding-bottom: 10px;
  }
}

@media (max-width: 575px) {
  #content-banner-qrcode1 .ts-newsletter {
    padding: 30px 5px 15px 5px;
    min-height: auto;
    text-align: center;
    justify-content: center;
  }
}

/* Bleed dark background past the container to the right page edge (legacy :after) */
#content-banner-qrcode1 .ts-newsletter:after {
  content: "";
  position: absolute;
  background: #252525;
  display: block;
  width: 100%;
  height: 100%;
  right: -100%;
  top: 0;
  z-index: 0;
  pointer-events: none;
}

#content-banner-qrcode1 .ts-newsletter > * {
  position: relative;
  z-index: 1;
}

/* --- QR image (legacy inline .max-width-image = 200px square) --- */
#content-banner-qrcode1 .latest-post-imgm {
  width: 100%;
  height: auto;
}

#content-banner-qrcode1 .max-width-image,
#content-banner-qrcode1 img.max-width-image.img-fluid {
  max-width: 200px !important;
  width: 200px !important;
  height: 200px !important;
  object-fit: contain;
  display: block;
  background: #fff;
  flex: 0 0 auto !important;
  image-rendering: pixelated;
}

@media (max-width: 575px) {
  #content-banner-qrcode1 .max-width-image,
  #content-banner-qrcode1 img.max-width-image.img-fluid {
    margin-left: auto;
    margin-right: auto;
  }
}

/* Domain under QR (legacy h4.text-white after img) */
#content-banner-qrcode1 .ts-newsletter > h4.text-white,
#content-banner-qrcode1 .ts-newsletter h4.text-white {
  color: #fff !important;
  font-size: 18px;
  font-weight: 700;
  margin: 12px 0 0;
  width: 100%;
  flex: 0 0 100%;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

@media (max-width: 575px) {
  #content-banner-qrcode1 .ts-newsletter h4.text-white {
    text-align: center;
  }
}

/* --- edit affordance (current capability; unobtrusive) --- */
#content-banner-qrcode1 .content-banner-qrcode1__edit {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 3;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.92);
  color: #1f2a2e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  font-size: 0.95rem;
  line-height: 1;
}

#content-banner-qrcode1 .content-banner-qrcode1__edit:hover,
#content-banner-qrcode1 .content-banner-qrcode1__edit:focus {
  background: #fff;
  color: #000;
}

/* --- editor panel (current capability) --- */
#content-banner-qrcode1 .content-banner-qrcode1__editor {
  background: #fff;
  color: #1f2a2e;
  padding: 1rem 1.25rem 1.25rem;
  border: 1px solid rgba(31, 42, 46, 0.15);
  margin: 1rem 0;
}

#content-banner-qrcode1 .content-banner-qrcode1__editor-title {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
  font-weight: 700;
}

#content-banner-qrcode1 .content-banner-qrcode1__editor-lang,
#content-banner-qrcode1 .content-banner-qrcode1__note {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: rgba(31, 42, 46, 0.7);
}

#content-banner-qrcode1 .content-banner-qrcode1__field {
  margin-bottom: 0.75rem;
}

#content-banner-qrcode1 .content-banner-qrcode1__field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

#content-banner-qrcode1 .content-banner-qrcode1__field input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(31, 42, 46, 0.25);
  border-radius: 0.35rem;
  padding: 0.45rem 0.6rem;
  font: inherit;
}

#content-banner-qrcode1 .content-banner-qrcode1__field input[readonly] {
  background: rgba(31, 42, 46, 0.06);
  color: rgba(31, 42, 46, 0.75);
}

#content-banner-qrcode1 .content-banner-qrcode1__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

#content-banner-qrcode1 .content-banner-qrcode1__actions button,
#content-banner-qrcode1 .content-banner-qrcode1__actions a {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  border-radius: 0.35rem;
  border: 0;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
}

#content-banner-qrcode1 .content-banner-qrcode1__save {
  background: #d4b46a;
  color: #1f2a2e;
  font-weight: 600;
}

#content-banner-qrcode1 .content-banner-qrcode1__cancel {
  background: rgba(31, 42, 46, 0.08);
  color: #1f2a2e;
}
