/* style.css - Schoolbird v3.4 (TranslatePress Style Scroll) */

/* --- CONTAINER (Der Rahmen) --- */
.sb-floating {
    position: fixed;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    display: flex;
    flex-direction: column;
    pointer-events: none; /* Klicks durchlassen */
    max-height: 90vh;
}

/* POSITIONEN */
.sb-pos-bottom-right { bottom: 20px; right: 20px; align-items: flex-end; }
.sb-pos-bottom-left { bottom: 20px; left: 20px; align-items: flex-start; }
.sb-pos-top-right { top: 20px; right: 20px; align-items: flex-end; flex-direction: column-reverse; }
.sb-pos-top-left { top: 20px; left: 20px; align-items: flex-start; flex-direction: column-reverse; }

/* --- HAUPT-BUTTON --- */
.sb-btn {
    background: #213b87;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 15px;
    white-space: nowrap;
    line-height: 1;
    pointer-events: auto; /* Button muss klickbar sein */
    flex-shrink: 0;
    transition: transform 0.1s ease;
    margin: 5px 0; /* Abstand zum Menü */
}

.sb-btn:hover {
    background: #1b2f6b;
    transform: scale(1.02);
}

.sb-icon { width: 18px; height: 18px; stroke: #fff; display: block; }
.sb-flag-main { font-size: 1.2em; display: flex; align-items: center; }
.sb-text { position: relative; top: 1px; }

/* --- MENÜ (SCROLL-CONTAINER) --- */
.sb-menu {
    background: #fff;
    border-radius: 8px; /* Etwas eckiger wie TP */
    box-shadow: 0 10px 40px rgba(0,0,0,0.3); /* Starker Schatten */
    
    /* Standardmäßig unsichtbar */
    display: none;
    
    min-width: 220px;
    border: 1px solid #ccc;
    pointer-events: auto; /* Menü muss klickbar sein */
    
    /* === DIE SCROLL LOGIK (TranslatePress Style) === */
    display: none; /* Reset */
    max-height: 50vh !important; /* Exakt 50% der Bildschirmhöhe */
    overflow-y: scroll !important; /* Scrollen ERZWINGEN */
    overflow-x: hidden;
    
    /* Scroll-Verhalten glätten */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* Menü öffnen */
.sb-menu.open {
    display: block !important;
    animation: sb-fade 0.2s ease-out;
}

/* === SCROLLBALKEN DESIGN (DUNKEL) === */
/* Breite */
.sb-menu::-webkit-scrollbar {
    width: 12px; /* Breiter, damit man ihn trifft */
}
/* Hintergrundbahn */
.sb-menu::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 0 8px 8px 0;
    border-left: 1px solid #e0e0e0;
}
/* Der Schieberegler (Thumb) */
.sb-menu::-webkit-scrollbar-thumb {
    background: #888; /* Dunkles Grau wie im Screenshot */
    border-radius: 6px;
    border: 3px solid #f0f0f0; /* Weißer Rand für "Schwebe-Effekt" */
}
/* Hover Effekt */
.sb-menu::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Einzelne Spracheinträge */
.sb-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    color: #333;
    font-size: 14px;
    text-align: left;
    box-sizing: border-box;
    transition: background 0.1s;
}

.sb-item:hover { 
    background: #213b87; /* Hintergrund Blau bei Hover */
    color: #fff; /* Text Weiß bei Hover */
}

.sb-item:last-child { border-bottom: none; }
.sb-flag { font-size: 1.4em; margin-right: 12px; line-height: 1; flex-shrink: 0; }

@keyframes sb-fade {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- ADMIN DASHBOARD --- */
.sb-lang-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
    margin-bottom: 20px;
}
.sb-lang-card {
    display: flex; align-items: center; justify-content: center;
    padding: 20px; background: #fff; border: 1px solid #213b87;
    border-radius: 4px; text-decoration: none; font-weight: 600;
    color: #213b87; transition: all 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.sb-lang-card:hover { background: #213b87; color: #fff; transform: translateY(-2px); }