/* aussteller.css – Ausstellerliste & Standplan-Karte */

/* ── Suchleiste ── */
.search-bar {
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem 1.25rem .5rem;
}
.search-input {
    width: 100%;
    padding: .65rem 1rem .65rem 2.5rem;
    border: 2px solid var(--as-hellbeige);
    border-radius: 8px;
    background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%239a8e87' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242.156a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E") no-repeat .75rem center;
    color: var(--text);
    font-family: 'PT Sans', sans-serif;
    font-size: .95rem;
    transition: border-color .15s;
}
.search-input:focus {
    outline: none;
    border-color: var(--as-rot);
}
.search-input::placeholder { color: var(--text-light); }

/* ── Filter (Schlagworte) ── */
.tag-filters {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 1.25rem .5rem;
    display: flex;
    gap: .4rem;
    flex-wrap: wrap;
}
.tag-btn {
    padding: .35rem .7rem;
    border: 2px solid var(--as-hellbeige);
    border-radius: 6px;
    background: var(--card);
    color: var(--text);
    font-family: 'PT Sans', sans-serif;
    font-size: .75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .15s;
}
.tag-btn.active {
    background: var(--as-braun-dark);
    color: #fff;
    border-color: var(--as-braun-dark);
}
.tag-btn:hover:not(.active) {
    border-color: var(--as-rot);
    color: var(--as-rot);
}

/* ── Aussteller-Liste ── */
.aussteller-list {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 1.25rem 3rem;
}

/* ── Aussteller Card ── */
.aussteller-card {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    background: var(--card);
    padding: 1rem 1.1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    margin-bottom: .65rem;
    cursor: pointer;
    color: var(--text);
    transition: box-shadow .2s, border-color .2s;
    position: relative;
}
.aussteller-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--as-rot);
}

/* Logo in der Liste */
.aussteller-card-logo {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 8px;
    object-fit: contain;
    background: #f5f0eb;
    border: 1px solid var(--border);
}
.aussteller-letter-avatar {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 8px;
    background: var(--as-braun-dark);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
}

.aussteller-card-body { flex: 1; min-width: 0; }
.aussteller-card-firma {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--as-braun-dark);
    margin-bottom: .3rem;
}
.aussteller-card-stand {
    display: inline-block;
    font-size: .75rem;
    font-weight: 700;
    padding: .2rem .55rem;
    border-radius: 4px;
    background: var(--as-braun-dark);
    color: #fff;
    margin-bottom: .35rem;
}
.aussteller-card-desc {
    font-size: .8rem;
    color: var(--text-light);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.aussteller-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
    margin-top: .35rem;
}
.aussteller-tag {
    display: inline-block;
    font-size: .6rem;
    font-weight: 700;
    padding: .15rem .5rem;
    border-radius: 4px;
    background: rgba(241, 136, 100, .15);
    color: var(--as-dunkelrot);
    text-transform: uppercase;
    letter-spacing: .02em;
}
.aussteller-ws-tag {
    display: inline-block;
    font-size: .58rem;
    font-weight: 600;
    padding: .12rem .4rem;
    border-radius: 3px;
    background: rgba(0,0,0,.06);
    color: var(--text-light);
}
.aussteller-card-arrow {
    color: var(--text-light);
    font-size: 1.2rem;
    flex-shrink: 0;
    align-self: center;
}

/* ── Result Count ── */
.aussteller-count {
    text-align: center;
    font-size: .8rem;
    color: var(--text-light);
    font-weight: 700;
    padding: .5rem 1.25rem 0;
    max-width: 600px;
    margin: 0 auto;
}

/* ── Map Modal ── */
.map-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1000;
    background: var(--bg);
    flex-direction: column;
    overflow: hidden;
}
.map-overlay.open {
    display: flex;
}

/* Map Header */
.map-header {
    display: flex;
    align-items: center;
    gap: .75rem;
    background: var(--as-braun-dark);
    color: #fff;
    padding: .75rem 1rem;
    flex-shrink: 0;
}
.map-back {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
    padding: .2rem;
    line-height: 1;
}
.map-header-info { flex: 1; min-width: 0; }
.map-header-firma {
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.map-header-stand {
    font-size: .8rem;
    color: var(--as-pfirsich);
}

/* Map Body */
.map-body {
    flex: 1;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
}
.map-image-wrap {
    position: relative;
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: auto;
    background: #f5f0eb;
    touch-action: manipulation;
    padding: 2.5rem 0;
}
.map-image-wrap img {
    display: block;
    width: 100%;
    height: auto;
    user-select: none;
    -webkit-user-drag: none;
}

/* ══ Unified Map Pin ══
   Teardrop-Pin mit Label-Badge
   Skaliert responsive über --marker-scale (JS-berechnet) */
.map-pin-container {
    --marker-scale: 1;
    position: relative;
    width: 100%;
}

.map-marker {
    position: absolute;
    z-index: 10;
    pointer-events: none;
    /* Pin-Spitze = Marker-Position (translate: -50% X, -100% Y) */
    transform: translate(-50%, -100%) scale(var(--marker-scale, 1));
    transform-origin: center bottom;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,.5));
}

