/* Shared event semantics; each design retains its layout and accent palette. */
body { --event-accent: #146738; --event-tint: #edf6e9; --event-ink: #164529; }
body.direction-programm, body.flyer-design { --event-accent: #98206b; --event-tint: #fff2bd; --event-ink: #64204e; }
body.direction-abend { --event-accent: #a9d995; --event-tint: #233b2d; --event-ink: #f2f7eb; }
body [data-event-kind="special"] {
  background: var(--event-tint) !important;
  color: var(--event-ink) !important;
  box-shadow: inset 4px 0 0 var(--event-accent);
  padding-inline: 18px !important;
}
body [data-event-kind="special"] :is(h2,h3,strong,time,time b,time span,p,small,a,.row-arrow) { color: var(--event-ink) !important; }
body [data-event-kind="internal"] {
  background: #f0f0f0 !important;
  color: #595959 !important;
  box-shadow: inset 4px 0 0 #777;
  padding-inline: 18px !important;
}
body [data-event-kind="internal"] :is(h2,h3,strong,time,time b,time span,p,small,a,.row-arrow,summary,.event-date) { color: #595959 !important; }
body [data-event-kind="internal"] time b { background: transparent !important; }
body [data-event-kind="internal"] img { filter: grayscale(1); }
body [data-event-kind] .event-kind-label {
  display: table;
  position: static;
  inset: auto;
  max-width: 100%;
  margin: 8px 0;
  padding: 4px 8px;
  border: 1px solid currentColor;
  border-radius: 3px;
  font: 700 12px/1.4 Arial, sans-serif;
  letter-spacing: 0;
  text-transform: none;
  overflow-wrap: anywhere;
  color: inherit;
}
body [data-event-kind="special"] .event-kind-label { background: var(--event-accent); color: #fff; border-color: var(--event-accent); }
body.direction-abend [data-event-kind="special"] .event-kind-label { color: #17251c; }
body [data-event-kind="internal"] .event-kind-label { background: #e2e2e2; color: #505050; }
body .event-legend-special { color: #146738; font-weight: 700; }
body .event-legend-internal { color: #595959; }

/* Explicit room and time changes include text, so the warning does not rely on color. */
body [data-event-kind] :is(.event-room-warning, .event-time-warning) {
  display: inline-flex; align-items: baseline; gap: .3rem; max-width: 100%; margin: 0; padding: .3rem .6rem;
  border: 1px solid #aa7b16; border-radius: 5px; background: #fff3cc;
  color: #654100 !important; font-size: .9rem; font-weight: 700; line-height: 1.5;
  overflow-wrap: anywhere;
}
body [data-event-kind] :is(.event-room-warning, .event-time-warning) span { color: inherit !important; }
html[data-theme="dark"] body [data-event-kind] :is(.event-room-warning, .event-time-warning) {
  background: #40351d; color: #ffe4a0 !important; border-color: #bc9650;
}

body [data-event-kind] .event-change-warnings { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0; align-items: flex-start; }

/* Participant explanation uses the native disclosure, including keyboard support. */
body [data-event-kind] details.event-kind-info { margin: 0; padding: 0; border: 0; background: transparent; }
body [data-event-kind] .event-kind-info > summary.event-kind-label {
  display: list-item; width: fit-content; margin: 8px 0; cursor: pointer;
  text-decoration: underline; text-underline-offset: .2em;
}
body [data-event-kind] .event-kind-info > summary:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
body [data-event-kind] .event-kind-info > .event-kind-explanation { margin: .5rem 0 1rem; font-size: .95rem; line-height: 1.5; }
@media print {
  body [data-event-kind] .event-kind-info > summary.event-kind-label { display: block; text-decoration: none; }
  body [data-event-kind] .event-kind-info > .event-kind-explanation { display: block !important; }
}

/* Restricted participant circle with a visible registration requirement. */
body [data-event-kind="club_circle"] {
  --club-background: #e9e9e7; --club-text: #595959; --club-border: #90908b;
  background: var(--club-background) !important; color: var(--club-text) !important;
  box-shadow: inset 4px 0 0 var(--club-border); padding-inline: 18px !important;
}
html[data-theme="dark"] body [data-event-kind="club_circle"] {
  --club-background: #292b29; --club-text: #c4c7c2; --club-border: #777b75;
}
body [data-event-kind="club_circle"] :is(h2,h3,strong,time,time b,time span,p,small,a,summary,.event-date) { color: var(--club-text) !important; }
body [data-event-kind="club_circle"] time b { background: transparent !important; }
body [data-event-kind="club_circle"] img { filter: grayscale(.65); }
body [data-event-kind="club_circle"] .event-kind-label { background: var(--club-background); color: var(--club-text); }
body [data-event-kind] .event-key-icon {
  width: 1.1em; height: 1.1em; display: inline-block; vertical-align: -.15em;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
body [data-event-kind] .event-registration-note { margin: .25rem 0 .75rem; font-size: .9rem; font-weight: 700; }
@media print {
  body [data-event-kind="club_circle"] { --club-background: #e9e9e7; --club-text: #595959; --club-border: #90908b; print-color-adjust: exact; }
}

body [data-event-kind="club_circle"] .event-kind-info > summary.event-kind-label {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 32px;
  padding: 4px 8px; list-style: none;
}
body [data-event-kind="club_circle"] .event-kind-info > summary::-webkit-details-marker { display: none; }
body [data-event-kind="club_circle"] .event-kind-info > summary::after { content: '▸'; text-decoration: none; }
body [data-event-kind="club_circle"] .event-kind-info[open] > summary::after { content: '▾'; }
body [data-event-kind="club_circle"] .event-key-icon { width: 16px; height: 16px; flex: 0 0 16px; }
