/* Waiting-times widget — self-contained & namespaced under .wt-root so it can
   be dropped into the marketing portal now and iframed / inlined on
   toverland.com later without colliding with the site's Tailwind build.
   Tokens mirror the Toverland attracties cards. */

.wt-root {
  --wt-primary-dark: #092f87;
  --wt-primary: #046fcd;
  --wt-teal: #189a8e;
  --wt-secondary-inverse: #e7eefd;
  --wt-grey: #a6a6a6;
  --wt-grey-light: #f2f2f2;
  --wt-white: #fff;
  --wt-text: #111827;
  --wt-shadow: 0px 4px 8px 0px rgba(9, 47, 135, 0.18);
  --wt-radius: 1rem;
  --wt-radius-sm: 0.5rem;

  font-family: Ubuntu, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--wt-text);
  box-sizing: border-box;
  width: 100%;
}
.wt-root *,
.wt-root *::before,
.wt-root *::after {
  box-sizing: border-box;
}

/* ---------------------------------------------------------------- controls */
.wt-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.wt-search {
  position: relative;
  flex: 1 1 240px;
  min-width: 200px;
}
.wt-search input {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem 0.5rem 2.25rem;
  border: 1px solid var(--wt-primary);
  border-radius: var(--wt-radius-sm) 0 var(--wt-radius-sm) 0;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s ease;
}
.wt-search input:focus {
  border-color: var(--wt-primary-dark);
}
.wt-search svg {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--wt-primary);
  pointer-events: none;
}
.wt-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.wt-field label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--wt-primary-dark);
  white-space: nowrap;
}
.wt-select {
  min-height: 2.75rem;
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  border: 1px solid var(--wt-primary);
  border-radius: var(--wt-radius-sm) 0 var(--wt-radius-sm) 0;
  background: var(--wt-white)
    url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23092F87' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E")
    no-repeat right 0.75rem center;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--wt-primary-dark);
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
.wt-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--wt-primary-dark);
  cursor: pointer;
  user-select: none;
}
.wt-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--wt-primary-dark);
  cursor: pointer;
}

/* ---------------------------------------------------------------- status bar */
.wt-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  color: #6b7280;
}
.wt-updated {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.wt-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: var(--wt-teal);
  flex-shrink: 0;
}
.wt-dot--stale {
  background: var(--wt-grey);
}

/* ---------------------------------------------------------------- grid */
.wt-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 640px) {
  .wt-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1100px) {
  .wt-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------------------------------------------------------------- card */
.wt-card {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  background: var(--wt-white);
  border-radius: var(--wt-radius) 0 var(--wt-radius) 0; /* top-left + bottom-right */
  box-shadow: var(--wt-shadow);
  overflow: hidden;
  isolation: isolate;
  min-height: 118px;
}
a.wt-card,
a.wt-card:hover,
a.wt-card:focus {
  text-decoration: none;
  color: inherit;
}
.wt-card--link {
  cursor: pointer;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.wt-card--link:hover {
  box-shadow: 0px 8px 18px 0px rgba(9, 47, 135, 0.24);
  transform: translateY(-2px);
}
.wt-card--link:focus-visible {
  outline: 0.2rem dotted var(--wt-primary);
  outline-offset: 0.25rem;
}

.wt-card__media {
  position: relative;
  flex-shrink: 0;
  width: 108px;
  background: var(--wt-secondary-inverse);
}
.wt-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.wt-card__media--empty::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #dfe8fb, #eef3fe);
}

/* status row inside the card body (replaces the old image pill) */
.wt-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 500;
}
.wt-status__dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  flex-shrink: 0;
}
.wt-status--open {
  color: var(--wt-teal);
}
.wt-status--open .wt-status__dot {
  background: var(--wt-teal);
}
.wt-status--later {
  color: #b26b00;
}
.wt-status--later .wt-status__dot {
  background: #e8920c;
}
.wt-status--closed,
.wt-status--closed_today {
  color: #6b7280;
}
.wt-status--closed .wt-status__dot,
.wt-status--closed_today .wt-status__dot {
  background: var(--wt-grey);
}

