/* =============================================================================
   CSZ Events — Frontend Styles  v1.1
   Namespaced under .csz- to avoid theme conflicts.
   Calendar design matches the classic Events Manager layout.
   ============================================================================= */

:root {
    --csz-primary:       #1a4b8c;
    --csz-primary-light: #e8eef7;
    --csz-accent:        #c8a84b;
    --csz-text:          #2c2c2c;
    --csz-text-light:    #666;
    --csz-border:        #dde0e4;
    --csz-bg:            #ffffff;
    --csz-bg-alt:        #f7f8fa;
    --csz-radius:        6px;
    --csz-shadow:        0 2px 8px rgba(0,0,0,0.08);
}

/* =============================================================================
   Shared Utilities
   ============================================================================= */

.csz-page-wrap       { max-width: 1100px; margin: 0 auto; padding: 20px; }
.csz-no-events,
.csz-no-terms        { color: var(--csz-text-light); font-style: italic; padding: 20px 0; }

/* =============================================================================
   CALENDAR
   ============================================================================= */

.csz-calendar {
    width: 100%;
    font-family: inherit;
    /* outline sits outside layout so it doesn't add to width calculation */
    outline: 1px solid var(--csz-border);
    border-radius: var(--csz-radius);
    overflow: hidden;
    background: var(--csz-bg);
    box-sizing: border-box;
}

/* Header */

.csz-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: var(--csz-bg);
    border-bottom: 1px solid var(--csz-border);
    box-sizing: border-box;
}

.csz-cal-header-left,
.csz-cal-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.csz-cal-month-label {
    font-size: 20px;
    font-weight: 700;
    color: var(--csz-text);
    letter-spacing: -0.01em;
}

.csz-cal-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    color: var(--csz-text-light);
    text-decoration: none;
    border: 1px solid var(--csz-border);
    background: var(--csz-bg);
    transition: all 0.15s ease;
    padding-bottom: 2px;
    flex-shrink: 0;
}

.csz-cal-arrow:hover {
    background: var(--csz-primary);
    border-color: var(--csz-primary);
    color: #fff;
    text-decoration: none;
}

.csz-cal-today-btn {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    border: 1px solid var(--csz-border);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--csz-text-light);
    text-decoration: none;
    background: var(--csz-bg);
    transition: all 0.15s ease;
    white-space: nowrap;
}

.csz-cal-today-btn:hover,
.csz-cal-today-btn.csz-cal-today-active {
    background: var(--csz-primary);
    border-color: var(--csz-primary);
    color: #fff;
    text-decoration: none;
}

/* Month/Year picker trigger */

.csz-cal-month-trigger {
    background: none;
    border: none;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    padding: 2px 6px;
    font-size: 20px;
    font-weight: 700;
    color: var(--csz-text);
    letter-spacing: -0.01em;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    line-height: 1;
    border-radius: 4px;
    transition: background 0.15s;
    font-family: inherit;
}

.csz-cal-month-trigger:hover,
.csz-cal-month-trigger:focus-visible {
    background: var(--csz-primary-light);
    color: var(--csz-primary);
}

.csz-cal-month-trigger:focus:not(:focus-visible) {
    outline: none;
    box-shadow: none;
    background: none;
    color: var(--csz-text);
}

.csz-cal-month-caret {
    font-size: 14px;
    color: var(--csz-text-light);
    line-height: 1;
}

/* Month picker dropdown */

.csz-cal-picker {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 1000;
    background: #fff;
    border: 1px solid var(--csz-border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.14);
    width: 280px;
    padding: 16px;
    box-sizing: border-box;
}

.csz-cal-header-left {
    position: relative; /* anchor for the picker */
}

.csz-cal-picker-year-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.csz-picker-year-label {
    font-size: 16px;
    font-weight: 700;
    color: var(--csz-text);
}

