/* Mirror Planetarium v1.2 */

/* ── Basis ────────────────────────────────────────────────────── */
.mp-wrap {
    position: relative;
    width: 100%;
    height: 600px;
    min-height: 200px;
    overflow: hidden;
    background-color: #05050f;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
}

/* ── Sticky: position:sticky direkt per CSS-Klasse ────────────── */
.mp-wrap.mp-sticky-active {
    position: sticky !important;
    z-index: 100;
    /* top wird per JS inline gesetzt */
}

/* ── Fixed: Klon-Technik, kein Sprung ────────────────────────── */
.mp-fixed-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    z-index: 1000;
    overflow: hidden;
    /* height + background werden per JS gesetzt */
}
/* Platzhalter hält Dokumenthöhe */
.mp-pin-placeholder {
    display: block;
    visibility: hidden;
    pointer-events: none;
}

/* ── Canvas ──────────────────────────────────────────────────── */
.mp-wrap .mp-canvas {
    display: block;
    position: absolute;
    top: 0; left: 0;
    width: 100% !important;
    height: 100% !important;
    cursor: crosshair;
}
/* Im Fixed-Overlay braucht der Canvas ebenfalls absolute Füllung */
.mp-fixed-overlay .mp-canvas {
    display: block;
    position: absolute;
    top: 0; left: 0;
    width: 100% !important;
    height: 100% !important;
}

/* ── Hover-Label ─────────────────────────────────────────────── */
.mp-wrap .mp-hover-label,
.mp-fixed-overlay .mp-hover-label {
    position: absolute;
    z-index: 30;
    padding: 5px 14px;
    background: rgba(10,20,60,0.88);
    backdrop-filter: blur(10px);
    color: #aaddff;
    border: 1px solid rgba(80,160,255,0.4);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    font-family: sans-serif;
    letter-spacing: 0.4px;
    pointer-events: none;
    white-space: nowrap;
    transform: translate(-50%, -140%);
    transition: opacity 0.15s;
}

/* ── Unpin-Button ─────────────────────────────────────────────── */
.mp-wrap .mp-unpin-btn,
.mp-fixed-overlay .mp-unpin-btn {
    position: absolute;
    z-index: 20;
    padding: 10px 22px;
    background: rgba(15,20,60,.82);
    backdrop-filter: blur(14px);
    color: #b0c8ff;
    border: 1px solid rgba(100,140,255,.45);
    border-radius: 50px;
    font-size: 13px; font-weight: 600;
    cursor: pointer; white-space: nowrap;
    transition: filter .2s, transform .15s;
}
.mp-wrap .mp-unpin-btn:hover,
.mp-fixed-overlay .mp-unpin-btn:hover { filter: brightness(1.2); transform: scale(1.05); }

.mp-unpin--bottom-left   { bottom: 20px; left: 20px; }
.mp-unpin--bottom-right  { bottom: 20px; right: 20px; }
.mp-unpin--top-left      { top: 20px; left: 20px; }
.mp-unpin--top-right     { top: 20px; right: 20px; }
.mp-unpin--bottom-center { bottom: 20px; left: 50%; transform: translateX(-50%); }
.mp-unpin--bottom-center:hover { transform: translateX(-50%) scale(1.05); }

/* ── Pin-Close-Button ─────────────────────────────────────────── */
.mp-pin-close-btn {
    position: absolute;
    top: 18px; right: 18px;
    z-index: 200;
    padding: 8px 20px;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(12px);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 50px;
    font-size: 13px; font-weight: 600;
    cursor: pointer; white-space: nowrap;
    transition: filter .2s;
}
.mp-pin-close-btn:hover { filter: brightness(1.3); }

/* ── Gyro-Button ──────────────────────────────────────────────── */
.mp-wrap .mp-gyro-btn,
.mp-fixed-overlay .mp-gyro-btn {
    position: absolute;
    bottom: 64px; left: 50%; transform: translateX(-50%);
    z-index: 20;
    padding: 12px 28px;
    background: rgba(0,60,140,.85);
    backdrop-filter: blur(10px);
    color: #ddeeff;
    border: 1px solid rgba(80,160,255,.5);
    border-radius: 50px;
    font-size: 14px; font-weight: 600;
    cursor: pointer; white-space: nowrap;
    transition: filter .2s;
}
.mp-wrap .mp-gyro-btn:hover,
.mp-fixed-overlay .mp-gyro-btn:hover { filter: brightness(1.2); }

/* ── Audio-Button ─────────────────────────────────────────────── */
.mp-audio-btn {
    position: absolute;
    z-index: 20;
    padding: 7px 15px;
    background: rgba(60,0,100,.75);
    backdrop-filter: blur(8px);
    color: #d8a8ff;
    border: 1px solid rgba(160,80,255,.45);
    border-radius: 50px;
    font-size: 12px; font-weight: 600;
    cursor: pointer;
    transition: filter .2s;
}
.mp-audio-btn:hover { filter: brightness(1.2); }
.mp-audio--top-right    { top: 16px; right: 16px; }
.mp-audio--top-left     { top: 16px; left: 16px; }
.mp-audio--bottom-right { bottom: 20px; right: 16px; }
.mp-audio--bottom-left  { bottom: 20px; left: 16px; }

/* ── Action-Hint ──────────────────────────────────────────────── */
.mp-action-hint {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 25;
    padding: 12px 28px;
    background: rgba(5,10,40,0.92);
    backdrop-filter: blur(16px);
    color: #88ddff;
    border: 1px solid rgba(80,180,255,0.5);
    border-radius: 50px;
    font-size: 14px; font-weight: 700;
    font-family: sans-serif;
    pointer-events: none; white-space: nowrap;
}

/* ── Lightbox ─────────────────────────────────────────────────── */
.mp-lightbox {
    position: absolute; inset: 0; z-index: 50;
    background: rgba(0,0,12,.93);
    display: none;
    align-items: center; justify-content: center; flex-direction: column; gap: 14px;
}
.mp-lb-img {
    max-width: 88%; max-height: 80%;
    object-fit: contain; border-radius: 12px;
    box-shadow: 0 0 50px rgba(70,120,255,.35);
    display: block; cursor: pointer;
}
.mp-lb-close {
    position: absolute; top: 16px; right: 20px;
    background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25);
    color: #fff; font-size: 20px; line-height: 1;
    padding: 6px 10px; border-radius: 50%;
    cursor: pointer; z-index: 51; transition: filter .2s;
}
.mp-lb-close:hover { filter: brightness(1.3); }
.mp-lb-hint { color: rgba(255,255,255,.3); font-size: 12px; font-family: sans-serif; cursor: pointer; margin: 0; }

/* ── SEO ──────────────────────────────────────────────────────── */
.mp-seo {
    position: absolute; width: 1px; height: 1px;
    overflow: hidden; clip: rect(0,0,0,0);
    white-space: nowrap; list-style: none; padding: 0; margin: 0; border: 0;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 1023px) { .mp-wrap { height: 480px; } }
@media (max-width: 767px)  { .mp-wrap { height: 380px; } }

/* ── Editor ───────────────────────────────────────────────────── */
.elementor-editor-active .mp-wrap[data-images="[]"]::before {
    content: "🪩 Mirror Planetarium: Keine Bilder ausgewählt";
    position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
    color: rgba(255,200,100,.85); font-family: sans-serif; font-size: 13px;
    z-index: 5; background: rgba(0,0,0,.6); padding: 10px 22px; border-radius: 8px;
    white-space: nowrap; pointer-events: none;
}