.wt-card__body {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0.9rem;
  min-width: 0;
}
.wt-card__text {
  flex: 1 1 auto;
  min-width: 0;
}
.wt-card__title {
  font-family: Publico, Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-size: 1.05rem;
  line-height: 1.2;
  color: var(--wt-primary-dark);
  margin: 0 0 0.15rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.wt-card__subtitle {
  font-size: 0.82rem;
  color: #4b5563;
  margin: 0 0 0.4rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* waiting-time block (mirrors the light-blue .bg-secondary-inverse panel) */
.wt-wait {
  flex-shrink: 0;
  width: 84px;
  min-height: 78px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.4rem 0.3rem;
  background: var(--wt-secondary-inverse);
  border-radius: var(--wt-radius-sm) 0 var(--wt-radius-sm) 0;
}
.wt-wait__label {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--wt-primary);
  margin-bottom: 0.15rem;
}
.wt-wait__value {
  font-family: Publico, Georgia, serif;
  font-weight: 700;
  font-size: 1.7rem;
  line-height: 1;
  color: var(--wt-primary-dark);
}
.wt-wait__unit {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--wt-primary);
  margin-top: 0.1rem;
}
.wt-wait--closed {
  background: var(--wt-grey-light);
}
.wt-wait--closed .wt-wait__value {
  font-size: 1rem;
  color: var(--wt-grey);
}
.wt-wait--closed .wt-wait__label,
.wt-wait--closed .wt-wait__unit {
  color: var(--wt-grey);
}
.wt-wait--later {
  background: #fdf1dd;
}
.wt-wait--later .wt-wait__label {
  color: #b26b00;
}
.wt-wait--open .wt-wait__value--text {
  color: var(--wt-teal);
}
.wt-wait__value--time {
  font-size: 1.35rem;
  color: #8a5200;
}
.wt-wait__value--text {
  font-size: 0.92rem;
}

/* ---------------------------------------------------------------- states */
.wt-empty,
.wt-message {
  grid-column: 1 / -1;
  padding: 2.5rem 1rem;
  text-align: center;
  color: #6b7280;
  font-size: 0.95rem;
}
.wt-skeleton {
  min-height: 118px;
  border-radius: var(--wt-radius) 0 var(--wt-radius) 0;
  background: linear-gradient(100deg, #eef1f6 30%, #f7f9fc 50%, #eef1f6 70%);
  background-size: 200% 100%;
  animation: wt-shimmer 1.2s ease-in-out infinite;
}
@keyframes wt-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.wt-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* ---------------------------------------------------------------- shows */
.wt-showtimes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.1rem;
}
.wt-showtime {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: var(--wt-radius-sm) 0 var(--wt-radius-sm) 0;
  background: var(--wt-secondary-inverse);
  color: var(--wt-primary-dark);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.5;
}
.wt-wait--show {
  background: var(--wt-secondary-inverse);
}
.wt-wait--show .wt-wait__label {
  color: var(--wt-primary);
}
.wt-wait--show .wt-wait__value--time {
  color: var(--wt-primary-dark);
}

/* anchor nav + section headers */
.wt-anchornav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.wt-anchornav a {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border-radius: 9999px;
  background: var(--wt-secondary-inverse);
  color: var(--wt-primary-dark);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s ease;
}
.wt-anchornav a:hover {
  background: #d7e2fb;
}
.wt-section {
  scroll-margin-top: 1rem;
}
.wt-section-title {
  font-family: Publico, Georgia, "Times New Roman", serif;
  font-weight: 500;
  color: var(--wt-primary-dark);
  font-size: 1.75rem;
  margin: 2.5rem 0 1.25rem;
}

/* neutral status (status_id text mapping with state = neutral) */
.wt-status--neutral {
  color: var(--wt-primary);
}
.wt-status--neutral .wt-status__dot {
  background: var(--wt-primary);
}
.wt-wait--neutral {
  background: var(--wt-secondary-inverse);
}
.wt-wait--neutral .wt-wait__value--text {
  color: var(--wt-primary);
}
/* status-text values (e.g. "Wisselschema") may be longer — allow wrapping */
.wt-wait__value--text {
  white-space: normal;
  line-height: 1.15;
  word-break: break-word;
}

/* refresh button (in the status bar) */
.wt-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 9999px;
  background: transparent;
  color: var(--wt-primary);
  cursor: pointer;
  transition: background 0.15s ease;
}
.wt-refresh:hover {
  background: var(--wt-secondary-inverse);
}
.wt-refresh svg {
  width: 16px;
  height: 16px;
  display: block;
}
.wt-refresh.wt-spinning svg {
  animation: wt-spin 0.7s linear infinite;
}
@keyframes wt-spin {
  to { transform: rotate(360deg); }
}