.csz-picker-year-prev,
.csz-picker-year-next {
    background: none;
    border: 1px solid var(--csz-border);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    color: var(--csz-text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    padding: 0;
}

.csz-picker-year-prev:hover,
.csz-picker-year-next:hover {
    background: var(--csz-primary);
    border-color: var(--csz-primary);
    color: #fff;
}

.csz-cal-picker-months {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.csz-picker-month-btn {
    background: var(--csz-bg-alt);
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 8px 4px;
    font-size: 13px;
    font-weight: 500;
    color: var(--csz-text);
    cursor: pointer;
    text-align: center;
    transition: all 0.15s;
}

.csz-picker-month-btn:hover {
    background: var(--csz-primary-light);
    border-color: var(--csz-primary);
    color: var(--csz-primary);
}

.csz-picker-month-btn.csz-picker-month-active {
    background: var(--csz-primary);
    border-color: var(--csz-primary);
    color: #fff;
    font-weight: 700;
}

/* Grid - table-based for perfect equal columns and natural resize */

.csz-cal-grid {
    display: table;
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    box-sizing: border-box;
}

.csz-cal-grid-row {
    display: table-row;
}

.csz-cal-dow {
    display: table-cell;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--csz-text-light);
    text-align: center;
    padding: 10px 0;
    background: var(--csz-bg-alt);
    border: 1px solid var(--csz-border);
    box-sizing: border-box;
    width: calc(100% / 7);
}

/* Day cells */

.csz-cal-cell {
    display: table-cell;
    width: calc(100% / 7);
    min-width: 0;
    min-height: var(--csz-cell-min-height, 110px);
    height: var(--csz-cell-min-height, 110px); /* table-cell ignores min-height; height acts as min */
    padding: 4px 0 6px;
    background: var(--csz-bg);
    border: 1px solid var(--csz-border);
    vertical-align: top;
    position: relative;
    box-sizing: border-box;
}

/* Minimum height via pseudo-element so cells grow with content */
/* Min-height set on the cell itself, not a pseudo-element,
   so day numbers appear at the top naturally */

.csz-cal-cell.csz-cal-empty {
    background: var(--csz-bg-alt);
}

/* Overflow cells (prev/next month days) */
.csz-cal-cell.csz-cal-overflow .csz-cal-day-num span {
    color: #bbb;
    font-weight: 400;
}

.csz-overflow-link {
    text-decoration: none;
    display: inline-flex;
}

.csz-overflow-link span {
    color: #bbb;
    font-weight: 400;
}

.csz-overflow-link:hover span {
    color: var(--csz-primary);
    border-color: var(--csz-border);
}

.csz-cal-cell.csz-today {
    background: #fffef5;
}

.csz-cal-day-num {
    text-align: right;
    padding: 4px 8px 2px;
    line-height: 1;
}

.csz-cal-day-num span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    font-size: 13px;
    font-weight: 500;
    color: var(--csz-text-light);
    border-radius: 50%;
    border: 1px solid transparent;
}

.csz-cal-cell.csz-today .csz-cal-day-num span {
    border-color: var(--csz-text-light);
    color: var(--csz-text);
    font-weight: 700;
}

/* Event pills */

.csz-cal-event-list {
    list-style: none;
    margin: 0;
    padding: 0 3px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.csz-cal-event-item {
    display: block;
    border-radius: 3px;
    overflow: hidden;
    white-space: normal;   /* allow wrapping */
    font-size: 14px;
    line-height: 1.3;
    cursor: pointer;
}

.csz-cal-event-link {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    padding: 4px 6px;
    text-decoration: none;
}

.csz-cal-event-link:hover {
    text-decoration: underline;
    opacity: 0.9;
}

.csz-cal-time {
    font-weight: 700;
    flex-shrink: 0;
    font-size: 14px;
}

.csz-cal-sep {
    flex-shrink: 0;
}

.csz-cal-event-name {
    white-space: normal;
    word-break: break-word;
    min-width: 0;
}


/* Compact mode: JS adds this class when columns are narrow */
.csz-cal-compact .csz-cal-event-item {
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    display: inline-block !important;
    margin: 0 1px !important;
    padding: 0 !important;
    text-indent: -9999px !important;
    vertical-align: middle !important;
    font-size: 0 !important;
}

.csz-cal-compact .csz-cal-event-list {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    padding: 0 4px !important;
    gap: 3px !important;
}

.csz-cal-compact .csz-cal-event-link {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
}

/* =============================================================================
   Filter Bar
   ============================================================================= */

.csz-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    padding: 12px 0;
    border-bottom: 2px solid var(--csz-border);
}

.csz-filter-label {
    font-weight: 600;
    font-size: 12px;
    color: var(--csz-text-light);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.csz-filter-btn {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--csz-text);
    background: var(--csz-bg-alt);
    border: 1px solid var(--csz-border);
    text-decoration: none;
    transition: all 0.15s ease;
}

