/* Messemanager – Aussteller-Plugin
   ─────────────────────────────────────────────────────
   Theme-bestimmt für Schrift, Filter-Inputs und Detail-Layout.
   Cards haben einen eigenen Hintergrund + Rahmen (anpassbar).

   Per Shortcode überschreibbare CSS-Variablen:
     card_bg_color      → --mm-exh-card-bg
     card_border_color  → --mm-exh-card-border
*/

.mm-exh,
.mm-exh-detail {
    --mm-exh-card-bg:     #ffffff;
    --mm-exh-card-border: #e5e7eb;
    box-sizing: border-box;
    position: relative;
}
.mm-exh *, .mm-exh *::before, .mm-exh *::after,
.mm-exh-detail *, .mm-exh-detail *::before, .mm-exh-detail *::after {
    box-sizing: border-box;
}

/* ── Filterleiste ─────────────────────────────────── */
.mm-exh__filterbar {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: flex-end;
    margin-bottom: 1.25rem;
}
.mm-exh__field {
    display: flex;
    flex-direction: column;
    flex: 1 1 200px;
    min-width: 160px;
}
/* Filter-Inputs (Suchfeld, Select) werden nicht vom Plugin gestylt – Theme-Defaults greifen. */

/* Labels über den Filter-Feldern werden ausgeblendet – Placeholder reicht als Hinweis. */
.mm-exh__label { display: none; }

/* Buttons (Anwenden / Reset): nur Padding vom Plugin, alles andere vom Theme. */
.mm-exh__btn { padding: 0.5em 2em; }

.mm-exh__count   { margin: 0 0 1rem; }
.mm-exh__empty {
    grid-column: 1 / -1;       /* Empty-Hinweis spannt sich über alle Grid-Spalten */
    text-align: center;
    padding: 2.5rem 1rem;
    border: 1px dashed currentColor;
    opacity: .6;
}
.mm-exh-warning {
    padding: .75rem 1rem;
    border: 1px solid currentColor;
}

/* AJAX-Loading-Indikator (klein, dezent) */
.mm-exh.is-loading { opacity: .6; transition: opacity .15s ease; }

/* ── Karten / Grid + Liste ────────────────────────── */
.mm-exh__items {
    display: grid;
    gap: 1.25rem;
}
.mm-exh--cols-2 .mm-exh__items { grid-template-columns: repeat(2, 1fr); }
.mm-exh--cols-3 .mm-exh__items { grid-template-columns: repeat(3, 1fr); }
.mm-exh--cols-4 .mm-exh__items { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 768px) { .mm-exh__items { grid-template-columns: 1fr 1fr !important; } }
@media (max-width: 480px) { .mm-exh__items { grid-template-columns: 1fr !important; } }

.mm-exh--list .mm-exh__items     { grid-template-columns: 1fr !important; }
.mm-exh--list .mm-exh__card      { flex-direction: row; align-items: center; }
.mm-exh--list .mm-exh__card-head { flex: 0 0 auto; }

.mm-exh__card {
    position: relative;     /* für absolutes Premium-Badge */
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding: 1rem;
    background: var(--mm-exh-card-bg);
    color: inherit;
    text-decoration: none !important;
    border: 1px solid var(--mm-exh-card-border);
    border-radius: .5rem;
    transition: transform .12s ease, box-shadow .12s ease;
    height: 100%;
}
a.mm-exh__card,
a.mm-exh__card:hover,
a.mm-exh__card:focus,
a.mm-exh__card:active {
    text-decoration: none !important;
}
.mm-exh__premium {
    position: absolute;
    top: .5rem;
    right: .5rem;
    width: 60px;
    height: auto;
    z-index: 5;
    pointer-events: none;
}
.mm-exh__premium--detail {
    position: static;
    width: 80px;
    margin: 0 0 .5rem;
}
a.mm-exh__card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(15, 23, 42, .08);
}
/* Aggressive Margin-Resets gegen Theme-Headings/Paragraphen in der Karte */
.mm-exh__card,
.mm-exh__card * { margin: 0 !important; }

.mm-exh__card-head {
    display: flex;
    gap: .75rem;
    align-items: center;
}
.mm-exh__logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    flex: 0 0 auto;
    background: transparent;
    padding: 0;
}
.mm-exh__logo--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid currentColor;
}

