/*
 * DMagicWorld shared public pill system.
 * One semantic palette for the website and the content loaded inside the app.
 * Component files may keep their own sizing/layout; this file owns shape,
 * foreground, background, border and interaction contrast.
 */

html.dmw-new {
  --dmw-pill-primary-bg: #075f93;
  --dmw-pill-primary-text: #ffffff;
  --dmw-pill-primary-border: #075077;
  --dmw-pill-primary-hover: #06496f;
  --dmw-pill-secondary-bg: #edf5fb;
  --dmw-pill-secondary-text: #0b416a;
  --dmw-pill-secondary-border: #9fc5de;
  --dmw-pill-info-bg: #e6f2ff;
  --dmw-pill-info-text: #164e7c;
  --dmw-pill-info-border: #8bb7d8;
  --dmw-pill-success-bg: #e3f7ea;
  --dmw-pill-success-text: #11613a;
  --dmw-pill-success-border: #69b98a;
  --dmw-pill-warning-bg: #fff0ce;
  --dmw-pill-warning-text: #744400;
  --dmw-pill-warning-border: #d89421;
  --dmw-pill-danger-bg: #ffe1e1;
  --dmw-pill-danger-text: #8b1515;
  --dmw-pill-danger-border: #e25555;
  --dmw-pill-muted-bg: #eef2f6;
  --dmw-pill-muted-text: #41576b;
  --dmw-pill-muted-border: #c5d0da;
  --dmw-pill-focus: #18a8d5;
}

html.dmw-new.dmw-dark,
html.dmw-new.dark {
  --dmw-pill-primary-bg: #1699c8;
  --dmw-pill-primary-text: #031329;
  --dmw-pill-primary-border: #63d8f3;
  --dmw-pill-primary-hover: #63d8f3;
  --dmw-pill-secondary-bg: #173654;
  --dmw-pill-secondary-text: #e8f5ff;
  --dmw-pill-secondary-border: #5f91b7;
  --dmw-pill-info-bg: #142f55;
  --dmw-pill-info-text: #c8e7ff;
  --dmw-pill-info-border: #6498c4;
  --dmw-pill-success-bg: #123b2c;
  --dmw-pill-success-text: #a6f5c4;
  --dmw-pill-success-border: #3f9a6b;
  --dmw-pill-warning-bg: #4c3510;
  --dmw-pill-warning-text: #ffe09a;
  --dmw-pill-warning-border: #d59a34;
  --dmw-pill-danger-bg: #571d28;
  --dmw-pill-danger-text: #ffd2d8;
  --dmw-pill-danger-border: #ff7184;
  --dmw-pill-muted-bg: #1f2d3b;
  --dmw-pill-muted-text: #d4e0ea;
  --dmw-pill-muted-border: #536b82;
  --dmw-pill-focus: #63d8f3;
}

/* Shared geometry: preserve component layout, standardise the visual language. */
html.dmw-new body :is(
  .radiohub-btn,
  .radiohub-label-pill,
  .radiohub-pill,
  .dmw-now-badge,
  .dmw-cont-badge,
  .discover-request,
  .discover-pill,
  .discover-time-pill,
  .discover-request-pill,
  .dmw-podcast-button,
  .resort-tab,
  .closed-mode-pill,
  .status-pill,
  .wait-badge,
  .rest-chip,
  .rest-badge,
  .show-time-chip,
  .show-times-toggle,
  .show-refurb-badge,
  .attr-down-chip,
  .attr-hero-chip,
  .attr-nearby-pill,
  .attr-stat-pill,
  .insight-quick-pill,
  .upcoming-day-pill,
  .dmw-schedule-details-btn,
  .dmw-global-pill
) {
  border-radius: 999px !important;
  border-width: 1px !important;
  border-style: solid !important;
  box-sizing: border-box;
  font-family: "Montserrat", Arial, sans-serif;
  font-weight: 800;
  line-height: 1.2;
  text-shadow: none !important;
}

/* Primary calls to action: matches the approved Request-page treatment. */
html.dmw-new body :is(
  .radiohub-actions .radiohub-btn,
  a.discover-request,
  .dmw-podcast-button,
  .dmw-request-wrap .btn:not(.btn-muted)
),
html.dmw-new body :is(
  .radiohub-actions .radiohub-btn,
  a.discover-request,
  .dmw-podcast-button,
  .dmw-request-wrap .btn:not(.btn-muted)
):visited {
  background: var(--dmw-pill-primary-bg) !important;
  color: var(--dmw-pill-primary-text) !important;
  border-color: var(--dmw-pill-primary-border) !important;
  box-shadow: 0 8px 18px rgba(2, 34, 61, .14) !important;
  text-decoration: none !important;
}

