/* Municipal Events Calendar — accessible event detail template, v2.10.12 */
/* All page-layout rules are scoped to the plugin's own event template. */
.mcc-screen-reader-text {
    position: absolute !important; width: 1px !important; height: 1px !important;
    padding: 0 !important; margin: -1px !important; overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important; clip-path: inset(50%) !important;
    white-space: nowrap !important; border: 0 !important;
}

/* Small legacy shortcode helpers, including [next_event]. */
.mcc-event-picture { display: block; }
.mcc-single-event-details { box-sizing: border-box; min-width: 0; margin: 0 0 24px;
    padding: 18px; border: 1px solid #e2e8f0; border-left: 4px solid #285b4b;
    border-radius: 12px; background: #f8fafc; color: #263842; }
.mcc-single-event-details dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px 22px; margin: 0; }
.mcc-single-event-details dl > div { min-width: 0; }
.mcc-single-event-details dt { margin: 0 0 4px; color: #52636a; font-size: .83rem;
    line-height: 1.35; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.mcc-single-event-details dd { margin: 0; font-size: 1rem; line-height: 1.5;
    font-weight: 700; overflow-wrap: anywhere; }
.mcc-single-status { display: inline-flex; margin: 0 0 14px; padding: 5px 10px;
    border-radius: 100px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.mcc-single-status-cancelled { background: #fee2e2; color: #7f1d1d; }
.mcc-single-status-postponed { background: #fff7ed; color: #9a3412; }
.mcc-single-event-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.mcc-event-action { display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px;
    border-radius: 9px; background: #245442 !important; color: #fff !important;
    font-weight: 700; text-decoration: none; }
.mcc-event-action:hover { color: #fff; text-decoration: underline; }
.mcc-next-event { padding: 14px 16px; border: 1px solid #e2e8f0;
    border-radius: 10px; background: #f8fafc; }

/* Reset only the legacy theme's event-page widths/floats, without affecting other pages. */
body.single-my_calendar_event #primary.mcc-event-page,
.mcc-event-page { display: flow-root; float: none !important; clear: both;
    width: 100% !important; min-width: 0; max-width: none !important;
    margin: 0 auto !important; padding: 0 !important; background: #fff;
    color: #263842; box-sizing: border-box; }
.mcc-event-page, .mcc-event-page *, .mcc-event-page *::before, .mcc-event-page *::after { box-sizing: border-box; }
.mcc-event-page__container { width: min(100% - 48px, 1120px); max-width: 1120px;
    margin-inline: auto; padding-block: clamp(26px, 4vw, 54px) clamp(48px, 6vw, 76px); }
.mcc-event-page .mcc-single-event { display: block; float: none; width: 100%; max-width: 100%;
    min-width: 0; margin: 0; padding: 0; border: 0; box-shadow: none; background: transparent; }
.mcc-event-page .mcc-single-event::before,
.mcc-event-page .mcc-single-event::after { content: none; }
.mcc-event-page .mcc-single-event :is(h1,h2,h3,p,ul,ol,dl,figure) { max-width: 100%; }
.mcc-event-page a { text-underline-offset: .15em; }
.mcc-event-page :is(a,button):focus-visible { outline: 3px solid #245442;
    outline-offset: 3px; border-radius: 4px; }

.mcc-event-page__back-top { display: inline-flex; gap: 9px; align-items: center;
    margin: 0 0 22px; font-size: .94rem; line-height: 1.4; font-weight: 700;
    color: #245442 !important; text-decoration: none !important; }
.mcc-event-page__back-top:hover { text-decoration: underline !important; }
.mcc-event-page__back-top svg { width: 17px; height: 17px; flex: 0 0 17px; }

/* Hero: deliberately restrained, suitable for the existing community-site palette. */
.mcc-event-page .mcc-single-event__header { position: relative; isolation: isolate; overflow: hidden;
    margin: 0 0 clamp(20px,3vw,32px); padding: clamp(24px,4vw,46px);
    border: 1px solid #dce9e2; border-radius: 18px;
    background: linear-gradient(115deg, #eff7f1 0%, #f5f9f5 58%, #f9fbfa 100%);
    box-shadow: none; }
.mcc-event-page .mcc-single-event__header::after { content: ''; position: absolute;
    width: min(36vw, 350px); aspect-ratio: 1; right: -100px; bottom: -230px;
    z-index: -1; border-radius: 50%; border: 48px solid rgba(41,98,72,.045); pointer-events: none; }
.mcc-event-page .mcc-single-event__eyebrow { display: inline-flex; align-items: center;
    width: fit-content; margin: 0 0 15px; padding: 5px 11px;
    border: 1px solid #cdded3; border-radius: 99px; background: #fff;
    color: #315c45; font-size: .72rem; line-height: 1.4; font-weight: 800;
    text-transform: uppercase; letter-spacing: .075em; }
.mcc-event-page .mcc-single-event__title { margin: 0; max-width: 20ch;
    color: #14392c; font-size: clamp(2rem,4.3vw,3.35rem); line-height: 1.12;
    font-weight: 800; letter-spacing: -.025em; overflow-wrap: anywhere; }
.mcc-event-page .mcc-single-event__summary-date { display: inline-flex;
    align-items: flex-start; gap: 10px; margin: 18px 0 0; color: #315c45;
    font-size: clamp(1rem,1.65vw,1.12rem); font-weight: 650; line-height: 1.55; }
.mcc-event-page .mcc-single-event__summary-date svg { flex: 0 0 20px; margin-top: 3px; }

.mcc-event-page .mcc-single-event__layout { display: grid;
    grid-template-columns: minmax(0,1fr) minmax(280px,340px); grid-template-areas: 'content details';
    gap: clamp(20px,3vw,32px); align-items: start; width: 100%; min-width: 0; }
.mcc-event-page .mcc-single-event__sidebar { grid-area: details; display: flex; flex-direction: column;
    gap: 16px; min-width: 0; margin: 0; padding: 0; width: auto; max-width: none;
    float: none; background: transparent; box-shadow: none; }
.mcc-event-page .mcc-single-event__details { width: 100%; min-width: 0; margin: 0;
    padding: clamp(20px,2.8vw,28px); border: 1px solid #e1e9e4;
    border-radius: 16px; background: #fff; box-shadow: 0 7px 26px rgba(24,61,46,.055); }
.mcc-event-page .mcc-single-event__details > h2 { margin: 0 0 20px;
    padding: 0 0 14px; border-bottom: 1px solid #e9eeea;
    color: #173f30; font-size: 1.22rem; line-height: 1.3; font-weight: 800; }
.mcc-event-page .mcc-single-event__status { display: inline-flex; padding: 6px 10px;
    margin: 0 0 16px; border-radius: 99px; font-size: .83rem; font-weight: 800; }
.mcc-event-page .mcc-single-event__status--cancelled { background: #fee2e2; color: #7f1d1d; }
.mcc-event-page .mcc-single-event__status--postponed { background: #fff2df; color: #8a3b0e; }
.mcc-event-page .mcc-single-event__details-list { display: grid;
    grid-template-columns: minmax(0,1fr); gap: 18px; margin: 0; padding: 0; }
.mcc-event-page .mcc-single-event__details-list > .mcc-single-event__detail { display: block;
    margin: 0; min-width: 0; padding: 0; border: 0; }
.mcc-event-page .mcc-single-event__detail dt { display: flex; align-items: center;
    gap: 9px; margin: 0 0 3px; padding: 0; color: #64756a;
    font-size: .72rem; line-height: 1.45; font-weight: 750;
    letter-spacing: .055em; text-transform: uppercase; white-space: normal; }
.mcc-event-page .mcc-single-event__detail dd { display: block; min-width: 0;
    margin: 0 0 0 29px !important; padding: 0 !important; color: #1e392e;
    font-size: .98rem; line-height: 1.55; font-weight: 650; overflow-wrap: anywhere; }
.mcc-event-page .mcc-single-event__detail-icon { display: inline-flex; flex: 0 0 20px;
    width: 20px; height: 20px; align-items: center; justify-content: center; color: #38755b; }
.mcc-event-page .mcc-single-event__detail-icon svg { display: block;
    width: 17px; height: 17px; fill: none; stroke: currentColor;
    stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.mcc-event-page .mcc-single-event__detail dd a { color: #245442; text-decoration: underline; }
.mcc-event-page .mcc-single-event__featured-image { margin: 0; overflow: hidden;
    border-radius: 15px; background: #f1f5f1; }
.mcc-event-page .mcc-single-event__featured-image img { display: block; width: 100%;
    height: auto; max-height: 310px; object-fit: cover; margin: 0; border: 0; box-shadow: none; }
.mcc-event-page .mcc-single-event__actions { display: grid; gap: 10px;
    margin: 20px 0 0; padding-top: 18px; border-top: 1px solid #e9eeea; }
.mcc-event-page .mcc-single-event__action { display: inline-flex; width: 100%;
    min-height: 44px; justify-content: center; align-items: center; padding: 11px 14px;
    border: 1px solid #cbded0; border-radius: 9px; background: #eef6f0;
    color: #245442 !important; font-weight: 750; line-height: 1.35; text-align: center;
    text-decoration: none !important; }
.mcc-event-page .mcc-single-event__action--primary { background: #245442;
    border-color: #245442; color: #fff !important; }
.mcc-event-page .mcc-single-event__action:hover { filter: brightness(.96); }

.mcc-event-page .mcc-single-event__content { grid-area: content; min-width: 0;
    width: auto; max-width: none; float: none; margin: 0; padding: clamp(16px,1.2vw,22px) 0 0;
    background: transparent; border: 0; box-shadow: none; color: #293e33;
    font-size: clamp(1rem,1.5vw,1.075rem); line-height: 1.8;
    overflow-wrap: anywhere; }
.mcc-event-page .mcc-single-event__content h2 { margin: 0 0 18px; padding: 0;
    border: 0; color: #173f30; font-size: clamp(1.4rem,2.5vw,1.85rem);
    font-weight: 800; line-height: 1.3; }
.mcc-event-page .mcc-single-event__description > :first-child { margin-top: 0; }
.mcc-event-page .mcc-single-event__description > :last-child { margin-bottom: 0; }
.mcc-event-page .mcc-single-event__description :is(p,ul,ol) { margin-top: 0;
    margin-bottom: 1.2em; }
.mcc-event-page .mcc-single-event__description :is(img,iframe,video) {
    max-width: 100%; height: auto; border-radius: 10px; }
.mcc-event-page .mcc-single-event__description a { color: #245442; text-decoration: underline; }
.mcc-event-page .mcc-single-event__description :is(h2,h3,h4) { color: #173f30;
    line-height: 1.3; margin-block: 1.15em .55em; }

.mcc-event-page .mcc-single-event__return { margin: clamp(24px,4vw,42px) 0 0;
    padding: 22px 0 0; border-top: 1px solid #e1e9e4; }
.mcc-event-page .mcc-single-event__back { display: inline-flex; align-items: center;
    gap: 8px; min-height: 44px; padding: 10px 16px; border: 1px solid #cbded0;
    border-radius: 10px; background: #fff; color: #245442 !important;
    font-weight: 750; text-decoration: none !important; }
.mcc-event-page .mcc-single-event__back:hover { background: #eef6f0; }
.mcc-event-page .mcc-single-event__back-icon { font-size: 1.3em; line-height: 1; }

/* Map is a full-width final section. Leaflet tile protections are below. */
.mcc-event-page .mcc-single-event__map-section { margin: clamp(28px,4vw,46px) 0 0;
    padding: clamp(20px,3vw,28px); border: 1px solid #e1e9e4; border-radius: 16px;
    background: #fbfdfb; }
.mcc-event-page .mcc-single-event__map-section h2 { margin: 0 0 16px;
    color: #173f30; font-size: clamp(1.4rem,2.5vw,1.85rem); }
.mcc-event-page .mcc-single-event__map { border: 0; border-radius: 12px; min-height: 310px; }
.mcc-event-page .mcc-single-event__map-alternative { margin-top: 14px; font-size: .95rem; }
.mcc-event-page .mcc-single-event__map-alternative a { color: #245442; }

/* iPad / tablet portrait and narrow content areas: avoid cramped two columns. */
@media (max-width: 900px) {
    .mcc-event-page .mcc-single-event__layout { grid-template-columns: minmax(0,1fr);
        grid-template-areas: 'details' 'content'; gap: 22px; }
    .mcc-event-page .mcc-single-event__sidebar { width: 100%; }
    .mcc-event-page .mcc-single-event__details-list { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px 20px; }
    .mcc-event-page .mcc-single-event__content { padding: 6px 4px 0; }
    .mcc-event-page .mcc-single-event__featured-image img { max-height: 350px; }
}
@media (max-width: 600px) {
    .mcc-event-page__container { width: calc(100% - 32px); padding-block: 24px 44px; }
    .mcc-event-page .mcc-single-event__header { padding: 24px 20px; border-radius: 13px; }
    .mcc-event-page .mcc-single-event__title { font-size: clamp(1.85rem,8vw,2.5rem); }
    .mcc-event-page .mcc-single-event__summary-date { margin-top: 14px; }
    .mcc-event-page .mcc-single-event__details { padding: 20px; border-radius: 12px; }
    .mcc-event-page .mcc-single-event__details-list,
    .mcc-single-event-details dl { grid-template-columns: minmax(0,1fr); }
    .mcc-event-page .mcc-single-event__content { padding: 0 2px; line-height: 1.7; }
    .mcc-event-page .mcc-single-event__map-section { padding: 14px; border-radius: 12px; }
    .mcc-event-page .mcc-single-event__map { min-height: 260px; }
}
@media (max-width: 360px) {
    .mcc-event-page__container { width: calc(100% - 24px); }
    .mcc-event-page .mcc-single-event__header { padding: 20px 16px; }
    .mcc-event-page .mcc-single-event__details { padding: 17px; }
}
@media (prefers-reduced-motion: reduce) {
    .mcc-event-page * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Common map handling, also used by theme template overrides. */
.mcc-single-event__map .leaflet-control-attribution {
    font-size: 0.7rem;
}

/* Keep theme image rules from adding visible borders or spacing to map tiles. */
.mcc-single-event__map .leaflet-tile {
    display: block !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    box-sizing: content-box !important;
    image-rendering: auto;
}

.mcc-single-event__map--unavailable {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    color: #334155;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
}

.mcc-single-event__map--embed iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: inherit;
    border: 0;
}

.mcc-single-event__map-alternative {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 1rem;
    margin: 0.75rem 0 0;
    color: #334155;
    line-height: 1.5;
}

.mcc-single-event__map-alternative a {
    color: #0b2f55;
    font-weight: 800;
    text-underline-offset: 0.16em;
}

.mcc-single-event__map-alternative a:focus-visible {
    outline: 3px solid #0b2f55;
    outline-offset: 3px;
    border-radius: 3px;
}

@media (max-width: 600px) {
    .mcc-single-event__map {
        min-height: 300px;
        border-radius: 9px;
    }
}
