﻿/* Wellbeing Sidebar */
.wellbeing-sidebar {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%) translateX(100%);
    width: 360px;
    z-index: 1050;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.wellbeing-sidebar:not(.collapsed) {
    transform: translateY(-50%) translateX(0);
}

.wellbeing-tab {
    position: absolute;
    left: -48px;
    top: 50%;
    transform: translateY(-50%);
    width: 51px;
    height: auto;

    /* statt Farbfläche -> Gradient immer setzen */
    background: linear-gradient(
        135deg,
        var(--color-bg-accent1-grad) 0%,
        var(--color-bg-accent1-hover) 100%
    );

    border: none;
    border-radius: 12px 0 0 12px;
    color: white;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: -2px 2px 8px rgba(0,0,0,0.15);

    /* nicht "all" */
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.2s ease;

    padding: 0.5rem;
    z-index: -1;
}

.wellbeing-tab:hover {
    /* background nicht mehr ändern -> kein Flash */
    transform: translateY(-50%) translateX(-3px);
    box-shadow: -3px 3px 12px rgba(0,0,0,0.2);
    filter: brightness(1.06);
}

.wellbeing-tab i {
    font-size: 1.5rem;
}

.wellbeing-tab-text {
    font-size: 0.7rem;
    font-weight: 600;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    letter-spacing: 0.05em;
}

.wellbeing-sidebar-inner {
    background: var(--color-surface, #fff);
    border-right: none;
    border-radius: 12px 0 0 12px;
    box-shadow: -2px 0 12px rgba(0,0,0,0.1);
    max-height: calc(100vh - 100px);
    display: flex;
    flex-direction: column;
}

.wellbeing-sidebar-header {
    background: linear-gradient(135deg, var(--color-bg-accent1-grad) 0%, var(--color-bg-accent1-hover) 100%);
    color: var(--color-text-light);
    padding: 0.75rem 1rem;
    border-radius: 12px 0 0 0;
    text-align: center;
    flex-shrink: 0;
}

.wellbeing-sidebar-header h6 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
}

.wellbeing-sidebar-content {
    padding: 1rem;
    overflow-y: auto;
    flex: 1;
}

.wellbeing-section {
    margin-bottom: 1rem;
}

.wellbeing-section-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #495057;
}

.wellbeing-options {
    display: flex;
    gap: 0.35rem;
}

.wellbeing-option {
    flex: 1;
    display: flex;
    flex-direction: column; /* Stack emoji + label vertikal */
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.2rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 70px; /* Etwas höher für Text */
    min-width: 60px;
}

.wellbeing-emoji {
    font-size: 1.5rem;
    line-height: 1;
    margin-bottom: 0.25rem; /* Abstand zum Label */
}

.wellbeing-label {
    font-size: 0.54rem;
    color: #6c757d;
    text-align: center;
    line-height: 1.1;
    display: block;
    font-weight: 500;
}

.wellbeing-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    border-color: #6c757d;
}

.btn-check:checked + .wellbeing-option {
    background: linear-gradient(135deg, var(--color-bg-accent1) 0%, var(--color-bg-accent1-grad) 100%);
    border-color: #6c757d;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(34, 40, 49, 0.3);
}

/* Label wird weiß wenn ausgewählt */
.btn-check:checked + .wellbeing-option .wellbeing-label {
    color: white;
    font-weight: 600;
}

.wellbeing-divider {
    margin: 0.75rem 0;
    border-color: rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .wellbeing-sidebar {
        right: auto;
        left: 0;
        top: auto;
        bottom: 0;
        width: 100%;
        transform: translateY(100%);
    }
    .wellbeing-sidebar:not(.collapsed) {
        transform: translateY(0);
    }
    .wellbeing-tab {
        left: 50%;
        top: -48px;
        transform: translateX(-50%);
        width: auto;
        height: 51px;
        border-radius: 12px 12px 0 0;
        flex-direction: row;
        box-shadow: 0 -2px 8px rgba(0,0,0,0.15);
    }
    .wellbeing-tab:hover {
        transform: translateX(-50%) translateY(-3px);
    }
    .wellbeing-tab-text {
        writing-mode: horizontal-tb;
        text-orientation: initial;
    }
    .wellbeing-tab i {
        font-size: 1.2rem;
    }
    .wellbeing-sidebar-inner {
        border-radius: 12px 12px 0 0;
        border-bottom: none;
        box-shadow: 0 -2px 12px rgba(0,0,0,0.1);
        max-height: 70vh;
    }
    .wellbeing-sidebar-header {
        border-radius: 12px 12px 0 0;
    }
    .wellbeing-sidebar-content {
        max-height: calc(70vh - 48px);
    }
    .wellbeing-option {
        min-width: 56px;
        min-height: 75px;
    }
    .wellbeing-emoji {
        font-size: 1.6rem;
    }
    .wellbeing-label {
        font-size: 0.6rem;
    }
}

/* Mobile: Wellbeing-Tab ausblenden (kollidiert mit Mobile-Footer) */
@media (max-width: 950px) {
    .wellbeing-tab {
        display: none !important;
    }
}

.wellbeing-sidebar-content::-webkit-scrollbar {
    width: 6px;
}
.wellbeing-sidebar-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
.wellbeing-sidebar-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}
.wellbeing-sidebar-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}