html.dmw-new body :is(
  .radiohub-actions .radiohub-btn,
  a.discover-request,
  .dmw-podcast-button,
  .dmw-request-wrap .btn:not(.btn-muted)
):is(:hover, :focus-visible) {
  background: var(--dmw-pill-primary-hover) !important;
  color: var(--dmw-pill-primary-text) !important;
  border-color: var(--dmw-pill-primary-border) !important;
  filter: none !important;
  outline: 3px solid color-mix(in srgb, var(--dmw-pill-focus) 35%, transparent) !important;
  outline-offset: 2px;
  transform: translateY(-1px);
}

/* Neutral and informational labels/actions. */
html.dmw-new body :is(
  .radiohub-label-pill,
  .radiohub-pill,
  .discover-pill,
  .discover-time-pill,
  .closed-mode-pill,
  .rest-chip,
  .attr-hero-chip,
  .attr-nearby-pill,
  .attr-stat-pill,
  .insight-quick-pill,
  .upcoming-day-pill,
  .dmw-schedule-details-btn,
  .show-times-toggle,
  .dmw-global-pill
) {
  background: var(--dmw-pill-info-bg) !important;
  color: var(--dmw-pill-info-text) !important;
  border-color: var(--dmw-pill-info-border) !important;
}

html.dmw-new body :is(.show-times-toggle, .dmw-schedule-details-btn):is(:hover, :focus-visible) {
  background: var(--dmw-pill-secondary-bg) !important;
  color: var(--dmw-pill-secondary-text) !important;
  border-color: var(--dmw-pill-secondary-border) !important;
  outline: 3px solid color-mix(in srgb, var(--dmw-pill-focus) 30%, transparent) !important;
  outline-offset: 2px;
}

/* Success/open/live. */
html.dmw-new body :is(
  .pill-open,
  .wait-open,
  .rest-open,
  .dmw-global-pill.is-live,
  .discover-request-pill.done,
  .discover-request-pill.eta
) {
  background: var(--dmw-pill-success-bg) !important;
  color: var(--dmw-pill-success-text) !important;
  border-color: var(--dmw-pill-success-border) !important;
}

/* Warning, refurbishment, busy and current/soon markers. */
html.dmw-new body :is(
  .pill-refurb,
  .wait-med,
  .rest-refurb,
  .show-refurb-badge,
  .show-time-chip.now,
  .show-now-badge,
  .dmw-now-badge,
  .dmw-global-pill.is-show,
  .discover-request-pill.waiting
) {
  background: var(--dmw-pill-warning-bg) !important;
  color: var(--dmw-pill-warning-text) !important;
  border-color: var(--dmw-pill-warning-border) !important;
}

/* Closed, down and genuinely high waits. */
html.dmw-new body :is(
  .pill-closed,
  .wait-high,
  .attr-down-chip,
  .dmw-global-pill.is-down
) {
  background: var(--dmw-pill-danger-bg) !important;
  color: var(--dmw-pill-danger-text) !important;
  border-color: var(--dmw-pill-danger-border) !important;
}

/* Muted/loading/past labels remain legible without competing for attention. */
html.dmw-new body :is(
  .pill-loading,
  .wait-closed,
  .rest-closed,
  .show-time-chip.past,
  .discover-request-pill.muted
) {
  background: var(--dmw-pill-muted-bg) !important;
  color: var(--dmw-pill-muted-text) !important;
  border-color: var(--dmw-pill-muted-border) !important;
}

html.dmw-new body :is(
  .dmw-cont-badge,
  .discover-request-pill.inqueue
) {
  background: var(--dmw-pill-info-bg) !important;
  color: var(--dmw-pill-info-text) !important;
  border-color: var(--dmw-pill-info-border) !important;
}

/* Scheduled refurbishment is information; active/today closure remains clear. */
html.dmw-new body #refurb-list .closed-kind-upcoming .wait-badge {
  background: var(--dmw-pill-info-bg) !important;
  color: var(--dmw-pill-info-text) !important;
  border-color: var(--dmw-pill-info-border) !important;
}