.csz-filter-btn:hover {
    background: var(--csz-primary-light);
    border-color: var(--csz-primary);
    color: var(--csz-primary);
    text-decoration: none;
}

.csz-filter-btn.csz-filter-active {
    background: var(--csz-primary);
    border-color: var(--csz-primary);
    color: #fff;
}

/* =============================================================================
   Event Cards (List View)
   ============================================================================= */

.csz-events-list    { display: flex; flex-direction: column; gap: 16px; }

.csz-event-card {
    display: flex;
    background: var(--csz-bg);
    border: 1px solid var(--csz-border);
    border-radius: var(--csz-radius);
    overflow: hidden;
    box-shadow: var(--csz-shadow);
    transition: box-shadow 0.2s ease;
}

.csz-event-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.12); }

.csz-card-thumb-wrap {
    flex: 0 0 160px;
    width: 160px;
    height: 160px;
    align-self: flex-start;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--csz-bg-alt);
    overflow: hidden;
}
.csz-card-thumb-wrap img,
.csz-card-thumb {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.csz-card-body {
    display: flex;
    flex: 1;
    padding: 16px;
    gap: 16px;
    align-items: flex-start;
}

/* Date badge */
.csz-card-date {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 52px;
    background: var(--csz-primary-light);
    border-radius: var(--csz-radius);
    padding: 6px 4px;
    text-align: center;
}

.csz-date-month {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--csz-primary);
    letter-spacing: 0.05em;
}

.csz-date-day {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--csz-primary);
    line-height: 1.1;
}

.csz-card-content    { flex: 1; min-width: 0; }

/* Type badge */
.csz-type-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 2px 8px;
    border-radius: 10px;
    margin-bottom: 6px;
}

.csz-badge-event   { background: var(--csz-primary-light); color: var(--csz-primary); }
.csz-badge-service { background: #eaf2e3; color: #3d6128; }
.csz-badge-holiday { background: #fdf4e0; color: #8a6a00; }

.csz-card-title {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 6px;
    line-height: 1.3;
}

.csz-card-title a { color: var(--csz-text); text-decoration: none; }
.csz-card-title a:hover { color: var(--csz-primary); text-decoration: underline; }

.csz-card-time,
.csz-card-location { font-size: 13px; color: var(--csz-text-light); margin: 3px 0; }

.csz-card-excerpt { font-size: 14px; color: var(--csz-text-light); margin: 8px 0; line-height: 1.5; }

/* Buttons */
.csz-register-btn,
.csz-details-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 7px 18px;
    border-radius: var(--csz-radius);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
}

.csz-register-btn {
    background: var(--csz-primary);
    color: #fff;
    border: 2px solid var(--csz-primary);
}

.csz-register-btn:hover {
    background: #0f3366;
    border-color: #0f3366;
    color: #fff;
    text-decoration: none;
}

.csz-details-btn {
    background: transparent;
    color: var(--csz-primary);
    border: 2px solid var(--csz-primary);
}

.csz-details-btn:hover {
    background: var(--csz-primary);
    color: #fff;
    text-decoration: none;
}

/* =============================================================================
   Agenda List (Today @ CSZ)
   ============================================================================= */

.csz-agenda-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 18px 0 30px;
}

.csz-agenda-item {
    background: var(--csz-bg);
    border: 1px solid var(--csz-border);
    border-left: 5px solid var(--csz-primary);
    border-radius: var(--csz-radius);
    box-shadow: var(--csz-shadow);
    padding: 16px 18px;
}

.csz-agenda-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    align-items: center;
    margin-bottom: 6px;
    color: var(--csz-text-light);
    font-size: 14px;
}

.csz-agenda-time {
    color: var(--csz-primary);
    font-weight: 800;
}

.csz-agenda-location {
    font-weight: 600;
}

.csz-agenda-title {
    margin: 0 0 8px;
    font-size: 22px;
    line-height: 1.25;
    color: var(--csz-text);
}

.csz-agenda-title a {
    color: inherit;
    text-decoration: none;
}

.csz-agenda-title a:hover {
    color: var(--csz-primary);
    text-decoration: underline;
}

