.event-catalog-page {
    max-width: 1400px;
    margin: 0 auto;
    padding-right: 1.5rem;
    padding-left: 1.5rem;
}

.event-catalog {
    --event-catalog-accent: var(--TenantMainColor, #3978a8);
    --event-catalog-border: #d9dee5;
    --event-catalog-muted: #647181;
    --event-catalog-surface: #f7f9fb;
    color: #25313d;
    padding-bottom: 3rem;
}

.event-catalog a { color: var(--event-catalog-accent); }

.event-catalog .form-control {
    box-sizing: border-box;
    width: 100%;
}

.event-catalog input::placeholder {
    font-style: normal;
    font-weight: 400;
}

.event-catalog__toolbar {
    margin: 0;
    transition: margin 180ms ease;
}

.event-catalog__toolbar.is-filters-open,
.event-catalog__toolbar.has-active-filters { margin: 0.35rem 0 1rem; }

.event-catalog__toolbar-main { padding: 0; }

.event-catalog__subheader-actions {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    padding: 0 !important;
}

.event-catalog__filter-toggle,
.event-catalog__export .btn-link {
    min-width: 34px;
    min-height: 34px;
    padding: 0.35rem;
    color: #394553;
    border-radius: 0.25rem;
}

.event-catalog__filter-toggle:hover,
.event-catalog__filter-toggle:focus,
.event-catalog__filter-toggle.has-active-filters,
.event-catalog__filter-toggle.is-open {
    background: #eef3f7;
    color: var(--TenantMainColor, #3978a8);
}

.event-catalog__filter-panel {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(150px, 220px) auto;
    gap: 0.75rem;
    overflow: hidden;
    max-height: 0;
    margin-top: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-0.35rem);
    transition: max-height 180ms ease, margin-top 180ms ease, opacity 150ms ease, transform 180ms ease, visibility 0s linear 180ms;
}

.event-catalog__toolbar.is-filters-open .event-catalog__filter-panel {
    max-height: 60px;
    margin-top: 0.55rem;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition-delay: 0s;
}

.event-catalog__search { position: relative; margin: 0; }
.event-catalog__search > i {
    position: absolute;
    top: 50%;
    left: 0.9rem;
    color: var(--event-catalog-muted);
    transform: translateY(-50%);
    pointer-events: none;
}

.event-catalog__search .form-control {
    height: 44px;
    padding-left: 2.7rem;
    font-size: 1rem;
}

.event-catalog__select-control { margin: 0; }
.event-catalog__select-control .form-control {
    height: 44px;
    font-size: 1rem;
    font-weight: 400;
}

.event-catalog__registered-filter {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 44px;
    margin: 0;
    color: #394553;
    font-size: 1rem;
    font-weight: 400;
    white-space: nowrap;
}
.event-catalog__registered-filter input { margin: 0; }

.event-archive__filter-panel {
    grid-template-columns: minmax(240px, 1fr) minmax(145px, 180px) minmax(145px, 180px) auto;
}
.event-archive__date-control { position: relative; margin: 0; }
.event-archive__date-control > span {
    position: absolute;
    top: 0.25rem;
    left: 0.8rem;
    z-index: 1;
    color: var(--event-catalog-muted);
    font-size: 0.72rem;
    line-height: 1;
    pointer-events: none;
}
.event-archive__date-control .form-control {
    height: 44px;
    padding: 1.05rem 0.7rem 0.15rem;
    font-size: 1rem;
}

.event-catalog__status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 32px;
    padding: 0.3rem 0 0;
}
.event-catalog__status-row[hidden] { display: none; }

.event-catalog__status { margin: 0; color: var(--event-catalog-muted); }
.event-catalog__clear { padding-right: 0; font-size: 1rem; }
.event-catalog__section { margin-bottom: 1.25rem; }

