/* Reusable slide-up bottom sheet (full width, content-height) for the bottom ad unit */
.adunit-popup {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  transform: none;
  width: 100%;
  z-index: 9998;
  pointer-events: none;
}

.adunit-popup__panel {
  width: 100%;
  height: auto;
  background: #d84e55;
  border-top: 2px solid rgba(0, 0, 0, 0.22);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.22);
  overflow: hidden;

  transform: translateY(100%);
  transition: transform 260ms ease;
}

.adunit-popup[data-open="true"] {
  pointer-events: auto;
}

.adunit-popup[data-open="true"] .adunit-popup__panel {
  transform: translateY(0);
}

.adunit-popup__content {
  max-width: 560px;
  margin: 0 auto;
  max-height: calc(100vh - var(--adunit-strip-h) - env(safe-area-inset-bottom));
  overflow: auto;
  display: grid;
  grid-template-rows: auto 1fr;
  padding-bottom: calc(var(--adunit-strip-h) + env(safe-area-inset-bottom));
}

.adunit-popup__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid rgba(0, 0, 0, 0.18);
}

.adunit-popup__title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #ffffff;
}

.adunit-popup__logo {
  height: 18px;
  width: auto;
  filter: brightness(0) invert(1);
}

.adunit-popup__close {
  border: 0;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.22);
  border-radius: 999px;
  width: 34px;
  height: 30px;
  cursor: pointer;
  font-weight: 900;
  line-height: 1;
}

.adunit-popup__body {
  padding: 12px;
  display: grid;
  gap: 10px;
  align-content: start;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color: #ffffff;
}

.adunit-popup__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.adunit-popup__headline {
  font-weight: 900;
  font-size: 16px;
  letter-spacing: -0.2px;
  margin: 0;
}

.adunit-popup__selected {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 800;
  letter-spacing: 0.2px;
}

.adunit-popup__hint {
  margin: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.35;
}

.adunit-popup__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.92);
}

.adunit-legend {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.adunit-dot {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  border: 2px solid rgba(0, 0, 0, 0.28);
  background: #f1f1f1;
}

.adunit-dot--selected {
  background: #ffd400;
  border-color: rgba(0, 0, 0, 0.28);
}

.adunit-dot--booked {
  background: #8e8e8e;
  border-color: rgba(0, 0, 0, 0.28);
}

.adunit-popup__seats {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 2px solid rgba(0, 0, 0, 0.28);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.08);
}

.adunit-bus {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.adunit-bus__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.adunit-bus__front {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #ffffff;
}

.adunit-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  border: 2px solid rgba(0, 0, 0, 0.28);
  background: rgba(255, 255, 255, 0.16);
  font-weight: 900;
  font-size: 11px;
  color: #ffffff;
}

.adunit-bus__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  align-items: center;
}

.adunit-aisle {
  height: 28px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.12);
}

.adunit-seat {
  height: 28px;
  border-radius: 8px;
  border: 2px solid rgba(0, 0, 0, 0.28);
  background: #f1f1f1;
  cursor: pointer;
  font-weight: 900;
  font-size: 11px;
  color: #111;
}

.adunit-seat[aria-pressed="true"] {
  background: #ffd400;
  border-color: rgba(0, 0, 0, 0.32);
  color: #111;
}

.adunit-seat:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.adunit-seat--booked {
  background: #8e8e8e;
  border-color: rgba(0, 0, 0, 0.32);
  color: #1b1b1b;
}

.adunit-popup__actions {
  margin-top: auto;
  display: grid;
  gap: 10px;
}

.adunit-popup__primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  height: 40px;
  background: #b10000;
  color: #fff;
  font-weight: 900;
  border: 0;
  cursor: pointer;
  text-decoration: none;
}

.adunit-popup__primary[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.adunit-popup__secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  height: 40px;
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  font-weight: 800;
  border: 1px solid rgba(0, 0, 0, 0.22);
  cursor: pointer;
  text-decoration: none;
}

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