.csz-agenda-excerpt {
    margin: 0;
    color: var(--csz-text);
    font-size: 15px;
    line-height: 1.6;
}

.csz-agenda-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

/* =============================================================================
   Grouped List View
   ============================================================================= */

.csz-events-grouped .csz-event-group    { margin-bottom: 32px; }
.csz-group-date {
    font-size: 14px;
    font-weight: 700;
    color: var(--csz-primary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 8px 0;
    border-bottom: 2px solid var(--csz-primary);
    margin-bottom: 12px;
}

.csz-event-group .csz-event-cards { display: flex; flex-direction: column; gap: 12px; }

/* =============================================================================
   Single Event Detail
   ============================================================================= */

.csz-detail-breadcrumb {
    margin-bottom: 20px;
    font-size: 13px;
}

.csz-detail-breadcrumb a {
    color: var(--csz-primary);
    text-decoration: none;
    font-weight: 600;
}

.csz-detail-breadcrumb a:hover {
    text-decoration: underline;
}

.csz-event-detail {
    max-width: 960px;
    margin: 0 auto;
}

/* Two-column layout */
.csz-detail-columns {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-bottom: 36px;
}

/* Left: image */
.csz-detail-img-col {
    flex: 0 0 380px;
    max-width: 380px;
    align-self: flex-start;
    aspect-ratio: 1 / 1;
    background: var(--csz-bg-alt);
    border-radius: var(--csz-radius);
    box-shadow: var(--csz-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.csz-detail-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

/* Center: vertical colour bar between columns */
.csz-detail-color-bar {
    width: 5px;
    flex-shrink: 0;
    border-radius: 3px;
    align-self: stretch;
}

/* Right: info */
.csz-detail-info-col {
    flex: 1;
    min-width: 0;
}

/* Category pills — sit below action buttons */
.csz-detail-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 18px;
}

.csz-detail-cat-pill {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.csz-detail-cat-pill:hover {
    opacity: 0.85;
    text-decoration: none;
    color: #fff;
}

.csz-detail-cat-more {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--csz-text-light);
    background: var(--csz-bg-alt);
    border: 1px solid var(--csz-border);
}

/* Title */
.csz-detail-title {
    font-size: 34px;
    font-weight: 800;
    color: var(--csz-text);
    margin: 0 0 24px;
    line-height: 1.15;
}

/* Meta list */
.csz-detail-meta-list {
    list-style: none;
    margin: 0 0 28px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.csz-detail-meta-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 17px;
    line-height: 1.5;
}

.csz-detail-meta-icon {
    flex-shrink: 0;
    font-size: 20px;
    width: 26px;
    padding-top: 1px;
}

.csz-detail-meta-text strong {
    display: block;
    font-weight: 700;
    color: var(--csz-text);
}

.csz-detail-time {
    color: var(--csz-text-light);
    font-size: 17px;
}

.csz-detail-meta-text a {
    color: var(--csz-primary);
    text-decoration: none;
    font-weight: 600;
}

.csz-detail-meta-text a:hover {
    text-decoration: underline;
}

/* Action buttons */
.csz-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.csz-detail-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 22px;
    border-radius: var(--csz-radius);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 2px solid var(--csz-primary);
    font-family: inherit;
}

.csz-detail-btn-primary {
    background: var(--csz-primary);
    color: #fff;
}

.csz-detail-btn-primary:hover {
    background: #0f3366;
    border-color: #0f3366;
    color: #fff;
    text-decoration: none;
}

.csz-detail-btn-outline {
    background: transparent;
    color: var(--csz-primary);
}

.csz-detail-btn-outline:hover {
    background: var(--csz-primary);
    color: #fff;
    text-decoration: none;
}

/* Add to Calendar — subtle, secondary style */
.csz-detail-btn-cal {
    background: var(--csz-bg-alt);
    color: var(--csz-text);
    border-color: var(--csz-border);
    font-weight: 600;
}

.csz-detail-btn-cal:hover {
    background: var(--csz-primary-light);
    border-color: var(--csz-primary);
    color: var(--csz-primary);
    text-decoration: none;
}

/* Add to Calendar dropdown */
.csz-detail-addtocal {
    position: relative;
}

.csz-addtocal-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: #fff;
    border: 1px solid var(--csz-border);
    border-radius: var(--csz-radius);
    box-shadow: var(--csz-shadow);
    min-width: 200px;
    z-index: 100;
    overflow: hidden;
}

