/* tt_explosionszeichnung - Frontend-Darstellung der Explosionszeichnung */

.ttexpl-wrap {
    position: relative;
    display: inline-block;
    max-width: 100%;
    margin: 0 auto 1.5rem;
}

.ttexpl-wrap img.ttexpl-base {
    display: block;
    width: 100%;
    height: auto;
}

/* Das SVG liegt deckungsgleich über dem Bild und skaliert mit (viewBox). */
.ttexpl-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* nur die Polygone fangen Klicks */
}

.ttexpl-overlay polygon {
    fill: rgba(229, 9, 20, 0.07);
    stroke: rgba(229, 9, 20, 0.45);
    stroke-width: 1.5;
    cursor: pointer;
    pointer-events: auto;
    transition: fill 0.12s ease, stroke 0.12s ease;
}

/* Hover: durchsichtig rot */
.ttexpl-overlay polygon:hover {
    fill: rgba(229, 9, 20, 0.35);
    stroke: rgba(160, 0, 0, 0.7);
}

/* Aktiv (angeklickt) bleibt eingefaerbt */
.ttexpl-overlay polygon.ttexpl-active {
    fill: rgba(229, 9, 20, 0.45);
    stroke: rgba(160, 0, 0, 0.85);
    stroke-width: 2;
}

/* Element ohne in der Kategorie vorhandene Artikel: nicht anklickbar */
.ttexpl-overlay polygon.ttexpl-disabled {
    fill: rgba(120, 120, 120, 0.05);
    stroke: rgba(120, 120, 120, 0.25);
    pointer-events: none;
    cursor: default;
}

/* Tooltip mit Bezeichnung */
.ttexpl-tooltip {
    position: absolute;
    z-index: 20;
    background: #1f2733;
    color: #fff;
    font-size: 12px;
    padding: 3px 7px;
    border-radius: 4px;
    pointer-events: none;
    white-space: nowrap;
    transform: translate(-50%, -130%);
    opacity: 0;
    transition: opacity 0.1s;
}
.ttexpl-tooltip.show { opacity: 1; }

/* Reset-Hinweis bei aktivem Filter */
.ttexpl-filterbar {
    margin: 0 0 1rem;
    font-size: 14px;
    display: none;
}
.ttexpl-filterbar.show { display: block; }
.ttexpl-filterbar button {
    margin-left: 8px;
    cursor: pointer;
}

/* ---------- Zoom / Lupe ---------- */
.ttexpl-zoombtn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 25;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    color: #1f2733;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.ttexpl-zoombtn:hover { background: #fff; }
.ttexpl-zoombtn.is-active { background: #1f2733; color: #fff; border-color: #1f2733; }

/* Lupe (folgt dem Cursor) */
.ttexpl-wrap.ttexpl-lensing { cursor: crosshair; }
.ttexpl-lens {
    position: absolute;
    width: 180px;
    height: 180px;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25), 0 6px 18px rgba(0, 0, 0, 0.35);
    background-repeat: no-repeat;
    background-color: #fff;
    pointer-events: none; /* Klicks gehen an die Polygone darunter */
    z-index: 24;
}

/* Lightbox (Klick-Zoom in groesserer Ansicht) */
.ttexpl-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.ttexpl-lb-inner {
    max-width: 94vw;
    max-height: 92vh;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}
.ttexpl-lb-img {
    display: block;
    max-width: 94vw;
    max-height: 92vh;
    object-fit: contain;
    cursor: zoom-in;
    transition: max-width 0.15s ease, max-height 0.15s ease;
}
.ttexpl-lb-img.is-zoomed {
    max-width: none;
    max-height: none;
    cursor: zoom-out;
}
.ttexpl-lb-close {
    position: fixed;
    top: 16px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #1f2733;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}
.ttexpl-lb-close:hover { background: #fff; }