/* Firmenname: semantisch <h2>, optisch in Größe von <h3> + ohne oberen Abstand. */
.mm-exh__name {
    color: inherit;
    font-size: 1.25em;
    margin-top: 0 !important;
}
/* Höhere Spezifität gegen Theme-Selektoren wie .entry-content h2 */
.mm-exh .mm-exh__items h2.mm-exh__name {
    margin-top: 0 !important;
}
/* Tagline (auch „Mitaussteller bei …") und Teaser-Text bewusst klein */
.mm-exh__tagline { color: inherit; font-size: 0.7rem; }
.mm-exh__desc {
    color: inherit;
    font-size: 0.7rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mm-exh__badges {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-top: auto !important;
}
.mm-exh__badge {
    display: inline-flex;
    align-items: center;
    padding: .15rem .55rem;
    border: 1px solid currentColor;
    border-radius: 999px;
    color: inherit;
    background: transparent;
    font-size: 0.6rem;
}

/* ── Detailseite ─────────────────────────────────── */
.mm-exh-detail__back { margin: 0 0 1rem; }
.mm-exh-detail__head {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.mm-exh-detail__logo {
    max-width: 140px;
    max-height: 140px;
    object-fit: contain;
}
.mm-exh-detail__head-text { flex: 1; min-width: 0; }

/* Premium-Tag rechts neben dem Firmennamen */
.mm-exh-detail__name-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: space-between;
}
.mm-exh-detail__name { margin: 0; }
.mm-exh-detail__name-row .mm-exh__premium--detail {
    position: static;
    width: 120px;
    margin: 0;
}

/* Stand-Badge direkt unter dem Firmennamen */
.mm-exh-detail__stand-badge-row { margin: .35rem 0 .5rem; }

.mm-exh-detail__badges {
    display: flex;
    gap: .35rem;
    flex-wrap: wrap;
    margin-top: .35rem;
}
.mm-exh-detail__body {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}
@media (max-width: 768px) { .mm-exh-detail__body { grid-template-columns: 1fr; } }
.mm-exh-detail__section { margin-bottom: 1.5rem; }

/* Inline-SVG-Icons – einheitliche Größe + Vertikalausrichtung */
.mm-exh-icon {
    display: inline-block;
    vertical-align: -.125em;
    flex: 0 0 auto;
}

/* ── Kontakt (Telefon / Mail / Web) ohne Listenpunkte ──────── */
.mm-exh-detail__contact { display: flex; flex-direction: column; gap: .35rem; }
.mm-exh-detail__contact-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    line-height: 1.4;
}
.mm-exh-detail__contact-row--small { font-size: .85rem; }
.mm-exh-detail__contact-row a { text-decoration: none; }
.mm-exh-detail__contact-row a:hover { text-decoration: underline; }

/* ── Social Media ohne Listenpunkte, mit Icons ─────────────── */
.mm-exh-detail__social { display: flex; flex-direction: column; gap: .35rem; }
.mm-exh-detail__social-link {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    text-decoration: none;
}
.mm-exh-detail__social-link:hover { text-decoration: underline; }
.mm-exh-detail__social-icon { font-size: 1rem; }

/* ── Buttons (Termin / Hallenplan) ─────────────────────────── */
/* Plugin liefert nur Layout (Icon + Label nebeneinander). Aussehen
   bestimmt das Theme über seine eigenen <a>-/Button-Stile.  */
.mm-exh-detail__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
}
.mm-exh-detail__btn--book      { margin-bottom: 1.25rem; }
.mm-exh-detail__btn--floorplan { margin-top: .75rem; }
.mm-exh-detail__gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: .5rem;
}
.mm-exh-detail__gallery-item {
    position: relative;
    display: block;
    overflow: hidden;
}
.mm-exh-detail__gallery-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}
.mm-exh-detail__copyright {
    position: absolute;
    bottom: 6px;
    right: 8px;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: .7rem;
    padding: 2px 8px;
}
.mm-exh-detail__caption {
    display: block;
    text-align: center;
    font-size: .75rem;
    margin-top: .25rem;
    opacity: .8;
}

/* ── Imagefilm ─────────────────────────────────── */
.mm-exh-detail__film {
    width: 100%;
    max-height: 480px;
    background: #000;
    display: block;
}

/* ── Unternehmensprofil HTML (description_html) ── */
.mm-exh-detail__profile-html h2,
.mm-exh-detail__profile-html h3,
.mm-exh-detail__profile-html h4 { margin-top: 1.25rem; }
.mm-exh-detail__profile-html ul { padding-left: 1.25rem; }