.csz-addtocal-menu a {
    display: block;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--csz-text);
    text-decoration: none;
    transition: background 0.12s;
}

.csz-addtocal-menu a:hover {
    background: var(--csz-primary-light);
    color: var(--csz-primary);
}

/* Description (full width below columns) */
.csz-detail-description {
    font-size: 15px;
    line-height: 1.8;
    color: var(--csz-text);
    margin-bottom: 32px;
    padding-top: 28px;
    border-top: 1px solid var(--csz-border);
}

.csz-detail-description p:first-child { margin-top: 0; }

/* Tags */
.csz-detail-tags {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--csz-border);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.csz-tag {
    display: inline-block;
    background: var(--csz-bg-alt);
    color: var(--csz-text-light);
    border: 1px solid var(--csz-border);
    border-radius: 12px;
    padding: 3px 10px;
    font-size: 12px;
}

/* Upcoming dates (recurrence) */
.csz-detail-recurrence {
    margin-top: 32px;
    padding-top: 28px;
    border-top: 1px solid var(--csz-border);
}

.csz-detail-recurrence-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--csz-text);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 14px;
}

.csz-detail-recurrence-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.csz-detail-recurrence-item a {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 9px 14px;
    border-radius: var(--csz-radius);
    text-decoration: none;
    transition: background 0.12s;
}

.csz-detail-recurrence-item a:hover {
    background: var(--csz-primary-light);
    text-decoration: none;
}

.csz-rec-date {
    font-weight: 600;
    font-size: 14px;
    color: var(--csz-text);
    min-width: 180px;
}

.csz-rec-time {
    font-size: 13px;
    color: var(--csz-text-light);
}

/* Responsive */
@media ( max-width: 700px ) {
    .csz-detail-columns {
        flex-direction: column;
        gap: 24px;
    }

    .csz-detail-img-col {
        flex: none;
        max-width: 100%;
        width: 100%;
    }

    .csz-detail-color-bar {
        width: 100%;
        height: 5px;
        align-self: auto;
        border-radius: 3px;
    }

    .csz-detail-title { font-size: 22px; }
    .csz-detail-actions { align-items: stretch; flex-direction: column; }
    .csz-detail-btn,
    .csz-detail-addtocal {
        width: 100%;
        box-sizing: border-box;
    }
    .csz-detail-btn { justify-content: center; }
    .csz-addtocal-menu {
        width: 100%;
        box-sizing: border-box;
    }

    .csz-rec-date { min-width: 0; }
}

/* =============================================================================
   Taxonomy Lists
   ============================================================================= */

.csz-categories-list,
.csz-tags-list          { list-style: none; margin: 0; padding: 0; }

.csz-categories-list li,
.csz-tags-list li       { padding: 6px 0; border-bottom: 1px solid var(--csz-border); font-size: 14px; }

.csz-categories-list li:last-child,
.csz-tags-list li:last-child { border-bottom: none; }

.csz-categories-list a,
.csz-tags-list a        { color: var(--csz-primary); font-weight: 500; text-decoration: none; }

.csz-categories-list a:hover,
.csz-tags-list a:hover  { text-decoration: underline; }

.csz-term-count         { color: var(--csz-text-light); font-size: 12px; }

/* =============================================================================
   Responsive
   ============================================================================= */

@media ( max-width: 900px ) {
    /* Cells: reduce min-height via pseudo-element */
    .csz-cal-cell { height: 80px; }  /* acts as min-height on table-cell */
    .csz-cal-dow  { font-size: 10px; letter-spacing: 0; }
    .csz-cal-event-item { font-size: 12px; }
    .csz-cal-time       { font-size: 12px; }
}