/* Pin-Icon (SVG Teardrop) */
.map-marker-pin {
    width: 40px;
    height: 56px;
    position: relative;
}
.map-marker-pin svg {
    width: 100%;
    height: 100%;
    display: block;
}
.map-marker-pin .pin-body {
    fill: var(--as-rot, #CF3628);
    fill-opacity: .88;
}
.map-marker-pin .pin-inner {
    fill: #fff;
    fill-opacity: .35;
}
/* Pulse-Ring um die Pin-Spitze */
.map-marker-pulse {
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(207,54,40, .35);
    animation: pin-pulse 2s ease-out infinite;
}

/* Label-Badge */
.map-marker-label {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 4px);
    transform: translateX(-50%);
    background: rgba(207,54,40, .82);
    color: #fff;
    padding: .35rem .75rem;
    border-radius: 6px;
    font-size: .8rem;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: .02em;
    line-height: 1.3;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.map-marker-label::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(207,54,40, .82);
}

/* Label unten (bei Markern am oberen Bildrand) */
.map-marker.label-below .map-marker-label {
    bottom: auto;
    top: calc(100% + 4px);
}
.map-marker.label-below .map-marker-label::after {
    top: auto;
    bottom: 100%;
    border-top-color: transparent;
    border-bottom-color: rgba(207,54,40, .82);
}

@keyframes pin-pulse {
    0%   { transform: translateX(-50%) scale(1);   opacity: .6; }
    70%  { transform: translateX(-50%) scale(3.5); opacity: 0; }
    100% { transform: translateX(-50%) scale(3.5); opacity: 0; }
}

/* Map Footer (Aussteller-Info) */
.map-footer {
    flex-shrink: 0;
    background: var(--card);
    border-top: 2px solid var(--border);
    padding: 1rem 1.25rem;
}
.map-footer-desc {
    font-size: .85rem;
    color: var(--text);
    line-height: 1.5;
    margin-bottom: .5rem;
}
.map-footer-desc:empty { display: none; }
.map-footer-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
    margin-bottom: .6rem;
}
.map-footer-tags:empty { display: none; }
.map-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.map-footer-link {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .85rem;
    color: var(--as-rot);
    font-weight: 700;
    text-decoration: none;
}
.map-footer-link:hover { text-decoration: underline; }

/* ── Firmensteckbrief im Overlay ── */
.map-profile {
    flex-shrink: 0;
    background: var(--card);
    border-top: 2px solid var(--border);
    padding: 1.25rem;
    max-height: 55vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.map-profile-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: .75rem;
}
.map-profile-logo {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border-radius: 12px;
    object-fit: contain;
    background: #f5f0eb;
    border: 1px solid var(--border);
}
.map-profile-letter {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border-radius: 12px;
    background: var(--as-braun-dark);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1;
}
.map-profile-title {
    flex: 1;
    min-width: 0;
}
.map-profile-title h2 {
    font-size: 1.15rem;
    line-height: 1.3;
    color: var(--as-braun-dark);
    margin: 0 0 .2rem;
}
.map-profile-stand {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    padding: .15rem .5rem;
    border-radius: 4px;
    background: var(--as-braun-dark);
    color: #fff;
}
.map-profile-desc {
    font-size: .88rem;
    color: var(--text);
    line-height: 1.6;
    margin-bottom: .75rem;
}
.map-profile-desc:empty { display: none; }
.map-profile-links {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: .75rem;
}
.map-profile-links:empty { display: none; }
.map-profile-link {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .85rem;
    color: var(--as-rot);
    font-weight: 700;
    text-decoration: none;
}
.map-profile-link:hover { text-decoration: underline; }
.map-profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
    margin-bottom: .75rem;
}
.map-profile-tags:empty { display: none; }

/* Workshop-Verknüpfungen */
.map-profile-workshops {
    margin-top: .5rem;
    padding-top: .75rem;
    border-top: 1px solid var(--border);
}
.map-profile-workshops:empty { display: none; }
.map-profile-workshops-title {
    font-size: .78rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: .4rem;
}
.map-profile-ws {
    display: flex;
    align-items: baseline;
    gap: .4rem;
    padding: .4rem 0;
    font-size: .88rem;
    color: var(--as-braun-dark);
    text-decoration: none;
    transition: color .15s;
}
.map-profile-ws:hover { color: var(--as-rot); }
.map-profile-ws span { color: var(--text-light); font-size: .75rem; }

/* Share + Actions Zeile */
.map-profile-actions {
    display: flex;
    gap: .5rem;
    margin-top: .75rem;
    padding-top: .75rem;
    border-top: 1px solid var(--border);
}
.map-profile-share {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: none;
    border: 2px solid var(--as-beige);
    color: var(--text-light);
    padding: .45rem .9rem;
    border-radius: 8px;
    font-size: .8rem;
    cursor: pointer;
    font-family: inherit;
    transition: border-color .15s, color .15s;
}
.map-profile-share:hover { border-color: var(--as-rot); color: var(--as-rot); }
.map-profile-share svg { flex-shrink: 0; }

/* Zoom hint */
.zoom-hint {
    text-align: center;
    padding: .35rem;
    font-size: .7rem;
    color: var(--text-light);
    background: var(--bg);
}

/* ── Empty state ── */
.aussteller-list .empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
    font-size: .95rem;
    line-height: 1.6;
}
