/**
 * HRM Search
 * - Layout for search.php result list
 * - Facet sidebar styles
 * - Header live-search dropdown
 */

/* ==========================================================================
   Search results page (search.php)
   ========================================================================== */

#mio-hits {
    display: grid;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

#mio-hits > .mio-hit-article {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 1.25rem;
    padding: 1rem;
    background: var(--theme-palette-color-8, #ffffff);
    border: 1px solid var(--theme-border-color, #edeff2);
    border-radius: 10px;
    transition: box-shadow .15s ease, transform .15s ease;
    align-items: start;
}

#mio-hits > .mio-hit-article:hover {
    box-shadow: var(--theme-shape-shadow, 0 4px 20px rgba(0, 0, 0, .08));
    transform: translateY(-1px);
}

#mio-hits .mio-hit-thumbnail {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 8px;
    background: #f5f5f5;
}

#mio-hits .mio-hit-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

#mio-hits .mio-hit-article.companies .mio-hit-thumbnail img,
#mio-hits .mio-hit-article.mitglieder .mio-hit-thumbnail img {
    object-fit: contain;
    padding: 10px;
    background: #fff;
}

#mio-hits .mio-hit-content {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    min-width: 0;
}

#mio-hits .mio-hit-meta {
    display: inline-block;
    font-size: 11px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--theme-text-color, #6b7280);
    background: var(--theme-palette-color-6, #f9fafb);
    padding: 3px 10px;
    border-radius: 999px;
    width: fit-content;
}

#mio-hits .mio-hit-title {
    margin: 0;
    font-size: 20px;
    line-height: 1.3;
}

#mio-hits .mio-hit-title a {
    color: var(--theme-text-color, #232323);
    text-decoration: none;
}

#mio-hits .mio-hit-title a:hover {
    color: var(--theme-link-hover-color, #95a839);
}

#mio-hits .mio-hit-excerpt {
    color: var(--theme-text-color, #393939);
    font-size: 14px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#mio-hits .mio-hit-excerpt p {
    margin: 0;
}

@media (max-width: 782px) {
    #mio-hits > .mio-hit-article {
        grid-template-columns: 120px 1fr;
        gap: .75rem;
        padding: .75rem;
    }
    #mio-hits .mio-hit-title {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    #mio-hits > .mio-hit-article {
        grid-template-columns: 1fr;
    }
    #mio-hits .mio-hit-thumbnail {
        aspect-ratio: 16 / 9;
    }
}

/* Facet sidebar */
#mio-ais-facets .mio-facet {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

#mio-ais-facets .mio-facet li label {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: 14px;
    cursor: pointer;
    padding: 4px 0;
}

#mio-ais-facets .mio-facet li label input[type="checkbox"] {
    margin: 0;
}

