/* Escalator Ad Rotator
 * Styled to match the Escalator appeal boxes: cream panel, deep red rule, Georgia text, Arial labels.
 * Colors come from Settings > Ad Rotator (site color and background) and from each ad's own color.
 */
.ebr {
  --ebr-accent: #8b1e1e;
  --ebr-tint: #faf7f0;
  --ebr-ink: #222;
  --ebr-head: #1a1a1a;
  --ebr-muted: #777;
  --ebr-line: #d9d2c3;
  --ebr-sans: Arial, Helvetica, sans-serif;
  box-sizing: border-box;
  margin: 40px 0 1rem;
  padding: 28px 30px 24px;
  background: var(--ebr-tint);
  border: 1px solid var(--ebr-line);
  border-top: 5px solid var(--ebr-accent);
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--ebr-ink);
  line-height: 1.6;
}
.ebr__kicker {
  margin: 0 0 18px; font-family: var(--ebr-sans); font-size: 12px; font-weight: bold;
  letter-spacing: 2px; text-transform: uppercase; color: var(--ebr-accent);
}
.ebr__stage { display: flex; align-items: center; gap: .6rem; }
.ebr__grid { flex: 1 1 auto; display: flex; flex-wrap: wrap; gap: 2rem; min-width: 0; }

/* Without the script, only the first ad shows. With it, only the chosen ones. */
.ebr__book { display: none; flex: 1 1 240px; gap: 24px; align-items: flex-start; }
.ebr__book--fallback { display: flex; }
.ebr--js .ebr__book { display: none; }
.ebr--js .ebr__book.is-on { display: flex; animation: ebr-fade .45s ease; }
@keyframes ebr-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.ebr__cover { flex: 0 0 130px; }
.ebr__cover img { width: 130px; height: auto; display: block; border: 1px solid var(--ebr-line); box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }
.ebr__text { flex: 1 1 180px; min-width: 0; }
.ebr__title { margin: 0 0 6px; font-size: 24px; font-weight: bold; line-height: 1.25; color: var(--ebr-head); }
.ebr__subtitle { margin: 0 0 14px; font-style: italic; color: #555; }
.ebr__blurb { margin: 0 0 22px; font-size: 17px; }
.ebr__btn {
  display: inline-block; padding: 13px 30px; border-radius: 4px;
  background: var(--ebr-accent); color: #fff !important;
  font-family: var(--ebr-sans); font-size: 16px; font-weight: bold; line-height: 1.3;
  text-decoration: none !important; transition: filter .2s ease;
}
.ebr__btn:hover, .ebr__btn:focus { filter: brightness(.82); }
.ebr__note { margin: 12px 0 0; font-family: var(--ebr-sans); font-size: 12px; color: var(--ebr-muted); }

.ebr__arrow {
  flex: 0 0 auto; width: 2.4rem; height: 2.4rem; padding: 0; border: 1px solid var(--ebr-line); border-radius: 50%;
  background: #fff; color: var(--ebr-accent); font-size: 1.6rem; line-height: 1; cursor: pointer; box-shadow: none;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.ebr__arrow:hover { background: var(--ebr-accent); border-color: var(--ebr-accent); color: #fff; }
.ebr__arrow:focus-visible, .ebr__dot:focus-visible, .ebr__btn:focus-visible { outline: 3px solid #19b6de; outline-offset: 2px; }
.ebr__arrow[hidden], .ebr__dots[hidden] { display: none; }

.ebr__dots { display: flex; justify-content: center; gap: .45rem; margin-top: 20px; }
.ebr__dot { width: .6rem; height: .6rem; padding: 0; border: 0; border-radius: 50%; background: var(--ebr-line); cursor: pointer; }
.ebr__dot.is-on { background: var(--ebr-accent); }

/* Wide images (cartoons, photos, logos) */
.ebr__book--wide .ebr__cover { flex: 0 0 260px; }
.ebr__book--wide .ebr__cover img { width: 260px; background: #fff; box-shadow: none; }

/* Phones: one ad per screen, stacked. Cover on top, text below, full-width button.
 * Arrows are hidden (swipe, dots and the timer do the job) so the ad gets the full width. */
@media (max-width: 600px) {
  .ebr { margin: 28px 0 1rem; padding: 18px 16px 14px; touch-action: pan-y; }
  .ebr__kicker { margin-bottom: 14px; font-size: 11px; letter-spacing: 1.5px; }
  .ebr__arrow { display: none; }
  .ebr__grid { gap: 1.5rem; }

  /* In a column layout the desktop flex-basis values would become heights, so reset them. */
  .ebr__book { flex: 1 1 100%; flex-direction: column; align-items: stretch; gap: 16px; }
  .ebr__cover { flex: 0 0 auto; align-self: center; }
  .ebr__cover img { width: 150px; max-width: 60vw; }
  .ebr__text { flex: 0 0 auto; width: 100%; }

  .ebr__title { font-size: 21px; line-height: 1.25; margin-bottom: 4px; }
  .ebr__subtitle { font-size: 15px; line-height: 1.4; margin-bottom: 12px; }
  .ebr__blurb { font-size: 16px; line-height: 1.55; margin-bottom: 18px; }
  .ebr__btn { display: block; width: 100%; box-sizing: border-box; padding: 14px 16px; text-align: center; }
  .ebr__note { text-align: center; margin-top: 10px; }

  /* Wide images (cartoons, logos, photos) run edge to edge inside the panel. */
  .ebr__book--wide .ebr__cover { flex: 0 0 auto; align-self: stretch; }
  .ebr__book--wide .ebr__cover img { width: 100%; max-width: none; }

  /* Bigger tap area for the dots, same dot size. */
  .ebr__dots { gap: 0; margin-top: 12px; }
  .ebr__dot { width: 24px; height: 24px; padding: 7px; background-clip: content-box; }
}
@media (prefers-reduced-motion: reduce) {
  .ebr--js .ebr__book.is-on { animation: none; }
  .ebr__btn, .ebr__arrow { transition: none; }
}