html.dmw-new body #refurb-list :is(.closed-kind-today, .closed-kind-closed) .wait-badge {
  background: var(--dmw-pill-danger-bg) !important;
  color: var(--dmw-pill-danger-text) !important;
  border-color: var(--dmw-pill-danger-border) !important;
}

/* The hero always sits on photography, independent of page theme. */
html.dmw-new body .park-hero .resort-tab {
  background: rgba(3, 27, 53, .78) !important;
  color: #ffffff !important;
  border-color: rgba(142, 216, 241, .82) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.13), 0 5px 12px rgba(0,16,36,.18) !important;
}

html.dmw-new body .park-hero .resort-tab:not(.active):is(:hover, :focus-visible) {
  background: #075f93 !important;
  color: #ffffff !important;
  border-color: #8ed8f1 !important;
  outline: 3px solid rgba(99,216,243,.35) !important;
  outline-offset: 2px;
}

html.dmw-new body .park-hero .resort-tab.active {
  background: #ffffff !important;
  color: #07395f !important;
  border-color: #ffffff !important;
  box-shadow: 0 6px 16px rgba(0,16,36,.22) !important;
}

html.dmw-new body .park-hero .status-pill.pill-open {
  background: rgba(18, 79, 53, .92) !important;
  color: #d9ffe7 !important;
  border-color: #6fd69a !important;
}

html.dmw-new body .park-hero .status-pill.pill-closed {
  background: rgba(129, 21, 32, .94) !important;
  color: #ffffff !important;
  border-color: #ff8290 !important;
  box-shadow: 0 0 0 3px rgba(255,113,132,.18), 0 6px 16px rgba(0,16,36,.2) !important;
}

html.dmw-new body .park-hero .status-pill:is(.pill-loading, .pill-refurb) {
  color: #ffffff !important;
}

/* Links inside informational pills inherit the verified pill foreground. */
html.dmw-new body :is(.rest-chip, .dmw-global-pill) a,
html.dmw-new body :is(.rest-chip, .dmw-global-pill) a:visited {
  color: inherit !important;
}

/*
 * Final route-level contract. A few legacy route sheets are emitted after the
 * common assets and contain their own !important link colours. These selectors
 * deliberately include the real html/body route scope, so one shared palette
 * wins on Radio, Discover and the park switcher in both visitor themes.
 */
html.dmw-new.dmw-new-embedded:not(.dmw-dark) body.dmw-new-page .radiohub-actions .radiohub-btn,
html.dmw-new.dmw-new-embedded:not(.dmw-dark) body.dmw-new-page .radiohub-actions .radiohub-btn:visited,
html.dmw-new.dmw-new-embedded:not(.dmw-dark) body.dmw-new-page a.discover-request,
html.dmw-new.dmw-new-embedded:not(.dmw-dark) body.dmw-new-page a.discover-request:visited {
  background: #075f93 !important;
  color: #ffffff !important;
  border-color: #075077 !important;
  text-shadow: none !important;
}

html.dmw-new.dmw-new-embedded.dmw-dark body.dmw-new-page .radiohub-actions .radiohub-btn,
html.dmw-new.dmw-new-embedded.dmw-dark body.dmw-new-page .radiohub-actions .radiohub-btn:visited,
html.dmw-new.dmw-new-embedded.dmw-dark body.dmw-new-page a.discover-request,
html.dmw-new.dmw-new-embedded.dmw-dark body.dmw-new-page a.discover-request:visited {
  background: #1699c8 !important;
  color: #031329 !important;
  border-color: #63d8f3 !important;
  text-shadow: none !important;
}

html.dmw-new.dmw-new-embedded body.dmw-new-page .park-hero .resort-tab:not(.active),
html.dmw-new.dmw-new-embedded.dmw-dark body.dmw-new-page .park-hero .resort-tab:not(.active) {
  background: #07395f !important;
  color: #ffffff !important;
  border-color: #8ed8f1 !important;
  text-shadow: none !important;
}

html.dmw-new.dmw-new-embedded body.dmw-new-page .park-hero .resort-tab.active,
html.dmw-new.dmw-new-embedded.dmw-dark body.dmw-new-page .park-hero .resort-tab.active {
  background: #ffffff !important;
  color: #07395f !important;
  border-color: #ffffff !important;
  text-shadow: none !important;
}

@media (prefers-reduced-motion: reduce) {
  html.dmw-new body :is(.radiohub-btn, .discover-request, .dmw-podcast-button) {
    transition: none !important;
  }
}