/* Mehr anzeigen toggle — used in both search.php + events archive */
.mio-facet-more,
.hrm-sidebar .filter-content .mio-facet-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: .5rem;
    padding: 4px 0;
    font-size: 12px;
    font-weight: 500;
    color: var(--theme-palette-color-2, #95a839);
    background: transparent;
    border: none;
    cursor: pointer;
    text-decoration: none;
    border-bottom: 1px dashed transparent;
    transition: border-color .15s ease;
}
.mio-facet-more:hover,
.hrm-sidebar .filter-content .mio-facet-more:hover {
    border-bottom-color: var(--theme-palette-color-2, #95a839);
}
.mio-facet-more::after {
    content: '›';
    display: inline-block;
    transform: rotate(90deg);
    font-size: 14px;
    transition: transform .15s ease;
}
.mio-facet-more[data-expanded="true"]::after {
    transform: rotate(-90deg);
}

/* Pagination */
#mio-pagination {
    display: flex;
    justify-content: center;
    gap: .25rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

#mio-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 6px;
    border: 1px solid var(--theme-border-color, #edeff2);
    background: transparent;
    color: var(--theme-text-color, #393939);
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
}

#mio-pagination .page-numbers:hover {
    background: var(--theme-palette-color-6, #f9fafb);
}

#mio-pagination .page-numbers.current {
    background: var(--theme-palette-color-2, #95a839);
    color: #fff;
    border-color: transparent;
}

#mio-stats {
    font-size: 14px;
    color: var(--theme-text-color, #6b7280);
    margin: .5rem 0 1rem;
}

.mio-empty {
    padding: 2rem;
    text-align: center;
    color: var(--theme-text-color, #6b7280);
    border: 1px dashed var(--theme-border-color, #edeff2);
    border-radius: 8px;
}

/* ==========================================================================
   Header live-search dropdown (hijacks .ct-search-form)
   ========================================================================== */

.ct-search-form {
    position: relative;
}

.hrm-live-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 999;
    background: #fff;
    border: 1px solid var(--theme-border-color, #edeff2);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .12);
    max-height: min(70vh, 560px);
    overflow-y: auto;
    display: none;
}

.hrm-live-dropdown[data-open="true"] {
    display: block;
}

.hrm-live-group {
    padding: .5rem 0;
    border-bottom: 1px solid var(--theme-border-color, #edeff2);
}

.hrm-live-group:last-child {
    border-bottom: 0;
}

.hrm-live-group-title {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--theme-text-color, #6b7280);
    padding: .5rem 1rem .25rem;
    margin: 0;
}

.hrm-live-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .5rem 1rem;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: background .1s ease;
}

.hrm-live-item:hover,
.hrm-live-item[data-active="true"] {
    background: var(--theme-palette-color-6, #f9fafb);
}

.hrm-live-thumb {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hrm-live-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hrm-live-item.companies .hrm-live-thumb img,
.hrm-live-item.mitglieder .hrm-live-thumb img {
    object-fit: contain;
    padding: 4px;
    background: #fff;
}

.hrm-live-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.hrm-live-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--theme-text-color, #232323);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hrm-live-subtitle {
    font-size: 12px;
    color: var(--theme-text-color, #6b7280);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hrm-live-footer {
    padding: .75rem 1rem;
    text-align: center;
    border-top: 1px solid var(--theme-border-color, #edeff2);
    background: var(--theme-palette-color-6, #f9fafb);
    border-radius: 0 0 10px 10px;
    position: sticky;
    bottom: 0;
}

.hrm-live-footer a {
    font-size: 13px;
    font-weight: 500;
    color: var(--theme-palette-color-2, #95a839);
    text-decoration: none;
}

.hrm-live-footer a:hover {
    text-decoration: underline;
}

.hrm-live-empty {
    padding: 1.5rem 1rem;
    text-align: center;
    color: var(--theme-text-color, #6b7280);
    font-size: 14px;
}

.hrm-live-loading {
    padding: 1rem;
    text-align: center;
    color: var(--theme-text-color, #9ca3af);
    font-size: 13px;
}

/* Hide Blocksy's native live-results container if any slips through */
.ct-search-form .ct-live-search-results { display: none !important; }

/* ==========================================================================
   Events archive (shortcode `[aloglia_hrm_events]`)
   ========================================================================== */

/* Kill default <ul> bullets on hits + facets */
.entries[data-archive="events"],
.entries[data-archive="events"] .hrm-events-list,
.entries[data-archive="events"] .hrm-events-list-item,
#tax-typ ul,
#tax-main-cat ul,
#current-refinements ul,
#mio-ais-facets .mio-facet,
.hrm-sidebar .filter-content ul,
.ct-sidebar .filter-content ul {
    list-style: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
}

.entries[data-archive="events"] .hrm-events-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin: 0;
}

.entries[data-archive="events"] .hrm-events-list-item {
    margin: 0;
}

/* Editorial layout — no card borders, no shadows. Rows separated by
 * a subtle divider. Text-style action links instead of pill buttons.
 * Overrides legacy main.css rules (width:500px on .hrm-event-image,
 * 1fr/2fr on .hrm-event-card) with .entries[data-archive=events]-scoped !important.
 */
.entries[data-archive="events"] .hrm-event-item {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 1.75rem 0 !important;
    font-size: inherit !important;
    border-bottom: 1px solid var(--theme-border-color, #edeff2) !important;
    transition: none !important;
}
.entries[data-archive="events"] .hrm-event-item:hover {
    box-shadow: none !important;
    transform: none !important;
}
.entries[data-archive="events"] .hrm-events-list-item:last-child .hrm-event-item {
    border-bottom: 0 !important;
}
.entries[data-archive="events"] .hrm-event-card {
    display: grid !important;
    grid-template-columns: 320px minmax(0, 1fr) !important;
    gap: 1.75rem !important;
    align-items: start !important;
    width: 100% !important;
}
@media (max-width: 782px) {
    .entries[data-archive="events"] .hrm-event-card {
        grid-template-columns: 200px minmax(0, 1fr) !important;
        gap: 1rem !important;
    }
}
@media (max-width: 540px) {
    .entries[data-archive="events"] .hrm-event-card { grid-template-columns: 1fr !important; gap: .75rem !important; }
}

.entries[data-archive="events"] .hrm-event-image-link {
    display: block !important;
    width: 100% !important;
    aspect-ratio: 16 / 9 !important;
    overflow: hidden !important;
    position: relative !important;
    background: var(--theme-palette-color-6, #f9fafb);
    min-width: 0;
}
.entries[data-archive="events"] .hrm-event-image {
    margin: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    border-radius: 0 !important;
}
.entries[data-archive="events"] .hrm-event-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    transition: none !important;
    transform: none !important;
}
.entries[data-archive="events"] .hrm-event-item:hover .hrm-event-image img { transform: none !important; }

.entries[data-archive="events"] .crisp.event {
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
    right: auto !important;
    z-index: 2;
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    padding: 4px 10px !important;
    background: #232323 !important;
    color: #fff !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: .08em;
    text-transform: uppercase;
    border-radius: 3px !important;
    box-shadow: none !important;
    white-space: nowrap;
}
.entries[data-archive="events"] .crisp.event svg {
    width: 11px !important;
    height: 11px !important;
    stroke: currentColor;
    fill: none;
}

.entries[data-archive="events"] .hrm-event-details {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    padding: 0 !important;
    gap: .6rem !important;
    min-width: 0 !important;
}
@media (max-width: 540px) {
    .entries[data-archive="events"] .hrm-event-details { padding: 0 !important; }
}
.entries[data-archive="events"] .hrm-content-event-details {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    min-width: 0;
}

.entries[data-archive="events"] .hrm-event-dates {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: 13px;
    font-weight: 400;
    color: var(--theme-text-color, #6b7280) !important;
    text-transform: none;
    margin: 0 !important;
}
.entries[data-archive="events"] .hrm-event-dates .icon svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
}

.entries[data-archive="events"] .hrm-event-title {
    margin: 0 !important;
    font-size: 22px !important;
    line-height: 1.3 !important;
    color: var(--theme-text-color, #232323) !important;
    font-weight: 700 !important;
}
@media (max-width: 540px) {
    .entries[data-archive="events"] .hrm-event-title { font-size: 18px !important; }
}

.entries[data-archive="events"] .hrm-event-address {
    font-style: normal;
    font-size: 13px;
    color: var(--theme-text-color, #6b7280);
    display: flex;
    align-items: flex-start;
    gap: .4rem;
    margin: 0;
}
.entries[data-archive="events"] .hrm-event-address p { margin: 0; }
.entries[data-archive="events"] .hrm-event-address .icon svg { width: 15px; height: 15px; flex-shrink: 0; }

.entries[data-archive="events"] .hrm-event-excerpt {
    font-size: 14px;
    color: var(--theme-text-color, #6b7280);
    margin: .25rem 0 0 !important;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.entries[data-archive="events"] .more-links {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 1.5rem !important;
    padding-top: .75rem !important;
    margin-top: .25rem !important;
    border: 0 !important;
}

/* Text-style action links (no pills, no buttons) — inspired by editorial
 * listings. Just icon + label, primary color on hover.
 */
.entries[data-archive="events"] .tickets-button,
.entries[data-archive="events"] .website-button,
.entries[data-archive="events"] .mio-button-group .mio-ajax-button {
    display: inline-flex !important;
    align-items: center !important;
    gap: .4rem !important;
    padding: 0 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    border: 0 !important;
    border-radius: 0 !important;
    text-decoration: none !important;
    background: transparent !important;
    color: var(--theme-text-color, #393939) !important;
    cursor: pointer !important;
    transition: color .15s ease !important;
    min-height: auto !important;
    box-shadow: none !important;
}
.entries[data-archive="events"] .tickets-button:hover,
.entries[data-archive="events"] .website-button:hover,
.entries[data-archive="events"] .mio-button-group .mio-ajax-button:hover {
    color: var(--theme-palette-color-2, #95a839) !important;
    background: transparent !important;
    border: 0 !important;
}
.entries[data-archive="events"] .tickets-button .icon,
.entries[data-archive="events"] .website-button .icon,
.entries[data-archive="events"] .mio-ajax-button .icon {
    display: inline-flex;
    align-items: center;
}
.entries[data-archive="events"] .tickets-button .icon svg,
.entries[data-archive="events"] .website-button .icon svg,
.entries[data-archive="events"] .mio-ajax-button .icon svg {
    width: 15px !important;
    height: 15px !important;
    stroke: currentColor;
    fill: none;
}
.entries[data-archive="events"] .mio-button-group {
    display: inline-flex !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
}

/* Month separator — plain editorial heading with bottom rule */
.hrm-month-separator {
    display: block;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: normal;
    text-transform: none;
    color: var(--theme-text-color, #232323);
    padding: 0 0 .75rem;
    margin: 1.5rem 0 .25rem;
    border-bottom: 1px solid var(--theme-border-color, #edeff2);
    position: static;
}
.hrm-month-separator::after { display: none !important; }

/* Load more button */
#hrm-load-more {
    display: block;
    margin: 1.5rem auto 0;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid var(--theme-border-color, #edeff2);
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color .15s, color .15s;
}
#hrm-load-more:hover {
    border-color: var(--theme-palette-color-2, #95a839);
    color: var(--theme-palette-color-2, #95a839);
}

/* ==========================================================================
   Events archive sidebar / filters
   ========================================================================== */

.hrm-sidebar .hrm-filter-section,
.ct-sidebar .hrm-filter-section {
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--theme-border-color, #edeff2);
}
.hrm-sidebar .hrm-filter-section:last-child,
.ct-sidebar .hrm-filter-section:last-child { border-bottom: none; }
.hrm-sidebar .hrm-filter-section h3,
.ct-sidebar .hrm-filter-section h3 {
    font-size: 14px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    margin: 0 0 .75rem;
    color: var(--theme-text-color, #232323);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}
.hrm-sidebar .hrm-filter-section h3::after,
.ct-sidebar .hrm-filter-section h3::after {
    content: '−';
    font-size: 20px;
    font-weight: 400;
    color: var(--theme-text-color, #9ca3af);
    line-height: 1;
    transition: transform .15s ease;
}
.hrm-sidebar .hrm-filter-section[data-collapsed="true"] h3::after,
.ct-sidebar .hrm-filter-section[data-collapsed="true"] h3::after {
    content: '+';
}
.hrm-sidebar .hrm-filter-section[data-collapsed="true"] .filter-content,
.ct-sidebar .hrm-filter-section[data-collapsed="true"] .filter-content {
    display: none;
}
.hrm-sidebar .filter-content,
.ct-sidebar .filter-content {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}
.hrm-sidebar .filter-content ul,
.ct-sidebar .filter-content ul {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}
.hrm-sidebar .filter-content li,
.ct-sidebar .filter-content li {
    margin: 0;
}
.hrm-sidebar .filter-content label,
.ct-sidebar .filter-content label {
    display: flex;
    align-items: center;
    gap: .55rem;
    font-size: 13px;
    color: var(--theme-text-color, #393939);
    cursor: pointer;
    padding: 4px 0;
    line-height: 1.35;
    width: 100%;
}
.hrm-sidebar .filter-content label:hover,
.ct-sidebar .filter-content label:hover {
    color: var(--theme-palette-color-2, #95a839);
}
.hrm-sidebar .filter-content label .mio-facet-label,
.ct-sidebar .filter-content label .mio-facet-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hrm-sidebar .filter-content label .mio-facet-count,
.ct-sidebar .filter-content label .mio-facet-count {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 500;
    color: var(--theme-text-color, #6b7280);
    background: var(--theme-palette-color-6, #f9fafb);
    border: 1px solid var(--theme-border-color, #edeff2);
    border-radius: 4px;
    padding: 2px 7px;
    min-width: 22px;
    text-align: center;
    line-height: 1.4;
}
.hrm-sidebar .filter-content input[type="checkbox"] {
    margin: 0;
    accent-color: var(--theme-palette-color-2, #95a839);
    flex-shrink: 0;
}

/* Clear refinements + current refinements */
#clear-refinements,
#current-refinements {
    margin-bottom: .75rem;
}
#current-refinements ul {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin: 0;
    padding: 0;
}
#current-refinements li button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 999px;
    border: 1px solid var(--theme-border-color, #edeff2);
    background: var(--theme-palette-color-6, #f9fafb);
    color: var(--theme-text-color, #393939);
    cursor: pointer;
}
#clear-refinements button {
    font-size: 12px;
    color: var(--theme-palette-color-2, #95a839);
    background: transparent;
    border: none;
    padding: 4px 0;
    cursor: pointer;
    text-decoration: underline;
}

/* Date range inputs */
.hrm-date-container {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .35rem .5rem;
    align-items: center;
}
.hrm-date-label {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    font-size: 12px;
    color: var(--theme-text-color, #6b7280);
}
.hrm-date-filter {
    width: 100%;
    padding: 6px 10px;
    font-size: 13px;
    border: 1px solid var(--theme-border-color, #edeff2);
    border-radius: 6px;
}

/* Searchbox — shared style for events + company/community archive bars */
.hrm-search-bar {
    margin-bottom: 1rem;
}
.hrm-search-bar input[type="search"],
.hrm-search-bar input[type="text"] {
    width: 100%;
    padding: 10px 14px;
    font-size: 15px;
    border: 1px solid var(--theme-border-color, #edeff2);
    border-radius: 8px;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.hrm-search-bar input[type="search"]:focus,
.hrm-search-bar input[type="text"]:focus {
    outline: none;
    border-color: var(--theme-palette-color-2, #95a839);
    box-shadow: 0 0 0 3px rgba(149, 168, 57, .15);
}
.hrm-search-bar.is-logged-out input {
    cursor: pointer;
    background: #f8f8f8;
}

/* Container */
.hrm-events-container {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2rem;
    align-items: start;
}
@media (max-width: 900px) {
    .hrm-events-container { grid-template-columns: 1fr; }
    .hrm-sidebar { order: -1; }
}

/* ==========================================================================
   Perceived-speed tricks — skeletons, dim-and-keep, mark, typing indicator
   ========================================================================== */

@keyframes hrm-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Skeleton item — used in .entries[data-archive="events"] (events archive) and #mio-hits (search.php)
 * when the list is empty and a fetch starts. Width/aspect mirrors a real
 * .hrm-event-item / .mio-hit-article so nothing shifts when real content
 * arrives.
 */
.hrm-skel {
    --skel-bg: rgba(0, 0, 0, .055);
    --skel-hl: rgba(0, 0, 0, .095);
    background: linear-gradient(
        90deg,
        var(--skel-bg) 25%,
        var(--skel-hl) 50%,
        var(--skel-bg) 75%
    );
    background-size: 200% 100%;
    animation: hrm-shimmer 1.4s linear infinite;
    border-radius: 4px;
    display: block;
}

.entries[data-archive="events"] .hrm-skel-row {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 1.75rem;
    align-items: start;
    padding: 1.75rem 0;
    border-bottom: 1px solid var(--theme-border-color, #edeff2);
    list-style: none;
}
@media (max-width: 782px) {
    .entries[data-archive="events"] .hrm-skel-row { grid-template-columns: 200px minmax(0, 1fr); gap: 1rem; }
}
@media (max-width: 540px) {
    .entries[data-archive="events"] .hrm-skel-row { grid-template-columns: 1fr; gap: .75rem; }
}
.entries[data-archive="events"] .hrm-skel-thumb {
    aspect-ratio: 16 / 9;
    border-radius: 0;
}
.entries[data-archive="events"] .hrm-skel-text {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    padding-top: .4rem;
}
.entries[data-archive="events"] .hrm-skel-line-xs { height: 12px; width: 30%; }
.entries[data-archive="events"] .hrm-skel-line-lg { height: 22px; width: 85%; }
.entries[data-archive="events"] .hrm-skel-line-md { height: 14px; width: 55%; }
.entries[data-archive="events"] .hrm-skel-line-pg { height: 14px; width: 95%; }
.entries[data-archive="events"] .hrm-skel-actions { display: flex; gap: 1.5rem; padding-top: .5rem; }
.entries[data-archive="events"] .hrm-skel-pill { height: 14px; width: 70px; border-radius: 4px; }

/* Global search (search.php) skeleton — different layout (180/1fr). */
#mio-hits .hrm-skel-row {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 1.25rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--theme-border-color, #edeff2);
    list-style: none;
}
@media (max-width: 782px) {
    #mio-hits .hrm-skel-row { grid-template-columns: 120px minmax(0, 1fr); }
}
@media (max-width: 480px) {
    #mio-hits .hrm-skel-row { grid-template-columns: 1fr; }
}
#mio-hits .hrm-skel-thumb { aspect-ratio: 4 / 3; border-radius: 6px; }
#mio-hits .hrm-skel-text { display: flex; flex-direction: column; gap: .5rem; padding-top: .3rem; }
#mio-hits .hrm-skel-line-xs { height: 11px; width: 25%; }
#mio-hits .hrm-skel-line-lg { height: 18px; width: 80%; }
#mio-hits .hrm-skel-line-md { height: 13px; width: 50%; }
#mio-hits .hrm-skel-line-pg { height: 13px; width: 95%; }

/* Live dropdown skeleton */
.hrm-live-dropdown .hrm-skel-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .5rem 1rem;
}
.hrm-live-dropdown .hrm-skel-thumb-sm {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    flex-shrink: 0;
}
.hrm-live-dropdown .hrm-skel-text-sm { flex: 1; display: flex; flex-direction: column; gap: .35rem; }
.hrm-live-dropdown .hrm-skel-line-a { height: 13px; width: 70%; }
.hrm-live-dropdown .hrm-skel-line-b { height: 11px; width: 40%; }

/* Dim-and-keep: while a fetch is in flight and old hits are still on screen,
 * don't clear the DOM — just fade it slightly. Much better perceived speed
 * than an empty list briefly flashing. */
.entries[data-archive="events"] .is-fetching,
#mio-hits.is-fetching {
    opacity: .48;
    pointer-events: none;
    transition: opacity .14s ease-out;
}
.entries[data-archive="events"]:not(.is-fetching),
#mio-hits:not(.is-fetching) {
    transition: opacity .18s ease-out;
}

/* Highlight matches — applied in real-time via JS as the user types,
 * even before the request goes out. */
.entries[data-archive="events"] mark.hrm-mark,
#mio-hits mark.hrm-mark,
.hrm-live-dropdown mark.hrm-mark {
    background: var(--theme-palette-color-2, #95a839);
    color: #fff;
    padding: 0 3px;
    border-radius: 3px;
    font: inherit;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

/* Typing indicator — animated underline under any search input inside a
 * wrapper with the .is-searching class. Feels alive without looking like
 * a spinner. */
#searchBox.is-searching,
.mio-search-box-wrapper.is-searching,
.ct-search-form.is-searching {
    position: relative;
}
#searchBox.is-searching::after,
.mio-search-box-wrapper.is-searching::after,
.ct-search-form.is-searching::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--theme-palette-color-2, #95a839) 50%,
        transparent 100%
    );
    background-size: 40% 100%;
    background-repeat: no-repeat;
    animation: hrm-indicator-slide 1.1s ease-in-out infinite;
    pointer-events: none;
    border-radius: 2px;
}
@keyframes hrm-indicator-slide {
    0%   { background-position: -40% 0; }
    50%  { background-position: 100% 0; }
    100% { background-position: 140% 0; }
}

/* ---- hrm-archive-search ---- */
/* .hrm-archive-wrap grid removed — Blocksy handles the sidebar layout */
/* A-Z bar uses .custom-alphabetical-filter / .custom-alpha-btn from main.css */
.hrm-archive-facet { margin-bottom: 1rem; }
.hrm-archive-facet-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.4rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #eee;
}
.hrm-archive-facet-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 240px;
    overflow-y: auto;
}
.hrm-archive-facet-list li { padding: 0.15rem 0; font-size: 0.88rem; }
.hrm-archive-facet-list .count { color: #888; font-size: 0.8rem; }
.hrm-archive-search-bar { position: relative; margin-bottom: 1rem; }
.hrm-archive-search-bar input {
    width: 100%;
    padding: 0.6rem 0.85rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.hrm-archive-search-bar.is-logged-out input { cursor: pointer; background: #f8f8f8; }
.hrm-archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}
.hrm-archive-card {
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.15s;
}
.hrm-archive-card:hover { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); }
.hrm-archive-card__link {
    display: block;
    color: inherit;
    text-decoration: none;
    padding: 0.85rem;
}
.hrm-archive-card__img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}
.hrm-archive-card__title { font-size: 1rem; margin: 0.5rem 0 0.25rem; }
.hrm-archive-card__city { font-size: 0.85rem; color: #666; }
.hrm-archive-card__meta { font-size: 0.85rem; color: #666; margin-top: 0.25rem; }
.hrm-archive-card__tags { margin-top: 0.5rem; display: flex; flex-wrap: wrap; gap: 0.25rem; }
.hrm-archive-card__tag {
    font-size: 0.72rem;
    background: #eef;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
}
.hrm-archive-empty { padding: 2rem; text-align: center; color: #666; }
.hrm-archive-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem 0;
}
.hrm-archive-page-btn {
    padding: 0.4rem 0.8rem;
    border: 1px solid #ccc;
    background: #fff;
    cursor: pointer;
    border-radius: 4px;
}
.hrm-archive-page-btn:hover { background: #f5f5f5; }
.hrm-archive-page-info { font-size: 0.9rem; color: #666; }