.event-catalog__section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.event-catalog__section-heading h2 { margin: 0; color: #25313d; font-size: 1.25rem; font-weight: 600; }
.event-catalog__section-heading h2 i { margin-right: 0.45rem; color: var(--event-catalog-muted); font-size: 1rem; }
.event-catalog__heading-count { display: inline-flex; justify-content: center; align-items: center; min-width: 24px; min-height: 24px; margin-left: 0.35rem; padding: 0 0.4rem; border-radius: 999px; background: #e9eef3; color: #4d5b68; font-size: 0.8rem; vertical-align: middle; }
.event-catalog__rail-controls { display: flex; gap: 0.2rem; }
.event-catalog__rail-controls .btn { min-width: 38px; min-height: 38px; padding: 0.4rem; color: #394553; }
.event-catalog__rail-controls .btn:disabled { color: #a8b0b9; opacity: 0.55; }

.event-catalog__featured-grid {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 2px;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
}

.event-catalog__featured-card {
    display: grid;
    flex: 0 0 min(520px, calc(50% - 0.375rem));
    grid-template-columns: 96px 120px minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: stretch;
    min-height: 150px;
    padding: 0.75rem;
    border: 1px solid var(--event-catalog-border);
    border-radius: 0.35rem;
    background: #fff;
    color: #25313d !important;
    text-decoration: none !important;
    scroll-snap-align: start;
}

.event-catalog__featured-card:hover,
.event-catalog__featured-card:focus { border-color: var(--event-catalog-accent); }
.event-catalog__featured-image { align-self: stretch; min-height: 126px; border-radius: 0.25rem; background-position: center; background-size: cover; }
.event-catalog__featured-content { display: flex; flex-direction: column; align-self: center; gap: 0.3rem; min-width: 0; }
.event-catalog__featured-identity { margin-bottom: 0; color: var(--event-catalog-muted); font-size: 0.9rem; }
.event-catalog__featured-title { color: var(--event-catalog-accent); font-size: 1.05rem; font-weight: 600; }
.event-catalog__featured-meta { color: var(--event-catalog-muted); font-size: 0.9rem; }
.event-catalog__featured-card > .fa-chevron-right { align-self: center; }

.event-catalog__pinned { padding: 1rem; border: 1px solid var(--event-catalog-border); border-radius: 0.35rem; background: #fff; }
.event-catalog__pinned[hidden] { display: none; }
.event-catalog__pinned-list { display: flex; gap: 0.75rem; overflow-x: auto; padding: 2px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.event-catalog__pinned-card { display: grid; flex: 0 0 min(430px, calc(50% - 0.375rem)); grid-template-columns: 90px minmax(0, 1fr) auto; gap: 0.75rem; align-items: center; min-height: 92px; padding-right: 0.85rem; border: 1px solid var(--event-catalog-border); border-radius: 0.35rem; background: #fff; color: #25313d !important; text-decoration: none !important; scroll-snap-align: start; }
.event-catalog__pinned-card:hover,
.event-catalog__pinned-card:focus { border-color: var(--event-catalog-accent); }
.event-catalog__pinned-image { align-self: stretch; min-height: 90px; background-position: center; background-size: cover; }
.event-catalog__pinned-content { display: flex; flex-direction: column; min-width: 0; }
.event-catalog__pinned-content strong { overflow: hidden; color: var(--event-catalog-accent); font-size: 1rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.event-catalog__pinned-content small,
.event-catalog__pinned-content > span { overflow: hidden; margin-top: 0.2rem; color: var(--event-catalog-muted); font-size: 0.8rem; text-overflow: ellipsis; white-space: nowrap; }
.event-catalog__pinned-card > i { color: var(--event-catalog-accent); }

.event-catalog__month { margin-bottom: 1.5rem; }
.event-catalog__month > h2,
.event-catalog__month > h3 { margin: 0 0 0.65rem; color: #43505d; font-size: 1rem; font-weight: 600; }
.event-catalog__month-list { border: 1px solid var(--event-catalog-border); border-radius: 0.35rem; background: #fff; }

.event-catalog__card {
    display: grid;
    grid-template-columns: 96px 180px minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: stretch;
    min-height: 150px;
    padding: 0.75rem;
    position: relative;
}

.event-catalog__card + .event-catalog__card { border-top: 1px solid var(--event-catalog-border); }
.event-catalog__card[hidden] { display: none; }

.event-catalog__load-more {
    display: flex;
    justify-content: center;
    min-height: 52px;
    margin-top: 1rem;
}

.event-catalog__load-more[hidden] { display: none; }
.event-catalog__load-more .btn { min-width: 180px; min-height: 44px; font-size: 1rem; font-weight: 400; }

.event-catalog__date {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 126px;
    border-radius: 0.25rem;
    background: var(--event-catalog-accent);
    color: #fff;
    text-align: center;
}

.event-catalog__date strong { margin: 0.15rem 0; font-size: 2.2rem; font-weight: 400; line-height: 1; }
.event-catalog__date span { font-size: 0.9rem; }
.event-catalog__image { min-height: 126px; border-radius: 0.25rem; background-position: center; background-size: cover; }

.event-catalog__image:focus,
.event-catalog__featured-card:focus,
.event-catalog__recent-item:focus,
.event-catalog button:focus,
.event-catalog input:focus,
.event-catalog select:focus,
.event-catalog a:focus { outline: 2px solid var(--event-catalog-accent); outline-offset: 2px; }

.event-catalog__card-content { align-self: center; min-width: 0; }
.event-catalog__identity { display: flex; gap: 0.45rem; align-items: center; margin-bottom: 0.35rem; }
.event-catalog__identity img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.event-catalog__identity a { color: var(--event-catalog-muted); font-size: 0.9rem; }
.event-catalog__card h4 { margin: 0 0 0.55rem; font-size: 1.15rem; font-weight: 600; line-height: 1.35; }
.event-catalog__card h4 a { text-decoration: none; }
.event-catalog__card h4 a:hover,
.event-catalog__card h4 a:focus { text-decoration: underline; }

.event-catalog__metadata { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; color: var(--event-catalog-muted); font-size: 0.95rem; }
.event-catalog__metadata i { width: 1rem; margin-right: 0.2rem; text-align: center; }
.event-catalog__tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.65rem; }
.event-catalog__tag { display: inline-flex; align-items: center; min-height: 24px; padding: 0.15rem 0.5rem; border: 1px solid #cfd6de; border-radius: 999px; color: #566372; font-size: 0.8rem; }
.event-catalog__tag i { margin-right: 0.3rem; }
.event-catalog__tag--type { border-color: #b9c9d8; background: #f1f6fa; color: #35536d; }
.event-catalog__tag--registered { border-color: #72b888; background: #dff3e5; color: #185a30; font-weight: 600; }
.event-catalog__tag--registered i { color: #23733e; }
.event-catalog__tag--warning { border-color: #e4b64d; color: #755914; }

.event-catalog__card-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    gap: 0.75rem;
    min-width: 118px;
}

.event-catalog__action-icons { display: flex; gap: 0.25rem; align-items: center; min-height: 42px; }
.event-catalog__action-icons > .btn,
.event-catalog__action-icons .dropdown-toggle { min-width: 42px; min-height: 42px; color: #394553; }
.event-catalog__save { align-self: center; min-width: 30px; min-height: 30px; padding: 0.2rem 0.4rem; border-radius: 0.25rem; color: #7b8793 !important; font-size: 1rem; line-height: 1; }
.event-catalog__save:hover,
.event-catalog__save:focus { background: #eef3f7; color: var(--event-catalog-accent) !important; }
.event-catalog__save.is-saved { background: #eaf2f8; color: var(--event-catalog-accent) !important; }
.event-catalog__save:disabled { opacity: 0.55; }

.event-catalog__card-actions .AdminOptions {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
}
.event-catalog__card-actions .AdminOptions .dropdown-menu { top: 100%; right: 0; left: auto; width: 220px; }
.event-catalog__card-actions .AdminOptions .OwnerOptions { display: block; width: 100%; text-align: left; }
.event-catalog__view-event { min-width: 112px; color: var(--event-catalog-accent) !important; font-size: 1rem; }

.event-catalog__empty { padding: 3rem 1rem; border: 1px solid var(--event-catalog-border); border-radius: 0.35rem; background: var(--event-catalog-surface); text-align: center; }
.event-catalog__empty > i { color: var(--event-catalog-muted); font-size: 2rem; }
.event-catalog__empty h3 { margin: 0.8rem 0 0.35rem; font-size: 1.15rem; }
.event-catalog__empty p { margin-bottom: 0.8rem; color: var(--event-catalog-muted); }

.event-archive__heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin: 1.25rem 0;
}
.event-archive__heading h1 { margin: 0; color: #25313d; font-size: 1.5rem; font-weight: 600; }
.event-archive__heading p { margin: 0.3rem 0 0; color: var(--event-catalog-muted); font-size: 1rem; }
.event-archive__count { flex: 0 0 auto; color: var(--event-catalog-muted); font-size: 0.9rem; }
.event-archive__card h3 { margin: 0 0 0.55rem; font-size: 1.15rem; font-weight: 600; line-height: 1.35; }
.event-archive__card h3 a { text-decoration: none; }
.event-archive__card h3 a:hover,
.event-archive__card h3 a:focus { text-decoration: underline; }
.event-archive__summary {
    display: -webkit-box;
    overflow: hidden;
    margin: 0.55rem 0 0;
    color: #4e5a67;
    font-size: 1rem;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.event-archive__meta { margin-top: 0.6rem; }
.event-archive__meta .event-catalog__tag i { margin-right: 0.3rem; }
.event-archive.is-loading .event-archive__results { opacity: 0.6; }
.event-archive__results { transition: opacity 150ms ease; }
.event-archive__date-control [aria-invalid="true"] { border-color: #b84040; box-shadow: 0 0 0 1px #b84040; }

.event-catalog__recent { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.75rem; align-items: center; padding: 0.55rem 0.7rem; border-radius: 0.3rem; background: var(--event-catalog-surface); }
.event-catalog__recent > h2 { margin: 0; color: #394553; font-size: 1rem; font-weight: 600; white-space: nowrap; }
.event-catalog__recent > h2 i { margin-right: 0.35rem; color: var(--event-catalog-muted); }
.event-catalog__recent-list { display: flex; gap: 0.45rem; overflow-x: auto; min-width: 0; padding: 1px; scrollbar-width: thin; }
.event-catalog__recent-item { display: flex; flex: 1 0 180px; flex-direction: column; overflow: hidden; min-width: 0; padding: 0.35rem 0.55rem; border-radius: 0.25rem; background: #fff; color: #25313d !important; text-decoration: none !important; }
.event-catalog__recent-item:hover,
.event-catalog__recent-item:focus { box-shadow: inset 0 0 0 1px var(--event-catalog-accent); }
.event-catalog__recent-item strong { overflow: hidden; color: var(--event-catalog-accent); font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.event-catalog__recent-item small { overflow: hidden; margin-top: 0.1rem; color: var(--event-catalog-muted); font-size: 0.8rem; text-overflow: ellipsis; white-space: nowrap; }
.event-catalog__recent-dismiss { min-width: 34px; min-height: 34px; padding: 0.35rem; color: var(--event-catalog-muted) !important; }

.event-catalog__registered { padding: 1rem; border: 1px solid #bfd9c6; border-radius: 0.35rem; background: #f8fcf9; }
.event-catalog__registered-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; }
.event-catalog__registered-item { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 0.65rem; align-items: center; padding: 0.65rem; border-radius: 0.3rem; background: #fff; color: #25313d !important; text-decoration: none !important; }
.event-catalog__registered-item:hover,
.event-catalog__registered-item:focus { box-shadow: inset 0 0 0 1px var(--event-catalog-accent); }
.event-catalog__registered-date { display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 54px; border-radius: 0.25rem; background: #edf8f0; color: #27643a; }
.event-catalog__registered-date strong { font-size: 1.3rem; line-height: 1; }
.event-catalog__registered-content { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.event-catalog__registered-content > strong { overflow: hidden; width: 100%; color: var(--event-catalog-accent); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.event-catalog__registered-content small { overflow: hidden; width: 100%; margin: 0.2rem 0 0.4rem; color: var(--event-catalog-muted); font-size: 0.8rem; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 1000px) {
    .event-archive__filter-panel { grid-template-columns: minmax(220px, 1fr) minmax(140px, 170px) minmax(140px, 170px); }
    .event-archive__filter-panel .event-catalog__registered-filter { grid-column: 1 / -1; }
    .event-catalog__toolbar.is-filters-open .event-archive__filter-panel { max-height: 120px; }
    .event-catalog__card { grid-template-columns: 88px 140px minmax(0, 1fr); }
    .event-catalog__card-actions { grid-column: 3; flex-direction: row; justify-content: flex-end; align-items: center; }
    .event-catalog__registered-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .event-catalog__featured-card { flex-basis: min(620px, 82vw); }
    .event-catalog__pinned-card { flex-basis: min(480px, 72vw); }
}

@media (max-width: 768px) {
    .event-archive__heading { align-items: flex-start; margin: 1rem 0; }
    .event-catalog-page { padding-right: 10px !important; padding-left: 10px !important; }
    .event-catalog__filter-panel { grid-template-columns: 1fr; }
    .event-catalog__toolbar.is-filters-open .event-catalog__filter-panel { max-height: 170px; }
    .event-catalog__toolbar.is-filters-open .event-archive__filter-panel { max-height: 240px; }
    .event-archive__filter-panel .event-catalog__registered-filter { grid-column: auto; }
    .event-catalog__registered-list { grid-template-columns: 1fr; }
    .event-catalog__featured-card { grid-template-columns: 76px minmax(0, 1fr) auto; }
    .event-catalog__featured-image { display: none; }
    .event-catalog__card { grid-template-columns: 76px minmax(0, 1fr); gap: 0.75rem; }
    .event-catalog__date { min-height: 106px; }
    .event-catalog__image { display: none; }
    .event-catalog__card-actions { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
    .event-catalog__toolbar,
    .event-catalog__filter-panel,
    .event-archive__results { transition: none; }
}

@media (max-width: 520px) {
    .event-archive__heading { flex-direction: column; gap: 0.35rem; }
    .event-catalog__search,
    .event-catalog__select-control { width: 100%; }
    .event-catalog__card-actions .AdminOptions .dropdown-menu { right: auto; left: 0; }
    .event-catalog__recent { grid-template-columns: 1fr auto; }
    .event-catalog__recent > h2 { grid-column: 1; }
    .event-catalog__recent-list { grid-column: 1 / -1; grid-row: 2; }
    .event-catalog__recent-dismiss { grid-column: 2; grid-row: 1; }
    .event-catalog__recent-item { flex-basis: 76vw; }
    .event-catalog__featured-card { grid-template-columns: 68px minmax(0, 1fr) auto; gap: 0.75rem; }
    .event-catalog__featured-card,
    .event-catalog__pinned-card { flex-basis: 88vw; }
    .event-catalog__pinned-card { grid-template-columns: 78px minmax(0, 1fr) auto; }
    .event-catalog__card { grid-template-columns: 68px minmax(0, 1fr); padding: 0.7rem; }
    .event-catalog__date { min-height: 96px; }
    .event-catalog__date strong { font-size: 1.8rem; }
    .event-catalog__card h4 { font-size: 1.05rem; }
    .event-catalog__metadata { flex-direction: column; gap: 0.3rem; }
    .event-catalog__card-actions { grid-column: 1 / -1; justify-content: space-between; }
    .event-catalog__view-event { flex: 1; }
}