/* ── Veranstaltungsliste (vom Aussteller) ──────── */
.mm-exh-detail__events {
    list-style: none !important;
    padding-left: 0 !important;
    margin: 0 !important;
}
.mm-exh-detail__event {
    list-style: none !important;
    display: flex !important;     /* statt list-item → kein ::marker */
    gap: .75rem;
    padding: .75rem 0;
    border-bottom: 1px solid var(--mm-exh-card-border);
    margin: 0 !important;
}
.mm-exh-detail__event::before,
.mm-exh-detail__event::marker { content: none !important; display: none !important; }
.mm-exh-detail__event:last-child { border-bottom: none; }
.mm-exh-detail__event-img {
    flex: 0 0 auto;
    width: 140px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    display: block;
    background: rgba(0,0,0,.06);
}
.mm-exh-detail__event-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.mm-exh-detail__event-body { flex: 1; min-width: 0; }
.mm-exh-detail__event-title { display: block; }
.mm-exh-detail__event-title a { text-decoration: none; }
.mm-exh-detail__event-meta {
    font-size: .8rem;
    margin: .25rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    align-items: center;
    opacity: .85;
}
.mm-exh-detail__event-teaser {
    font-size: .85rem;
    margin: 0 !important;
    opacity: .85;
}
.mm-exh__badge--event-type {
    text-transform: uppercase;
    letter-spacing: .3px;
}
.mm-exh-detail__event-cta {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin-top: .35rem !important;
    font-weight: 700;
    font-size: .85rem;
    text-decoration: none;
}
.mm-exh-detail__event-cta:hover { text-decoration: underline; }

/* ── Dokumente ─────────────────────────────────── */
.mm-exh-detail__docs {
    list-style: none !important;
    padding-left: 0 !important;
    margin: 0 !important;
}
.mm-exh-detail__doc {
    list-style: none !important;
    display: block !important;    /* statt list-item → kein ::marker */
    padding: 0 !important;
    border-bottom: 1px solid var(--mm-exh-card-border);
    margin: 0 !important;
}
.mm-exh-detail__doc::before,
.mm-exh-detail__doc::marker { content: none !important; display: none !important; }
.mm-exh-detail__doc:last-child { border-bottom: none; }
.mm-exh-detail__doc-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem .25rem;
    text-decoration: none;
    color: inherit;
}
.mm-exh-detail__doc-link:hover { text-decoration: underline; }
.mm-exh-detail__doc-icon { font-size: 1.25rem; flex: 0 0 auto; }
.mm-exh-detail__doc-text { display: flex; flex-direction: column; }
.mm-exh-detail__doc-title { font-weight: 600; }
.mm-exh-detail__doc-text small { opacity: .7; font-size: .8rem; }

/* ── Ansprechpartner-Karten (Sidebar) ──────────── */
.mm-exh-detail__contacts {
    list-style: none !important;
    padding: 0;
    margin: 0;
}
.mm-exh-detail__contact-card {
    list-style: none !important;
    padding: .75rem 0;
    border-bottom: 1px solid var(--mm-exh-card-border);
    margin: 0 !important;
}
.mm-exh-detail__contact-card:last-child { border-bottom: none; }
.mm-exh-detail__contact-photo {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    margin-bottom: .5rem;
    display: block;
}
.mm-exh-detail__contact-pos {
    font-size: .8rem;
    opacity: .75;
}

/* ── Stand-Box (Sidebar) ───────────────────────── */
.mm-exh-detail__stand {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}
.mm-exh-detail__stand-area {
    font-size: .85rem;
    margin-top: .25rem !important;
    opacity: .75;
}

/* ── Kategorie-Badge (mit Brand-Farbe aus DB) ──── */
.mm-exh__badge--category { /* color/background per inline-style aus category_color */ }

/* ── Lightbox (Foto-Großansicht) ───────────────── */
.mm-exh-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 2rem;
    box-sizing: border-box;
}
.mm-exh-lightbox.is-open { display: flex; }
.mm-exh-lightbox * { box-sizing: border-box; }
.mm-exh-lightbox__figure {
    max-width: 95vw;
    max-height: 90vh;
    margin: 0;
    text-align: center;
    cursor: default;
}
.mm-exh-lightbox__img {
    max-width: 100%;
    max-height: 80vh;
    display: block;
    margin: 0 auto;
    background: #000;
}
.mm-exh-lightbox__caption {
    color: #fff;
    font-size: .9rem;
    margin-top: .75rem;
    text-align: center;
}
.mm-exh-lightbox__close,
.mm-exh-lightbox__nav {
    position: absolute;
    background: rgba(0, 0, 0, .4);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .35);
    width: 3rem;
    height: 3rem;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font: inherit;
    font-size: 1.5rem;
}
.mm-exh-lightbox__close { top: 1rem; right: 1rem; }
.mm-exh-lightbox__nav--prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.mm-exh-lightbox__nav--next { right: 1rem; top: 50%; transform: translateY(-50%); }
.mm-exh-lightbox__close:hover,
.mm-exh-lightbox__nav:hover { background: rgba(0, 0, 0, .7); }
@media (max-width: 600px) {
    .mm-exh-lightbox__nav { width: 2.5rem; height: 2.5rem; }
}
