/**
 * Side Buttons - Frontend Styles
 * Desktop: Vertikale Buttons rechts mit Hover-Label
 * Mobile (<767px): Horizontale Leiste unten ohne Labels
 */

/* CSS Variablen */
:root {
    --sb-transition: all 0.3s ease;
}

/* ============================================
   DESKTOP VERSION (>767px) - Vertikale Buttons rechts
   ============================================ */

@media (min-width: 768px) {
    .side-buttons-container {
        position: fixed;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        z-index: 9999;
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .side-button {
        display: flex;
        align-items: center;
        justify-content: center;
        /* Farben werden via inline-styles gesetzt */
        text-decoration: none;
        padding: 0;
        width: var(--sb-button-size, 60px);
        height: var(--sb-button-size, 60px);
        min-width: var(--sb-button-size, 60px);
        overflow: visible; /* Wichtig für Icon-Sichtbarkeit */
        transition: var(--sb-transition);
        border: none;
        border-radius: 0;
        cursor: pointer;
        white-space: nowrap;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        position: relative;
    }

    /* Hover-Effekt: ALLE Buttons erweitern sich wenn Container gehovert wird */
    .side-buttons-container:hover .side-button {
        width: 350px;
        justify-content: flex-start;
        overflow: hidden;
    }

    /* Icon Container - im normalen Zustand zentriert */
    .side-button-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: var(--sb-button-size, 60px); /* Volle Button-Breite für Zentrierung */
        height: 30px;
        flex-shrink: 0;
        transition: all 0.3s ease;
        position: absolute;
        left: 0;
    }

    /* Beim Hover: Icon nach links und feste Breite */
    .side-buttons-container:hover .side-button-icon {
        width: 30px;
        position: relative;
        margin-left: 15px;
        margin-right: 15px;
    }

    .side-button-icon svg,
    .side-button-icon img {
        width: 24px;
        height: 24px;
        color: inherit;
    }

    /* Label - fährt beim Hover raus */
    .side-button-label {
        font-size: 16px;
        font-weight: 400;
        text-transform: none;
        letter-spacing: 0.3px;
        opacity: 0;
        transform: translateX(-20px);
        transition: var(--sb-transition);
        white-space: nowrap;
    }

    /* ALLE Labels werden sichtbar wenn Container gehovert wird */
    .side-buttons-container:hover .side-button-label {
        opacity: 1;
        transform: translateX(0);
    }

    /* Optionale abgerundete Ecken (nur wenn aktiviert) */
    .side-buttons-container.rounded-corners .side-button:first-child {
        border-top-left-radius: 8px;
    }
    
    .side-buttons-container.rounded-corners .side-button:last-child {
        border-bottom-left-radius: 8px;
    }
}

/* ============================================
   MOBILE VERSION (<768px) - Horizontale Leiste unten
   ============================================ */

@media (max-width: 767px) {
    .side-buttons-container {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 9999;
        display: flex;
        flex-direction: row;
        gap: 0;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
    }

    .side-button {
        display: flex;
        align-items: center;
        justify-content: center;
        /* Farben werden via inline-styles gesetzt */
        text-decoration: none;
        padding: 0;
        flex: 1; /* Gleich breite Buttons */
        height: var(--sb-button-size, 60px);
        transition: var(--sb-transition);
        border: none;
        cursor: pointer;
    }

    /* Active/Touch Effekt für Mobile */
    .side-button:active {
        /* Farbe wird via JavaScript gesetzt */
        transform: scale(0.95);
    }

    /* Icon Container für Mobile */
    .side-button-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        margin-right: 0;
    }

    .side-button-icon svg,
    .side-button-icon img {
        width: 24px;
        height: 24px;
        color: inherit;
    }

    /* Label verstecken auf Mobile */
    .side-button-label {
        display: none;
    }

    /* Weiße Trennlinien zwischen Buttons */
    .side-button:not(:last-child) {
        border-right: 1px solid rgba(255, 255, 255, 0.3);
    }
}

/* ============================================
   ALLGEMEINE STYLES
   ============================================ */

/* Hover-Effekt für Desktop-Screens */
@media (min-width: 768px) {
    .side-buttons-container:hover .side-button {
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.2);
    }
    
    .side-button:hover {
        box-shadow: -6px 0 25px rgba(0, 0, 0, 0.3);
    }
}

/* Accessibility: Focus State */
.side-button:focus {
    outline: none; /* Kein grüner Rand beim Klick */
}

/* Smooth Scrolling wenn Anchor-Links verwendet werden */
html {
    scroll-behavior: smooth;
}

/* Print: Buttons ausblenden */
@media print {
    .side-buttons-container {
        display: none !important;
    }
}

/* Reduzierte Bewegung für Accessibility */
@media (prefers-reduced-motion: reduce) {
    .side-button,
    .side-button-label {
        transition: none !important;
    }
}

