/* Kapselung: Verhindert, dass globale Stile ins Widget bluten */
.mm-widget-container * {
    box-sizing: border-box;
    font-family: 'Geist', sans-serif;
    margin: 0;
    padding: 0;
}

body.mm-no-scroll {
    overflow: hidden !important;
}

/* FLOATING ACTION BUTTON (FAB) - Unten rechts fixiert */
.mm-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 65px;
    height: 65px;
    background-color: #1E4349; /* Teal */
    border: 2px solid #d6e0e2;
    border-radius: 50%;
    font-size: 1.6rem;
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(30, 67, 73, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s;
}

.mm-fab:hover {
    transform: scale(1.08);
    background-color: #132d31;
    border-color: #F9A077; /* Apricot Akzent beim Hover */
}

/* OVERLAY PANEL (Mit modernem Glasmorphismus-Effekt) */
.mm-overlay {
    position: fixed;
    top: 20px;
    right: 0;
    bottom: 0;
    width: 600px;
    max-width: 100vw;

    background-color: rgba(250, 248, 242, 0.95); /* Weiches Transparent-Beige */
    backdrop-filter: blur(15px);
    border-top-left-radius: 24px;
    border-left: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: -15px 0 35px rgba(30, 67, 73, 0.08);
    z-index: 100000;

    transform: translate(100%, 100%) scale(0.9);
    opacity: 0;
    pointer-events: none;

    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.3s ease;

    padding: 40px 24px 24px 24px;
    display: flex;
    flex-direction: column;
}

.mm-overlay.mm-open {
    transform: translate(0, 0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

/* SCHLIESSEN BUTTON */
.mm-close-btn {
    position: absolute;
    top: 20px;
    left: 24px;
    background: none;
    border: none;
    font-size: 2.2rem;
    line-height: 1;
    color: #5a7b80;
    cursor: pointer;
    z-index: 100001;
    transition: color 0.2s, transform 0.2s;
}

.mm-close-btn:hover {
    color: #e63946; /* Akademie Rot */
    transform: scale(1.1);
}

/* BILDER-CONTAINER */
.mm-overlay-content {
    margin-top: 45px;
    overflow-y: auto;
    flex-grow: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 0 10px 20px 10px;
}

.mm-overlay-content::-webkit-scrollbar {
    width: 6px;
}
.mm-overlay-content::-webkit-scrollbar-thumb {
    background-color: #d6e0e2;
    border-radius: 3px;
}

/* RESPONSIVE BILDER STYLING */
.mm-responsive-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(30, 67, 73, 0.05);
}

/* ── wenn der Inhalt ein Stichpunktzettel-Iframe ist ── */
.mm-overlay-content.has-frame {
    padding: 0;
    gap: 0;
    overflow: hidden;
    /* Overlay-Padding (24px links/rechts/unten) rausrechnen → Iframe läuft bis zum Rand */
    margin-left: -24px;
    margin-right: -24px;
    margin-bottom: -24px;
}

/* STICHPUNKTZETTEL IFRAME */
.spicker-frame {
    flex: 1;
    width: 100%;
    min-height: 0;
    border: none;
    display: block;
    background: transparent;
}

/* ── MULTI-FRAME MODUS (dTest Spicker) ─────────────────────────────────────── */
.mm-overlay-content.multi-frame {
    display: block;
    overflow-y: auto;
    padding: 0;
    margin-left: -24px;
    margin-right: -24px;
    margin-bottom: -24px;
    gap: 0;
}

.spicker-frame-auto {
    width: 100%;
    border: none;
    display: block;
    min-height: 400px;
    background: transparent;
}

.spicker-frame-separator {
    height: 2px;
    background: #d6e0e2;
    width: 100%;
    flex-shrink: 0;
}

/* Hinweistext wenn kein Spicker geladen */
.spicker-empty-hint {
    padding: 32px 24px;
    color: #5a7b80;
    font-size: 0.9rem;
    text-align: center;
    line-height: 1.6;
}

/* TOPIC TABS (eTest) */
.spicker-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 10px 12px 8px;
    border-bottom: 1px solid #d6e0e2;
    flex-shrink: 0;
    background: rgba(250, 248, 242, 0.98);
}

.spicker-tab {
    padding: 5px 11px;
    border-radius: 20px;
    border: 1.5px solid #d6e0e2;
    background: transparent;
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 600;
    color: #5a7b80;
    font-family: 'Geist', sans-serif;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
}

.spicker-tab:hover {
    background: rgba(30, 67, 73, 0.06);
    border-color: #1E4349;
    color: #1E4349;
}

.spicker-tab.active {
    background: #1E4349;
    color: #fff;
    border-color: #1E4349;
}