@media ( max-width: 768px ) {
    /* Stacked event cards */
    .csz-event-card       { flex-direction: column; }
    .csz-card-thumb-wrap  { flex: none; width: 100%; height: auto; }
    .csz-card-thumb-wrap img,
    .csz-card-thumb       { width: 100%; height: 100%; }
    .csz-card-body        { flex-direction: column; gap: 10px; }
    .csz-card-date        { flex-direction: row; width: auto; gap: 6px; padding: 4px 10px; }
    .csz-date-day         { font-size: 18px; }

    .csz-agenda-list      { gap: 12px; margin: 14px 0 24px; }
    .csz-agenda-item      { padding: 14px; }
    .csz-agenda-title     { font-size: 19px; }
    .csz-agenda-actions   { flex-direction: column; align-items: stretch; }
    .csz-agenda-actions .csz-register-btn,
    .csz-agenda-actions .csz-details-btn {
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }

    /* Calendar: tighter cells, pills shrink to dots */
    .csz-cal-cell { height: 52px; }  /* acts as min-height on table-cell */
    .csz-cal-cell         { padding: 2px 0 4px; }

    .csz-cal-event-item {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        display: inline-block;
        margin: 0 1px;
        padding: 0;
        overflow: hidden;
        text-indent: -9999px;
        vertical-align: middle;
    }

    .csz-cal-event-list {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 0 4px;
        gap: 3px;
        justify-content: flex-start;
    }

    .csz-cal-event-link { display: block; width: 100%; height: 100%; padding: 0; }

    .csz-cal-cell.csz-cell-expanded {
        background: #fffef5;
        box-shadow: inset 0 0 0 2px var(--csz-primary);
    }

    .csz-mobile-day-panel {
        margin: 14px 0 0;
        padding: 14px;
        background: var(--csz-bg);
        border: 1px solid var(--csz-border);
        border-radius: var(--csz-radius);
        box-shadow: var(--csz-shadow);
    }

    .csz-mobile-day-title {
        margin: 0 0 10px;
        color: var(--csz-primary);
        font-size: 17px;
        line-height: 1.3;
    }

    .csz-mobile-day-events {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .csz-mobile-day-event {
        display: block;
        padding: 9px 10px;
        border-left: 5px solid var(--csz-primary);
        border-radius: 4px;
        background: var(--csz-bg-alt);
        color: var(--csz-text);
        font-size: 14px;
        font-weight: 700;
        line-height: 1.35;
        text-decoration: none;
    }

    .csz-mobile-day-event:hover {
        color: var(--csz-primary);
        text-decoration: underline;
    }

    .csz-detail-meta      { flex-direction: column; gap: 14px; }
    .csz-cal-header       { padding: 10px 12px; }
    .csz-cal-month-label  { font-size: 16px; }
}

@media ( max-width: 480px ) {
    .csz-cal-dow          { padding: 6px 0; font-size: 0; }
    .csz-cal-dow::after   { content: attr(data-short-label); font-size: 9px; letter-spacing: 0.04em; }
    .csz-cal-day-num span { width: 20px; height: 20px; font-size: 11px; }
    .csz-detail-title     { font-size: 22px; }
    .csz-cal-today-btn    { padding: 4px 10px; font-size: 11px; }
}

/* =============================================================================
   Happenings Strip Layout  [layout="happenings"]
   Horizontal row: image | title | date | "Learn More"
   ============================================================================= */

.csz-happenings-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 26px;
    margin: 0;
    padding: 0;
}

.csz-happenings-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.csz-happenings-img-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: var(--csz-bg-alt);
    border-radius: 4px;
}

.csz-happenings-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.csz-happenings-no-img {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    background: var(--csz-primary-light);
    font-size: 48px;
    font-weight: 800;
    color: var(--csz-primary);
}

