/* Informationsdisk — frontend */

.maca-info-hub {
    --maca-info-gap: 1.25rem;
    --maca-info-border: rgba(0, 0, 0, 0.08);
    max-width: 48rem;
}

.maca-info-empty {
    margin: 0;
    opacity: 0.75;
}

.maca-info-news-items,
.maca-info-events-items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: var(--maca-info-gap);
}

.maca-info-news-item,
.maca-info-events-item {
    display: grid;
    gap: 1rem;
    padding-bottom: var(--maca-info-gap);
    border-bottom: 1px solid var(--maca-info-border);
}

.maca-info-events-price {
    margin: 0.25rem 0 0;
    font-weight: 600;
}

.maca-info-events-booking {
    margin: 0.75rem 0 0;
}

.maca-info-events-booking-shell {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    overflow: visible;
    clip: auto;
    border: 0;
}

.maca-info-events-booking-shell .maca-table-booking-trigger {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.maca-info-news-item:last-child,
.maca-info-events-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

@media (min-width: 640px) {
    .maca-info-news-item:has(.maca-info-news-image),
    .maca-info-events-item:has(.maca-info-events-image) {
        grid-template-columns: 140px 1fr;
        align-items: start;
    }
}

.maca-info-news-image img,
.maca-info-events-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
    object-fit: cover;
}

.maca-info-news-date,
.maca-info-events-datetime {
    display: block;
    font-size: 0.875rem;
    opacity: 0.75;
    margin-bottom: 0.35rem;
}

.maca-info-news-title,
.maca-info-events-title {
    margin: 0 0 0.5rem;
    font-size: 1.125rem;
    line-height: 1.35;
}

.maca-info-news-excerpt {
    margin: 0 0 0.75rem;
}

.maca-info-events-location {
    margin: 0 0 0.5rem;
    font-size: 0.9375rem;
}

.maca-info-news-content,
.maca-info-events-description {
    font-size: 0.9375rem;
    line-height: 1.6;
}

.maca-info-news-content > :first-child,
.maca-info-events-description > :first-child {
    margin-top: 0;
}

.maca-info-news-content > :last-child,
.maca-info-events-description > :last-child {
    margin-bottom: 0;
}

.maca-info-news-content a,
.maca-info-news-excerpt a,
.maca-info-news-modal-content a,
.maca-info-news-modal-excerpt a,
.maca-info-events-description a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.maca-info-news-content a:hover,
.maca-info-news-excerpt a:hover,
.maca-info-news-modal-content a:hover,
.maca-info-news-modal-excerpt a:hover,
.maca-info-events-description a:hover,
.maca-info-news-content a:focus-visible,
.maca-info-news-excerpt a:focus-visible,
.maca-info-news-modal-content a:focus-visible,
.maca-info-news-modal-excerpt a:focus-visible,
.maca-info-events-description a:focus-visible {
    opacity: 0.85;
}

