/* Public event: independent hero, aligned details and a full-width faction overview. */
.kp-public-event { --kp-event-muted:#56616f; --kp-event-link:#4954b8; }
[data-bs-theme="dark"] .kp-public-event { --kp-event-muted:#c2ccd6; --kp-event-link:#c6caff; }
.kp-event-overview { margin-bottom:1.5rem; }
.kp-event-pass { border:1px solid var(--ct-border-color); border-radius:.75rem; background:var(--ct-secondary-bg); box-shadow:0 8px 28px rgba(0,0,0,.07); overflow:hidden; }
.kp-event-hero { position:relative; isolation:isolate; overflow:hidden; display:grid; grid-template-columns:minmax(0,1.25fr) minmax(0,1fr); gap:2rem; align-items:center; min-height:320px; padding:2rem; background:linear-gradient(120deg,#172138,#253859); color:#fff; }
.kp-event-backdrop { position:absolute; z-index:-2; inset:0; width:100%; height:100%; object-fit:cover; filter:blur(12px); opacity:.55; }
.kp-event-hero::before { content:""; position:absolute; z-index:-1; inset:0; background:linear-gradient(100deg,rgba(14,22,36,.96),rgba(14,22,36,.74) 55%,rgba(14,22,36,.35)); }
.kp-event-hero::after { content:""; position:absolute; z-index:-1; top:-15rem; right:-9rem; width:42rem; height:42rem; border:1px solid rgba(255,255,255,.08); border-radius:50%; box-shadow:0 0 0 4rem rgba(255,255,255,.025),0 0 0 8rem rgba(255,255,255,.02); pointer-events:none; }
.kp-event-heading { display:flex; align-items:center; gap:1.5rem; min-width:0; }
.kp-event-heading-content { flex:1; min-width:0; }
.kp-event-heading h1 { margin:1rem 0; font-size:clamp(2rem,2.5vw,3.5rem); font-weight:700; line-height:1.06; letter-spacing:-.04em; color:#fff; text-wrap:balance; overflow-wrap:anywhere; }
.kp-event-heading-logo { flex:0 0 112px; width:112px; height:112px; object-fit:contain; padding:.75rem; border-radius:.65rem; background:#f4f6f8; }
.kp-event-heading #event_state { display:flex; flex-wrap:wrap; gap:.4rem; }
.kp-event-heading #event_state .badge { padding:.4rem .65rem; font-weight:500; }
.kp-event-heading #event_state :is(.bg-success,.bg-info,.bg-warning,.bg-danger) { color:#152536; }
.kp-event-heading #event_state .badge-secondary-lighten { color:#fff; background:rgba(255,255,255,.16); }
.kp-event-date { display:flex; align-items:flex-start; gap:.6rem; margin:0; color:#eef0f6; font-size:1rem; font-weight:500; line-height:1.6; overflow-wrap:anywhere; }
.kp-event-date > .mdi { flex:0 0 auto; }
.kp-event-date > span { min-width:0; }
.kp-event-category-links { display:flex; flex-wrap:wrap; gap:.4rem; margin:0; }
.kp-event-hero .kp-event-category-links .badge { padding:.35rem .55rem; font-weight:500; color:#fff; background:rgba(14,22,36,.88); border:1px solid rgba(255,255,255,.3); text-shadow:0 1px 2px rgba(0,0,0,.5); }
.kp-event-hero .kp-event-category-links .badge:hover { background:#253859; }
.kp-event-hero > .kp-event-category-links { position:absolute; z-index:1; bottom:1rem; left:1.25rem; right:1.25rem; }
.kp-event-hero:has(> .kp-event-category-links) { padding-bottom:4.5rem; }
.kp-event-cover { display:flex; align-items:center; justify-content:center; min-width:0; width:100%; margin:0; }
.kp-event-poster { position:relative; display:block; min-width:0; max-width:100%; border-radius:.5rem; overflow:hidden; box-shadow:0 12px 36px rgba(0,0,0,.25); }
.kp-event-poster > img { display:block; width:auto; height:auto; max-width:100%; max-height:clamp(16rem,18vw,24rem); object-fit:contain; }
.kp-event-poster:has(.kp-event-category-links)::after { content:""; position:absolute; inset:50% 0 0; background:linear-gradient(transparent,rgba(10,18,30,.8)); pointer-events:none; }
.kp-event-poster > .kp-event-category-links { position:absolute; z-index:1; bottom:.65rem; left:.65rem; right:.65rem; }
.kp-event-overview-actions { display:flex; flex-wrap:wrap; align-items:center; gap:.6rem; }
.kp-event-hero > .kp-event-status-ribbon { z-index:2; }
.kp-event-hero .kp-event-status-ribbon > span { color:#152536; }
.kp-event-hero.ribbon-box .kp-event-heading { padding-top:2.5rem; }
.kp-event-hero-website { display:inline-flex; align-items:center; gap:.5rem; max-width:100%; min-height:32px; margin-top:.5rem; color:#eef1ff; line-height:1.5; }
.kp-event-hero-website span { min-width:0; overflow-wrap:anywhere; }
.kp-event-hero-website:hover { color:#fff; text-decoration:underline; text-underline-offset:3px; }
.kp-event-hero > .kp-event-edit { position:absolute; z-index:2; top:.75rem; right:.75rem; }
.kp-event-overview .btn.kp-event-edit { min-height:32px; padding:.25rem .6rem; font-size:.8125rem; }
.kp-event-edit::after { content:""; position:absolute; inset:-6px 0; }
.kp-event-hero--cover { grid-template-columns:minmax(0,1fr); align-items:end; min-height:360px; }
.kp-event-hero--cover .kp-event-backdrop { filter:none; opacity:1; }
.kp-event-hero--cover::before { background:linear-gradient(0deg,rgba(10,18,30,.95),rgba(10,18,30,.2) 80%); }
.kp-event-hero--cover::after { display:none; }
.kp-event-hero--cover .kp-event-heading { max-width:48rem; }
.kp-event-hero--identity { grid-template-columns:minmax(0,1fr); min-height:240px; }
.kp-event-information { min-width:0; display:flex; flex-direction:column; }
.kp-event-information:not(:has(.kp-event-overview-summary,.kp-event-meta > section)) { display:none; }
.kp-event-overview-summary { display:grid; grid-template-columns:minmax(0,1fr); align-items:start; gap:1rem 1.5rem; padding:1.5rem 2rem; }
.kp-event-detail-label,.kp-event-overview-facts dt { font-size:.8125rem; font-weight:500; color:var(--kp-event-muted); margin:0 0 .35rem; line-height:1.5; }
.kp-event-pricing { min-width:0; }
.kp-event-price-value,.kp-event-overview-facts dd { font-size:clamp(1.35rem,1.7vw,2rem); font-weight:600; letter-spacing:-.025em; line-height:1.25; color:var(--ct-emphasis-color); margin:0; overflow-wrap:anywhere; }
.kp-event-overview-facts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); column-gap:1.25rem; row-gap:0; margin:0; }
.kp-event-overview-facts > div { display:grid; grid-template-rows:auto auto; grid-template-rows:subgrid; grid-row:span 2; }
.kp-event-overview-facts > div { min-width:0; }
.kp-event-overview-facts:not(:has(.kp-event-pricing)) { grid-template-columns:repeat(2,minmax(0,1fr)); }
.kp-event-overview-facts dd small { display:block; font-size:.75rem; line-height:1.5; margin-top:.35rem; }
.kp-event-registration { grid-column:1 / -1; min-width:0; }
.kp-event-overview-actions .btn { min-width:12rem; }
.kp-event-overview-notice { font-size:.8125rem; margin:0; line-height:1.5; }
.kp-event-registration .kp-event-overview-notice + .kp-event-overview-actions { margin-top:.75rem; }
.kp-event-overview .btn { min-height:44px; display:inline-flex; align-items:center; justify-content:center; }
.kp-event-meta { display:none; flex:1; border-top:1px solid var(--ct-border-color); }
.kp-event-meta:has(> section) { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
.kp-event-meta > section { min-width:0; margin:0; border:0; border-radius:0; overflow:hidden; }
.kp-event-meta > .kp-event-host { border-left:1px solid var(--ct-border-color); }
.kp-event-meta > section:only-child { grid-column:1 / -1; }
.kp-event-host,.kp-event-venue { display:flex; flex-direction:column; background:var(--ct-tertiary-bg); }
.kp-event-detail-header { display:flex; align-items:center; gap:.45rem; padding:0; margin:0 0 .75rem; font-weight:600; color:inherit; font-size:1.25rem; line-height:1.35; }
.kp-event-country-flag { width:26px; height:16px; object-fit:contain; flex:0 0 auto; border-radius:0; box-shadow:none; }
.kp-event-organizer-identity { position:relative; isolation:isolate; flex:1; min-width:0; min-height:176px; padding:1.25rem; color:#fff; background:linear-gradient(135deg,#263955,#152135); }
.kp-event-organizer-details { display:flex; align-items:flex-start; gap:.75rem; min-width:0; }
.kp-event-organizer-logo { flex:0 0 56px; }
.kp-event-organizer-logo > img { width:56px; height:56px; object-fit:contain; border-radius:.5rem; padding:.4rem; background:#f4f6f8; }
.kp-event-organizer-info { flex:1; min-width:0; }
.kp-event-organizer { display:flex; align-items:center; gap:.4rem; color:#fff; }
.kp-event-organizer strong { font-size:1.25rem; line-height:1.4; min-width:0; overflow-wrap:anywhere; }
.kp-event-organizer > .mdi { font-size:.875rem; }
.kp-event-website { display:inline-flex; align-items:center; gap:.3rem; max-width:100%; overflow-wrap:anywhere; font-size:.875rem; line-height:1.5; min-height:28px; margin-top:0; color:#eef1ff; }
.kp-event-contact-links { display:flex; flex-direction:column; align-items:flex-start; gap:.1rem; min-width:0; margin-top:0; }
.kp-event-contact-link { display:inline-flex; align-items:center; gap:.4rem; min-height:28px; min-width:0; max-width:100%; color:#eef1ff; font-size:.875rem; line-height:1.5; }
.kp-event-contact-link span { min-width:0; overflow-wrap:anywhere; }
.kp-event-contact-link .mdi { color:inherit; flex:0 0 auto; }
.kp-event-organizer:hover,.kp-event-website:hover,.kp-event-contact-link:hover { color:#fff; text-decoration:underline; text-underline-offset:3px; }
.kp-event-venue { scroll-margin-top:8rem; }
.kp-event-location-link { display:flex; flex:1; color:#fff; min-width:0; }
.kp-event-location-visual { position:relative; display:flex; flex:1; align-items:flex-start; min-width:0; min-height:176px; padding:1.25rem; color:#fff; isolation:isolate; }
.kp-event-location-visual::after { content:""; position:absolute; inset:0; z-index:-1; background:linear-gradient(0deg,rgba(12,20,32,.92),rgba(12,20,32,.67)); }
.kp-event-location-photo { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:-2; }
.kp-event-location-visual--empty { background:linear-gradient(135deg,#263955,#152135); }
.kp-event-location-caption { min-width:0; overflow-wrap:anywhere; text-shadow:0 1px 3px rgba(0,0,0,.5); }
.kp-event-location-caption strong { display:flex; align-items:center; gap:.5rem; font-size:1.25rem; line-height:1.4; color:#fff; }
.kp-event-location-name > span { min-width:0; overflow-wrap:anywhere; }
.kp-event-location-address { display:block; margin-top:.25rem; color:#eef1ff; font-size:.875rem; line-height:1.6; overflow-wrap:anywhere; }
.kp-event-location-link:hover .kp-event-location-caption strong { text-decoration:underline; text-underline-offset:3px; }
.kp-event-pass > .kp-event-factions { margin:0; grid-column:1 / -1; border-top:1px solid var(--ct-border-color); padding:1rem 1.25rem; scroll-margin-top:8rem; }
.kp-event-factions-heading { display:flex; align-items:center; gap:.65rem; margin-bottom:.75rem; }
.kp-event-factions-heading h2 { font-size:.9375rem; margin:0; }
.kp-event-section-count { font-size:.75rem; color:var(--kp-event-muted); background:var(--ct-tertiary-bg); border-radius:.25rem; padding:.15rem .5rem; }
.kp-event-faction-list { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.75rem; margin-bottom:.75rem; }
.kp-event-faction-list:empty { display:none; }
.kp-event-faction-list > [hidden] { display:none; }
.kp-event-faction-list--1 { grid-template-columns:minmax(0,1fr); }
.kp-event-faction-list--2 { grid-template-columns:repeat(2,minmax(0,1fr)); }
.kp-event-faction-list--3 { grid-template-columns:repeat(3,minmax(0,1fr)); }
.kp-event-faction-list .kp-public-faction-item { gap:.75rem; padding:.85rem; border:1px solid var(--ct-border-color); border-radius:.5rem; background:var(--ct-secondary-bg); }
.kp-event-faction-list .inbox-item-img { margin:0; flex:0 0 40px; }
.kp-event-faction-list .inbox-item-img img { width:40px; height:40px; object-fit:contain; border-radius:.25rem; }
.kp-event-faction-list .kp-public-faction-main h3 { color:var(--ct-emphasis-color); font-size:.9375rem; line-height:1.4; margin:0 0 .3rem; }
.kp-event-faction-dot { display:inline-block; width:.55rem; height:.55rem; border-radius:50%; flex:0 0 .55rem; background:var(--kp-faction-color,var(--ct-primary)); }
.kp-event-faction-meta { display:flex; flex-wrap:wrap; gap:.2rem .75rem; color:var(--kp-event-muted); font-size:.8125rem; line-height:1.6; }
.kp-event-faction-vehicles { white-space:nowrap; }
.kp-event-faction-capacity { position:relative; width:100%; height:1.5rem; background:var(--ct-tertiary-bg); border-radius:.25rem; overflow:hidden; margin-top:.5rem; }
.kp-event-faction-meter { display:block; width:100%; height:100%; appearance:none; border:0; background:var(--ct-tertiary-bg); }
.kp-event-faction-meter::-webkit-progress-bar { background:var(--ct-tertiary-bg); }
.kp-event-faction-meter::-webkit-progress-value { background:var(--kp-faction-color,var(--ct-primary)); }
.kp-event-faction-meter::-moz-progress-bar { background:var(--kp-faction-color,var(--ct-primary)); }
.kp-event-faction-capacity-label { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:.75rem; font-weight:600; line-height:1.4; pointer-events:none; }
.kp-event-faction-capacity-label > span { padding:0 .35rem; border-radius:.2rem; background:#152536; color:#fff; }
.kp-event-faction-list .badge { margin-top:.35rem; white-space:normal; text-align:start; font-weight:500; }
.kp-event-factions-more > summary,.kp-event-factions-toggle { display:flex; align-items:center; gap:.5rem; width:fit-content; max-width:100%; cursor:pointer; list-style:none; min-height:44px; padding:.35rem .5rem; color:var(--ct-body-color); font-weight:500; border:0; border-radius:.25rem; background:transparent; }
.kp-event-factions-more > summary > .mdi,.kp-event-factions-toggle > .mdi { color:var(--kp-event-link); }
.kp-event-factions-more[open] > .kp-event-faction-list { margin-top:.75rem; }
.kp-event-factions-more > summary::-webkit-details-marker { display:none; }
.kp-event-factions-more > summary:hover,.kp-event-factions-toggle:hover { color:var(--kp-event-link); background:rgba(var(--ct-primary-rgb),.08); }
.kp-event-factions-more[open] > summary .mdi-chevron-down,.kp-event-factions-toggle[aria-expanded="true"] .mdi-chevron-down { transform:rotate(180deg); }
.kp-factions-show-less,.kp-event-factions-more[open] .kp-factions-show-all,.kp-event-factions-more[open] > summary .kp-event-section-count,.kp-event-factions-toggle[aria-expanded="true"] .kp-factions-show-all,.kp-event-factions-toggle[aria-expanded="true"] .kp-event-section-count { display:none; }
.kp-event-factions-more[open] .kp-factions-show-less,.kp-event-factions-toggle[aria-expanded="true"] .kp-factions-show-less { display:inline; }
.kp-event-overview :is(a,summary,button):focus-visible { outline:3px solid var(--ct-primary); outline-offset:3px; border-radius:.25rem; }
.kp-event-hero :is(a,summary,button):focus-visible { outline-color:#fff; }
@media (min-width:1400px) {
 .kp-event-pass { display:grid; grid-template-columns:minmax(0,1fr) minmax(480px,1.1fr); }
 .kp-event-hero { grid-column:1; grid-row:1; align-self:stretch; grid-template-columns:minmax(0,1fr) minmax(0,clamp(280px,20vw,640px)); min-height:0; }
 .kp-event-hero--identity,.kp-event-hero--cover { grid-template-columns:minmax(0,1fr); }
 .kp-event-hero--cover { min-height:360px; }
 .kp-event-information { grid-column:2; grid-row:1; border-left:1px solid var(--ct-border-color); }
 .kp-event-pass:not(:has(.kp-event-overview-summary,.kp-event-meta > section)) { grid-template-columns:minmax(0,1fr); }
}
@media (min-width:2400px) {
 .kp-event-location-visual,.kp-event-organizer-identity { min-height:208px; }
 .kp-event-organizer-logo { flex-basis:72px; }
 .kp-event-organizer-logo > img { width:72px; height:72px; }
}
@media (max-width:1199.98px) { .kp-event-faction-list { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:767.98px) {
 .kp-event-hero { grid-template-columns:minmax(0,1fr); min-height:0; padding:1.5rem 1.25rem; gap:1.5rem; }
 .kp-event-heading { gap:.75rem; }
 .kp-event-heading-logo { width:56px; height:56px; flex-basis:56px; padding:.4rem; }
 .kp-event-heading h1 { font-size:2rem; margin:.85rem 0; }
 .kp-event-date { font-size:.9375rem; }
 .kp-event-poster > img { max-height:22rem; }
 .kp-event-overview-summary { grid-template-columns:minmax(0,1fr); gap:1.25rem; padding:1.25rem; }
 .kp-event-overview-facts { grid-template-columns:repeat(2,minmax(0,1fr)); row-gap:.35rem; }
 .kp-event-overview-facts > .kp-event-pricing { grid-column:1 / -1; margin-bottom:.75rem; }
 .kp-event-overview-actions .btn { width:100%; }
 .kp-event-meta { padding:0; }
 .kp-event-meta:has(> section) { grid-template-columns:minmax(0,1fr); }
 .kp-event-meta > .kp-event-host { border-left:0; border-top:1px solid var(--ct-border-color); }
 .kp-event-hero:has(> .kp-event-edit):not(.ribbon-box) .kp-event-heading { padding-top:1.25rem; }
 .kp-event-faction-list { grid-template-columns:minmax(0,1fr); gap:.5rem; }
 .kp-event-factions-more > summary,.kp-event-factions-toggle { width:100%; justify-content:center; }
 .kp-event-faction-vehicle-label { display:none; }
}

/* Existing About, Tickets and Participants presentation is retained. */
.kp-event-content { border:1px solid var(--ct-border-color); box-shadow:none; }
.kp-event-content > .card-body { padding:0; }
.kp-event-content > .card-body > .tab-content { padding:1.5rem; }
.kp-public-event .kp-event-tabs { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0,1fr); margin:0; padding:0 1rem; background:transparent; border-bottom:1px solid var(--ct-border-color); scroll-margin-top:8rem; }
.kp-public-event .kp-event-tabs > .nav-item { min-width:0; }
.kp-public-event .kp-event-tabs > .nav-item > .nav-link { width:100%; height:100%; text-align:center; }
.kp-public-event .kp-event-tabs .nav-link { min-height:4rem; font-size:1.0625rem; display:flex; align-items:center; justify-content:center; gap:.5rem; border-bottom:3px solid transparent; color:var(--kp-event-muted); font-weight:600; background:transparent; }
.kp-public-event .kp-event-tabs .nav-link.active { color:var(--kp-event-link); background:transparent; border-bottom-color:var(--ct-primary); }
.kp-public-event .kp-event-tabs .nav-link:hover { color:var(--kp-event-link); background:rgba(var(--ct-primary-rgb),.04); }
.kp-event-description { line-height:1.8; font-size:1rem; overflow-wrap:anywhere; }
.kp-event-description img { max-width:100%; height:auto; }
.kp-event-description table { display:block; max-width:100%; overflow-x:auto; }
.kp-event-participants-scroll { overflow-x:auto; }
.kp-event-participants-scroll table { min-width:780px; margin:0; }
#participants_list .kp-event-participant-user-cell { min-width:180px; }
#participants_list .kp-event-participant-faction-cell { min-width:260px; }
#participants_list .kp-event-participant-country-cell { min-width:140px; }
#participants_list .kp-event-participant-team-cell { min-width:180px; }
#participants_list tbody td { vertical-align:middle; padding-block:.6rem; }
.kp-event-participants-scroll thead th { padding-top:1rem; padding-bottom:1rem; }
.kp-event-participant { display:flex; align-items:center; gap:.65rem; min-width:0; }
.kp-event-participant > img { flex:0 0 auto; border-radius:.25rem; object-fit:contain; }
.kp-event-participant .kp-event-participant-avatar { object-fit:cover; border-radius:50%; }
.kp-event-participant-text { min-width:0; overflow-wrap:anywhere; }
.kp-event-participant-text small { display:block; color:var(--ct-secondary-color); }
.kp-event-participant-name { display:flex; align-items:center; gap:.4rem; color:var(--ct-body-color); }
.kp-event-participant-label { min-width:0; }
.kp-event-participant-name:hover { color:var(--ct-primary); }
.kp-event-participant-dot { display:inline-block; flex:0 0 .5rem; width:.5rem; height:.5rem; border-radius:50%; }
.kp-event-participants-footer { display:flex; align-items:center; flex-wrap:wrap; justify-content:space-between; gap:.75rem; padding-top:1rem; }
.kp-event-participants-footer .mylength { display:flex; align-items:center; flex-wrap:wrap; gap:.75rem; }
.kp-event-participants-footer .dt-info { padding:0; }
.kp-event-participants-footer .dt-paging { margin:0; }
.kp-event-participants-option { display:inline-flex; align-items:center; gap:.5rem; min-width:0; }
.kp-event-participants-option img { width:24px; height:24px; object-fit:contain; }
#participants_list tbody td:not(:last-child):hover { cursor:pointer; }
@media (max-width:767.98px) {
 .kp-event-participant-faction-cell .kp-event-participant-label { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; }
 .kp-event-participants-footer { flex-direction:column; align-items:stretch; }
 .kp-event-participants-footer .dt-paging { overflow-x:auto; }
 .kp-event-content > .card-body > .tab-content { padding:1.25rem 1rem; }
 .kp-public-event .kp-event-tabs { padding:0; }
 .kp-public-event .kp-event-tabs .nav-link { font-size:1rem; padding:.75rem .35rem; gap:.25rem; }
}

/* Available tickets stand out without moving the page or changing tab widths. */
.kp-public-event .kp-event-tabs .kp-event-tickets-open { color:#163528; font-weight:700; background:var(--ct-success); box-shadow:none; }
.kp-public-event .kp-event-tabs .kp-event-tickets-open:hover,
.kp-public-event .kp-event-tabs .kp-event-tickets-open:focus-visible,
.kp-public-event .kp-event-tabs .kp-event-tickets-open.active { color:#163528; background:var(--ct-success); box-shadow:inset 0 -3px 0 #163528; }
