/**
 * LHHH Sprach-Umschalter - Frontend Styles
 * Version: 4.1.0
 */

.lhhh-sprach-switcher-container {
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.lhhh-sprach-switcher-container[data-position="top-right"] {
    position: fixed;
    top: 0;
    right: 0;
    padding: 15px;
}

.lhhh-sprach-switcher-container[data-position="top-left"] {
    position: fixed;
    top: 0;
    left: 0;
    padding: 15px;
}

.lhhh-sprach-switcher-container[data-position="top-center"] {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px;
}

.lhhh-sprach-switcher-container[data-position="inline"] {
    position: relative;
    display: inline-block;
}

.lhhh-sprach-switcher {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.lhhh-sprach-label {
    font-size: 15px;
    font-weight: 500;
    color: #666;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 4px;
    transition: all 0.2s;
    cursor: pointer;
    white-space: nowrap;
}

.lhhh-sprach-label:hover {
    color: #333;
    background: rgba(0,0,0,0.05);
    text-decoration: none;
}

.lhhh-sprach-label.active {
    color: #8B1874;
    font-weight: 600;
    cursor: default;
}

.lhhh-sprach-label.active:hover {
    background: transparent;
}

.lhhh-sprach-label.lhhh-leicht {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Offizielles Leichte-Sprache-Symbol */
.lhhh-ls-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.lhhh-ls-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* Toggle mit weniger Rundung */
.lhhh-sprach-toggle {
    position: relative;
    width: 52px;
    height: 28px;
    background: #ccc;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    padding: 0;
}

.lhhh-sprach-toggle:hover {
    background: #b3b3b3;
}

.lhhh-sprach-toggle:focus {
    outline: 2px solid #8B1874;
    outline-offset: 2px;
}

.lhhh-sprach-toggle[aria-checked="true"] {
    background: #8B1874;
}

.lhhh-toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 4px;
    transition: transform 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.lhhh-sprach-toggle[aria-checked="true"] .lhhh-toggle-slider {
    transform: translateX(24px);
}

/* Fehlermeldung */
.lhhh-no-translation-message {
    position: fixed;
    background: #d32f2f;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(211,47,47,0.3);
    z-index: 99998;
    max-width: 350px;
    text-align: center;
    animation: lhhh-shake 0.5s;
}

/* Info-Meldung (Seite nur in schwerer Sprache) */
.lhhh-fallback-message {
    position: fixed;
    background: #ff9800;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(255,152,0,0.3);
    z-index: 99998;
    max-width: 400px;
    text-align: center;
}

@keyframes lhhh-shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* Responsive */
@media (max-width: 768px) {
    .lhhh-sprach-switcher-container { padding: 10px; }
    .lhhh-sprach-switcher { padding: 10px 15px; gap: 8px; }
    .lhhh-sprach-label { font-size: 14px; }
    .lhhh-sprach-toggle { width: 46px; height: 26px; }
    .lhhh-toggle-slider { width: 20px; height: 20px; }
    .lhhh-sprach-toggle[aria-checked="true"] .lhhh-toggle-slider { transform: translateX(20px); }
    .lhhh-ls-icon { width: 20px; height: 20px; }
}

/* Screenreader */
.lhhh-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* Print */
@media print {
    .lhhh-sprach-switcher-container { display: none !important; }
}