/* News layouts */
.maca-info-news-list--sidebar-left,
.maca-info-news-list--sidebar-right {
    --maca-info-news-sidebar-width: 17.5rem;
    position: fixed;
    top: max(1rem, env(safe-area-inset-top, 0px));
    width: var(--maca-info-news-sidebar-width);
    max-width: min(17.5rem, 92vw);
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    z-index: 999;
    padding: 0.75rem 0.85rem;
    background: #fff;
    border: 1px solid var(--maca-info-border);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.maca-info-news-list--sidebar-left {
    left: max(0.75rem, env(safe-area-inset-left, 0px));
}

.maca-info-news-list--sidebar-right {
    right: max(0.75rem, env(safe-area-inset-right, 0px));
}

.maca-info-news-list--sidebar-left .maca-info-news-items,
.maca-info-news-list--sidebar-right .maca-info-news-items {
    gap: 0;
}

.maca-info-news-sidebar-label {
    margin: 0 0 0.65rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.65;
}

.maca-info-news-list--sidebar-left .maca-info-news-item,
.maca-info-news-list--sidebar-right .maca-info-news-item {
    display: block;
    padding: 0.65rem 0;
    gap: 0;
}

.maca-info-news-list--sidebar-left .maca-info-news-title,
.maca-info-news-list--sidebar-right .maca-info-news-title {
    margin-bottom: 0.25rem;
    font-size: 0.9375rem;
}

.maca-info-news-list--sidebar-left .maca-info-news-date,
.maca-info-news-list--sidebar-right .maca-info-news-date {
    margin-bottom: 0.2rem;
    font-size: 0.75rem;
}

.maca-info-news-list--sidebar-left .maca-info-news-excerpt,
.maca-info-news-list--sidebar-right .maca-info-news-excerpt {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.maca-info-news-list--banner.maca-info-hub {
    max-width: none;
}

.maca-info-news-list--banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    margin: 0;
    z-index: 99999;
    padding: 0;
    background: #111;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    box-sizing: border-box;
}

.maca-info-news-banner-trigger {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.maca-info-news-banner-trigger:hover .maca-info-news-banner-line,
.maca-info-news-banner-trigger:focus-visible .maca-info-news-banner-line {
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

.maca-info-news-list--banner .maca-info-news-body {
    min-width: 0;
    flex: 1 1 auto;
}

.maca-info-news-banner-line {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
}

.maca-info-news-banner-sep {
    flex: 0 0 auto;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.8125rem;
    line-height: 1;
}

.maca-info-news-modals {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.maca-info-news-modal {
    width: min(36rem, calc(100vw - 2rem));
    max-width: none;
    max-height: calc(100vh - 2rem);
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
}

.maca-info-news-modal::backdrop {
    background: rgba(0, 0, 0, 0.58);
}

.maca-info-news-modal-close {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    z-index: 2;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.06);
    color: inherit;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.maca-info-news-modal-body {
    position: relative;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    padding: 1.25rem 1.35rem 1.35rem;
}

.maca-info-news-modal-title {
    margin: 0 0 0.75rem;
    padding-right: 2rem;
    font-size: 1.35rem;
    line-height: 1.3;
}

.maca-info-news-modal-image img {
    display: block;
    width: 100%;
    height: auto;
    margin-bottom: 1rem;
    border-radius: 8px;
    object-fit: cover;
}

.maca-info-news-modal-content,
.maca-info-news-modal-excerpt {
    font-size: 0.975rem;
    line-height: 1.6;
}

.maca-info-news-modal-content > :first-child,
.maca-info-news-modal-excerpt {
    margin-top: 0;
}

.maca-info-empty--admin-hint {
    font-size: 0.875rem;
    font-style: italic;
}

.maca-info-admin-notice {
    margin-top: 0.75rem;
    padding: 0.85rem 1rem;
    border: 1px solid #dba617;
    border-radius: 8px;
    background: #fff8e5;
    font-size: 0.875rem;
    line-height: 1.5;
}

.maca-info-admin-notice-list {
    margin: 0.5rem 0 0;
    padding-left: 1.25rem;
}

.maca-info-admin-notice-list ul {
    margin: 0.25rem 0 0.5rem;
    padding-left: 1.1rem;
}

.maca-info-news-preview-badge {
    margin: 0 0 0.5rem;
    padding: 0.2rem 0.45rem;
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    background: #fff8e5;
    color: #8a6116;
}

.maca-info-news-list--banner .maca-info-news-items {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-x: auto;
    scrollbar-width: thin;
}

/* Several news side by side in one banner (no ticker). */
.maca-info-news-list--banner-multi:not(.maca-info-news-list--scroll) .maca-info-news-item {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
}

.maca-info-news-list--banner-multi:not(.maca-info-news-list--scroll) .maca-info-news-items {
    overflow-x: hidden;
}

.maca-info-news-list--banner.maca-info-news-list--scroll .maca-info-news-banner-track {
    overflow: hidden;
    width: 100%;
}

.maca-info-news-list--banner.maca-info-news-list--scroll .maca-info-news-banner-track-inner {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    width: max-content;
    will-change: transform;
    animation: maca-info-news-ticker calc(var(--maca-info-ticker-items, 1) * 14s) linear infinite;
}

.maca-info-news-list--banner.maca-info-news-list--scroll .maca-info-news-items {
    display: inline-flex;
    overflow: visible;
    flex-shrink: 0;
    width: max-content;
}

.maca-info-news-list--banner.maca-info-news-list--scroll:hover .maca-info-news-banner-track-inner {
    animation-play-state: paused;
}

@keyframes maca-info-news-ticker {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .maca-info-news-list--banner.maca-info-news-list--scroll .maca-info-news-banner-track-inner {
        animation: none;
        width: 100%;
        overflow-x: auto;
    }

    .maca-info-news-list--banner.maca-info-news-list--scroll .maca-info-news-item--ticker-clone {
        display: none;
    }
}

.maca-info-news-list--banner .maca-info-news-item {
    flex: 0 0 auto;
    min-width: 0;
    max-width: none;
    margin: 0;
    padding: 0.45rem 1rem;
    border-bottom: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    box-sizing: border-box;
}

.maca-info-news-list--banner .maca-info-news-item:last-child {
    border-right: 0;
}

.maca-info-news-list--banner .maca-info-news-item--ticker-clone:last-child {
    border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.maca-info-news-list--banner .maca-info-news-date {
    flex: 0 0 auto;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.8125rem;
    margin: 0;
}

.maca-info-news-list--banner .maca-info-news-title {
    flex: 0 1 auto;
    color: #fff;
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
}

.maca-info-news-list--banner .maca-info-news-excerpt {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.35;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.88);
    overflow: hidden;
    text-overflow: ellipsis;
}

.maca-info-news-list--banner .maca-info-empty {
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.75);
}

body.admin-bar .maca-info-news-list--banner {
    top: 32px;
}

body.admin-bar .maca-info-news-list--sidebar-left,
body.admin-bar .maca-info-news-list--sidebar-right {
    top: calc(32px + 1rem);
}

body.maca-has-info-news-banner {
    padding-top: var(--maca-info-news-banner-height, 2.5rem);
}

body.maca-has-info-news-sidebar-left {
    padding-left: calc(var(--maca-info-news-sidebar-width, 17.5rem) + 1.5rem);
}

body.maca-has-info-news-sidebar-right {
    padding-right: calc(var(--maca-info-news-sidebar-width, 17.5rem) + 1.5rem);
}

.maca-info-news-list--preview.maca-info-news-list--sidebar-left,
.maca-info-news-list--preview.maca-info-news-list--sidebar-right {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    max-height: 18rem;
    margin-bottom: 1rem;
}

.maca-info-news-list--preview.maca-info-news-list--banner {
    position: relative;
    top: auto;
}

@media (max-width: 782px) {
    body.admin-bar .maca-info-news-list--banner {
        top: 46px;
    }

    body.admin-bar .maca-info-news-list--sidebar-left,
    body.admin-bar .maca-info-news-list--sidebar-right {
        top: auto;
    }

    body.maca-has-info-news-sidebar-left,
    body.maca-has-info-news-sidebar-right {
        padding-left: 0;
        padding-right: 0;
        padding-bottom: var(--maca-info-news-sidebar-height, 0);
    }

    .maca-info-news-list--sidebar-left,
    .maca-info-news-list--sidebar-right {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: none;
        max-height: 42vh;
        border-radius: 12px 12px 0 0;
        border-bottom: 0;
    }
}

@media (max-width: 640px) {
    body.maca-has-info-news-sidebar-left,
    body.maca-has-info-news-sidebar-right {
        padding-bottom: var(--maca-info-news-sidebar-height, 0);
    }
}

/* Month calendar */
.maca-info-events-calendar {
    max-width: 56rem;
}

.maca-info-calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.maca-info-calendar-nav a {
    text-decoration: none;
}

.maca-info-calendar-title {
    font-size: 1.125rem;
}

.maca-info-calendar-grid {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.maca-info-calendar-grid th,
.maca-info-calendar-grid td {
    border: 1px solid var(--maca-info-border);
    vertical-align: top;
    padding: 0.5rem;
}

.maca-info-calendar-grid th {
    font-size: 0.8125rem;
    font-weight: 600;
    text-align: center;
    background: rgba(0, 0, 0, 0.03);
}

.maca-info-cal-day {
    min-height: 5.5rem;
    height: 5.5rem;
}

.maca-info-cal-day--empty {
    background: rgba(0, 0, 0, 0.02);
}

.maca-info-cal-day--today .maca-info-cal-day-num {
    font-weight: 700;
    text-decoration: underline;
}

.maca-info-cal-day-num {
    display: inline-block;
    font-size: 0.875rem;
    margin-bottom: 0.35rem;
}

.maca-info-cal-events {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.75rem;
    line-height: 1.35;
}

.maca-info-cal-events li + li {
    margin-top: 0.25rem;
}

.maca-info-cal-event-time {
    opacity: 0.8;
}

.maca-info-cal-event-title {
    font-weight: 600;
}

.maca-info-cal-event-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.maca-info-cal-event-link:hover .maca-info-cal-event-title,
.maca-info-cal-event-link:focus-visible .maca-info-cal-event-title {
    text-decoration: underline;
}

.maca-info-event-details {
    margin-top: 1.25rem;
}

.maca-info-event-details-hint {
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
    opacity: 0.75;
}

.maca-info-event-detail--collapsible {
    display: none;
    margin-top: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--maca-info-border);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.02);
}

.maca-info-event-detail--collapsible:target {
    display: block;
}

.maca-info-event-details:has(.maca-info-event-detail--collapsible:target) .maca-info-event-details-hint {
    display: none;
}

.maca-info-calendar-subscribe {
    margin-bottom: var(--maca-info-gap);
    padding: 1rem;
    border: 1px solid var(--maca-info-border);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.02);
}

.maca-info-calendar-subscribe--compact {
    margin-top: 1.25rem;
    margin-bottom: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.maca-info-calendar-subscribe--compact .maca-info-subscribe-btn--compact {
    padding: 0.25rem 0.65rem;
    font-size: 0.8125rem;
    border-radius: 4px;
}

.maca-info-calendar-subscribe-dialog {
    width: min(92vw, 26rem);
    max-width: 26rem;
    padding: 0;
    border: 1px solid var(--maca-info-border);
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.maca-info-calendar-subscribe-dialog::backdrop {
    background: rgba(0, 0, 0, 0.45);
}

.maca-info-calendar-subscribe-dialog-inner {
    padding: 1rem 1.1rem 0.85rem;
}

.maca-info-calendar-subscribe-dialog-title {
    margin: 0 0 0.5rem;
    font-size: 1rem;
}

.maca-info-calendar-subscribe-dialog-lead {
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
    line-height: 1.45;
}

.maca-info-calendar-subscribe-dialog-steps {
    margin: 0 0 0.85rem 1.1rem;
    padding: 0;
    font-size: 0.8125rem;
    line-height: 1.45;
}

.maca-info-calendar-subscribe-dialog-steps li + li {
    margin-top: 0.35rem;
}

.maca-info-calendar-subscribe-dialog .maca-info-calendar-subscribe-actions {
    margin-bottom: 0.65rem;
}

.maca-info-subscribe-dialog-close {
    width: 100%;
    margin-top: 0.15rem;
}

.maca-info-calendar-subscribe--compact .maca-info-calendar-subscribe-label {
    margin: 0 0 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
}

.maca-info-calendar-subscribe--compact .maca-info-calendar-subscribe-actions {
    gap: 0.35rem;
}

.maca-info-calendar-subscribe--compact .maca-info-subscribe-btn {
    padding: 0.25rem 0.55rem;
    font-size: 0.8125rem;
    border-radius: 4px;
}

.maca-info-calendar-subscribe-label {
    margin: 0 0 0.75rem;
    font-weight: 600;
}

.maca-info-calendar-subscribe-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.maca-info-subscribe-btn {
    display: inline-block;
    padding: 0.45rem 0.85rem;
    border: 1px solid var(--maca-info-border);
    border-radius: 6px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    font: inherit;
    cursor: pointer;
}

.maca-info-subscribe-btn--primary {
    background: #111;
    border-color: #111;
    color: #fff;
}

.maca-info-subscribe-btn--compact {
    background: #fff;
}