.csz-happenings-body {
    padding: 12px 8px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.csz-happenings-title {
    font-size: 18px;
    font-weight: 400;
    margin: 0 0 6px;
    line-height: 1.25;
}

.csz-happenings-title a {
    color: var(--csz-text);
    text-decoration: none;
}

.csz-happenings-title a:hover {
    color: var(--csz-primary);
    text-decoration: underline;
}

.csz-happenings-date {
    font-size: 14px;
    color: var(--csz-text-light);
    margin: 0 0 8px;
    flex: 1;
}

.csz-learn-more {
    display: inline-block;
    font-size: 14px;
    font-weight: 400;
    color: var(--csz-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--csz-primary);
    padding-bottom: 1px;
    align-self: center;
}

.csz-learn-more:hover {
    color: var(--csz-accent);
    border-color: var(--csz-accent);
    text-decoration: none;
}

.csz-happenings-carousel {
    position: relative;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 58px;
    box-sizing: border-box;
}

.csz-happenings-carousel__viewport {
    overflow: hidden;
}

.csz-happenings-carousel__track {
    display: flex;
    gap: 26px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding: 0 0 6px;
}

.csz-happenings-carousel__track::-webkit-scrollbar {
    display: none;
}

.csz-happenings-card--carousel {
    flex: 0 0 calc((100% - 78px) / 4);
    scroll-snap-align: start;
    box-sizing: border-box;
}

.csz-happenings-card--carousel .csz-happenings-img-wrap {
    background: #fff;
}

.csz-happenings-card--carousel .csz-happenings-no-img {
    background: var(--csz-primary-light);
}

.csz-happenings-carousel__nav {
    position: absolute;
    top: 36%;
    z-index: 2;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: #1a2857;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transition: background 0.15s ease, opacity 0.15s ease;
    box-shadow: 0 8px 20px rgba(26, 40, 87, 0.22);
}

.csz-happenings-carousel__nav span {
    display: block;
    font-size: 34px;
    line-height: 34px;
    margin-top: -2px;
}

.csz-happenings-carousel__nav:hover,
.csz-happenings-carousel__nav:focus {
    background: var(--csz-primary);
    outline: none;
}

.csz-happenings-carousel__nav--prev {
    left: 0;
}

.csz-happenings-carousel__nav--next {
    right: 0;
}

.csz-happenings-carousel__nav.csz-is-disabled {
    opacity: 0.28;
    cursor: default;
    pointer-events: none;
}

.csz-learn-more-btn {
    display: inline-block;
    padding: 7px 18px;
    background: transparent;
    color: var(--csz-primary);
    border: 2px solid var(--csz-primary);
    border-radius: var(--csz-radius);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
}

.csz-learn-more-btn:hover {
    background: var(--csz-primary);
    color: #fff;
    text-decoration: none;
}

/* =============================================================================
   Enrichment List Layout  [layout="enrichment"]
   Grouped by month, image-left + content-right rows
   ============================================================================= */

.csz-enrichment-list {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.csz-enrichment-month-label {
    font-size: 18px;
    font-weight: 800;
    color: var(--csz-primary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--csz-primary);
    margin: 0 0 20px;
}

.csz-enrichment-month {
    display: flex;
    flex-direction: column;
}

.csz-enrichment-item {
    display: flex;
    gap: 24px;
    padding: 20px 0;
    border-bottom: 1px solid var(--csz-border);
    align-items: flex-start;
}

.csz-enrichment-item:last-child {
    border-bottom: none;
}

/* Image column */
.csz-enrichment-img-col {
    flex-shrink: 0;
    width: 220px;
}

.csz-enrichment-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: var(--csz-radius);
    border: 1px solid var(--csz-border);
    background: #fff;
}

.csz-enrichment-no-img {
    width: 220px;
    aspect-ratio: 1 / 1;
    border-radius: var(--csz-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    font-weight: 800;
    color: rgba(255,255,255,0.5);
}

/* Content column */
.csz-enrichment-content {
    flex: 1;
    min-width: 0;
}

.csz-enrichment-title {
    font-size: 19px;
    font-weight: 700;
    margin: 0 0 10px;
    line-height: 1.3;
}

.csz-enrichment-title a {
    color: var(--csz-text);
    text-decoration: none;
}

.csz-enrichment-title a:hover {
    color: var(--csz-primary);
    text-decoration: underline;
}

.csz-enrichment-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--csz-text-light);
}

.csz-enrichment-date {
    font-weight: 600;
    color: var(--csz-primary);
}

.csz-enrichment-time::before { content: '🕐 '; }
.csz-enrichment-location::before { content: '📍 '; }

.csz-enrichment-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: var(--csz-text-light);
    margin: 0 0 14px;
}

.csz-enrichment-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

/* =============================================================================
   Responsive — Happenings & Enrichment
   ============================================================================= */

@media ( max-width: 900px ) {
    .csz-enrichment-img-col,
    .csz-enrichment-no-img  { width: 180px; }
    .csz-happenings-card--carousel { flex: 0 0 calc((100% - 26px) / 2); }
}

@media ( max-width: 680px ) {
    .csz-happenings-strip       { gap: 14px; }
    .csz-happenings-strip .csz-happenings-card { max-width: 100%; flex: 1 1 45%; }
    .csz-happenings-carousel    { padding: 0 42px; }
    .csz-happenings-card--carousel { flex: 0 0 100%; }
    .csz-happenings-carousel__track { gap: 18px; }
    .csz-happenings-carousel__nav { width: 34px; height: 34px; top: 33%; }
    .csz-happenings-carousel__nav span { font-size: 28px; line-height: 28px; }

    .csz-enrichment-item        { flex-direction: column; gap: 14px; }
    .csz-enrichment-img-col     { width: 100%; }
    .csz-enrichment-img,
    .csz-enrichment-no-img      { width: 100%; }
}

@media ( max-width: 420px ) {
    .csz-happenings-strip .csz-happenings-card { flex: 1 1 100%; max-width: 100%; }
}

/* =============================================================================
   Event Modal Popup
   ============================================================================= */

#csz-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

body.csz-modal-open {
    overflow: hidden;
}

#csz-modal {
    background: #fff;
    border-radius: 8px;
    max-width: 820px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: cszModalIn 0.18s ease;
}

@keyframes cszModalIn {
    from { opacity:0; transform: translateY(12px) scale(0.98); }
    to   { opacity:1; transform: translateY(0) scale(1); }
}

#csz-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: var(--csz-text-light);
    cursor: pointer;
    z-index: 2;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.15s;
}

#csz-modal-close:hover {
    background: var(--csz-bg-alt);
    color: var(--csz-text);
}

#csz-modal-inner {
    display: flex;
    gap: 0;
    min-height: 200px;
}

/* Left image column */
#csz-modal-img-col {
    flex-shrink: 0;
    width: 260px;
    align-self: flex-start;
    overflow: hidden;
    border-radius: 8px 0 0 8px; /* round the container, not the img */
    background: var(--csz-bg-alt);
}

#csz-modal-img {
    width: 260px;
    height: 260px;
    object-fit: contain;
    object-position: center center;
    display: block;
    background: var(--csz-bg-alt);
    flex-shrink: 0;
    border-radius: 0;
}

/* Right content column */
#csz-modal-content-col {
    flex: 1;
    padding: 28px 32px 24px 28px;
    min-width: 0;
}

#csz-modal-title {
    font-size: 21px;
    font-weight: 800;
    color: var(--csz-text);
    margin: 0 32px 18px 0;
    line-height: 1.3;
}

#csz-modal-meta {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#csz-modal-meta li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: var(--csz-text);
    line-height: 1.4;
}

.csz-modal-icon {
    flex-shrink: 0;
    width: 20px;
    font-size: 15px;
    padding-top: 1px;
}

#csz-modal-excerpt {
    font-size: 14px;
    line-height: 1.65;
    color: var(--csz-text-light);
    margin: 0 0 20px;
    border-top: 1px solid var(--csz-border);
    padding-top: 14px;
}

#csz-modal-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.csz-modal-btn {
    display: inline-flex;
    align-items: center;
    padding: 9px 22px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
}

.csz-modal-btn-outline {
    border: 2px solid var(--csz-primary);
    color: var(--csz-primary);
    background: transparent;
}

.csz-modal-btn-outline:hover {
    background: var(--csz-primary);
    color: #fff;
    text-decoration: none;
}

.csz-modal-btn-primary {
    background: var(--csz-primary);
    color: #fff;
    border: 2px solid var(--csz-primary);
}

.csz-modal-btn-primary:hover {
    background: #0f3366;
    border-color: #0f3366;
    color: #fff;
    text-decoration: none;
}

/* Loading spinner */
#csz-modal-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    padding: 40px;
}

.csz-modal-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--csz-border);
    border-top-color: var(--csz-primary);
    border-radius: 50%;
    animation: cszSpin 0.7s linear infinite;
}

@keyframes cszSpin { to { transform: rotate(360deg); } }

/* No-image layout */
#csz-modal-inner:not(:has(#csz-modal-img-col:visible)) #csz-modal-content-col {
    padding-left: 32px;
}

/* Modal responsive */
@media ( max-width: 640px ) {
    #csz-modal-inner    { flex-direction: column; }
    #csz-modal-img-col  { width: 100%; }
    #csz-modal-img      { width: 100%; height: 200px; border-radius: 8px 8px 0 0; }
    #csz-modal-content-col { padding: 20px; }
    #csz-modal-title    { font-size: 18px; margin-right: 28px; }
    #csz-modal          { max-height: 95vh; }
}
