﻿/* ========= Brand palette ========= */
:root {
    --brand-amber: #E9A21A;
    --brand-amber-dark: #C08200;
    --brand-amber-10: #FFF3D6;
    --brand-slate: #4D4F53;
    --brand-slate-70: #6E7177;
    --brand-slate-50: #9AA0A8;
    --card-shadow: 0 6px 16px rgba(0,0,0,.08);
    --card-shadow-hover: 0 10px 24px rgba(233,162,26,.18);
    --chip-h: 28px; /* einheitliche Höhe */
    --chip-pad-x: 10px; /* horizontales Padding */
    --chip-gap: 6px; /* Abstand zwischen Icon/Text */
    --chip-icon: 16px; /* SVG/Emoji-Größe */
    --chip-font: 12px; /* Textgröße in Chips */
    --headerbar-h: 44px; /* ggf. an deine headerbar-Höhe anpassen */
}

/* make the wrapper fill the viewport and center its child */
.login-center {
    min-height: 100vh; /* full viewport height */
    display: flex;
    align-items: center; /* vertical center */
    justify-content: center; /* horizontal center */
    padding: 24px; /* breathing room on small screens */
}

.login-wrap {
    width: 100%;
    max-width: 360px; /* control the panel width */
    padding: 12px;
    margin-bottom: 12px;
    background: #fff;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
}

/* optional polish */
.login-title {
    font-weight: 700;
    color: var(--brand-slate);
    margin-bottom: 8px;
}

.login-row {
    margin: 6px 0;
}

/* default fallback */
:root {
    --scrollbar-w: 0px;
}

/* Sticky, right-aligned, protected from scrollbar overlap */
.headerbar {
    position: sticky;
    top: 0;
    z-index: 9999;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    padding: 8px 12px; /* base padding */
    padding-right: calc(12px + var(--scrollbar-w)); /* extra space for scrollbar */

    background: linear-gradient(to bottom, rgba(255,255,255,0.96), rgba(255,255,255,0.86));
    border-bottom: 1px solid rgba(0,0,0,0.06);
    backdrop-filter: saturate(1.1) blur(2px);
}

    /* DevExpress panel content as a flex row */
    .headerbar .dxpnl-content {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 10px;
        width: 100%;
    }

    .headerbar .dxpnl-content {
        flex-wrap: wrap;
    }

.headerbar__name {
    max-width: 100%;
    white-space: normal;
}

/* headerbar: Innenlayout mit linker/rechter Seite */
.headerbar .headerbar__inner {
    display: flex;
    /*align-items: center;*/
    gap: 12px;
    flex-wrap: nowrap;
    flex-direction: column;
    width: 100%;
}

.headerbar_left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap; /* bricht bei schmalen Viewports */
    min-width: 0;
}

.headerbar_right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap; /* bricht bei schmalen Viewports */
    min-width: 0;
    padding-bottom: 3px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

/* Optional: die vorhandene Reihe kann so aussehen */
.filterbar__row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Responsive: auf sehr schmalen Screens rechts unten, aber visuell rechtsbündig */
@media (max-width: 720px) {
    .headerbar .headerbar__inner {
        flex-wrap: wrap;
    }

    .headerbar__right {
        margin-left: 0;
        width: 100%;
        justify-content: flex-end;
    }
}

/* ========= ASPxCardView shell cleanup (remove extra height/border) ========= */

/* Table mode cell */
.shift-cardview .dxgvCSD {
    padding: 8px !important;
    overflow: visible !important;
}

/* ===== Flow/Table wrappers — match plain and suffixed classes ===== */
.shift-cardview .dxcvFlowCard,
.shift-cardview [class^="dxcvFlowCard_"],
.shift-cardview .dxgvFlowCard,
.shift-cardview [class^="dxgvFlowCard_"],
.shift-cardview .dxcvCard,
.shift-cardview [class^="dxcvCard_"],
.shift-cardview .dxgvCard,
.shift-cardview [class^="dxgvCard_"],
.shift-cardview .dxgvCardError,
.shift-cardview [class^="dxgvCardError_"] {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    vertical-align: top !important;
    overflow: visible !important;
    margin: 12px 0 0 12px !important;
    width: calc(33.33% - 12px);
}

/* Inner content wrapper */
.shift-cardview .dxcvFlowCardContent,
.shift-cardview [class^="dxcvFlowCardContent_"],
.shift-cardview .dxcvCardContent,
.shift-cardview [class^="dxcvCardContent_"],
.shift-cardview .dxgvCardContent,
.shift-cardview [class^="dxgvCardContent_"] {
    padding: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
}

/* Flow card area */
.shift-cardview .dxcvCardArea,
.shift-cardview [class^="dxcvCardArea_"],
.shift-cardview .dxgvCardArea,
.shift-cardview [class^="dxgvCardArea_"] {
    padding: 0 !important;
    overflow: visible !important;
}

/* Our wrapper (set in code: card.Styles.Card.CssClass = "cv-shell") */
.shift-cardview .cv-shell {
    background: transparent !important;
    border: 0 !important;
    padding: 8px !important;
    height: auto !important;
    min-height: 0 !important;
    box-sizing: border-box;
    /*display: inline-block !important;*/ /* Flow layout */
    /*width: calc(20% - 16px);*/ /* exactly 5 columns */
    vertical-align: top !important;
    overflow: visible !important;
}


/* ========= Card look & feel ========= */
.shift-card {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 14px;
    padding: 16px 16px 14px 16px;
    border-top: 4px solid var(--brand-amber);
    box-shadow: var(--card-shadow);
    transition: box-shadow .15s ease;
    transform: none !important; /* avoid stacking-context issues */
}

    .shift-card:hover {
        transform: none !important;
        box-shadow: var(--card-shadow-hover);
    }

    /* ========= Burger (SVG) ========= */
    .shift-card .shift-card__burger {
        position: absolute;
        top: 8px;
        right: 10px;
        z-index: 2;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 24px;
        height: 20px;
        color: var(--brand-amber) !important;
        text-decoration: none !important;
        background: transparent !important;
        border: 0 !important;
    }

        .shift-card .shift-card__burger svg {
            display: block;
            width: 24px;
            height: 20px;
            fill: currentColor;
        }

        .shift-card .shift-card__burger:hover {
            color: var(--brand-amber-dark) !important;
        }

/* ========= Title / subtitle ========= */
.shift-card__name {
    color: var(--brand-slate);
    font-weight: 800;
    font-size: 20px;
    margin-right: 28px; /* space for burger */
    margin-top: -12px;
}

.shift-card__subtitle {
    color: var(--brand-slate-70);
    font-size: 15px;
    margin-top: 2px;
}

/* ========= Bottom row (icon left, times right) ========= */
.shift-card__bottom {
    margin-top: 12px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}

/* Basis-Component */
.chip {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    height: var(--chip-h);
    padding: 0 var(--chip-pad-x);
    border-radius: 999px;
    gap: var(--chip-gap);
    font-weight: 700;
    font-size: var(--chip-font);
    line-height: 1;
    white-space: nowrap;
    background: #f5f5f7; /* neutral fallback */
    color: var(--brand-slate);
}

/* Icon im Chip (externe SVG via <img> / ASPxImage) */
.mood__icon {
    width: 48px;
    height: 48px;
    display: inline-block;
    object-fit: contain; /* falls SVG viewBox anders ist */
}

.chip__icon {
    width: var(--chip-icon);
    height: var(--chip-icon);
    display: inline-block;
    object-fit: contain; /* falls SVG viewBox anders ist */
}

/* optionaler Text im Chip (z.B. bei Stimmung) */
.chip__text {
    display: inline-block;
}

.chip__text-kuerzel {
    display: inline-block;
}

/* Zustände/Farben – für alle Chip-Typen wiederverwendbar */
.chip--green {
    background: #e8f5e9;
    color: #2e7d32;
}

.chip--gray {
    background: #eef2f7;
    color: #6E7177;
}

.chip--amber {
    background: #fff7e6;
    color: #C08200;
}

.chip--red {
    background: #ffebee;
    color: #c62828;
}

.chip--hidden {
    display: none !important;
}

.chips-icons-only .chip .chip__text {
    display: none !important;
}

.chips-icons-only .chip {
    gap: 0;
    padding-left: 8px;
    padding-right: 8px;
}

.shift-card__icons {
    display: flex;
    flex-wrap: wrap; /* <<< erlaubt Umbruch in neue Zeilen */
    column-gap: 8px; /* horizontaler Abstand */
    row-gap: 6px; /* vertikaler Abstand zwischen den Zeilen */
    align-items: center;
    /* damit die Zeiten rechts Platz behalten: */
    flex: 1 1 auto;
    min-width: 0;
}

.shift-card__times {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px; /* <- tweak spacing here */
    line-height: 1.1;
    color: var(--brand-slate);
    font-weight: 700;
}

    /* you currently have a <br/> between the labels — hide it */
    .shift-card__times br {
        display: none;
    }

/* remove any default spacing */
.shift-card__time {
    margin: 0;
    padding: 0;
    font-size: 14px; /* optional: slightly smaller */
}

/* ========= Selection / focus states ========= */
.shift-cardview .dxgvSelectedCard .shift-card {
    outline: 2px solid var(--brand-amber);
    box-shadow: var(--card-shadow-hover);
}

.shift-card:focus-within {
    outline: 2px dashed var(--brand-amber-dark);
    outline-offset: 3px;
}

/* allow overflow everywhere (Flow/Table) */
.dxcvCardArea, .dxgvCardArea,
.dxcvFlowCard, .dxgvFlowCard,
.dxcvCard, .dxgvCard,
.cv-shell, .shift-card {
    overflow: visible !important;
}

/* prevent clipping in flow/table wrappers */
.dxcvCardArea, .dxgvCardArea,
.dxcvFlowCard, .dxgvFlowCard,
.dxcvCard, .dxgvCard,
.cv-shell, .shift-card {
    overflow: visible !important;
}

/* use the popup's box as the only card; make the inner menu transparent */
.cv-popup .dxpc-content,
.cv-popup .dxpc-contentWrapper {
    padding: 8px 10px !important; /* inner spacing */
    background: #fff !important; /* popup's own white background */
    border: 0 !important;
    box-shadow: none !important;
}

.cv-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .cv-menu a {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 10px 12px;
        border-radius: 999px; /* voll abgerundet */
        background: var(--brand-amber); /* orange */
        color: #fff !important;
        text-decoration: none !important;
        font-weight: 700;
        line-height: 1;
        box-shadow: 0 2px 6px rgba(0,0,0,.12);
        transition: transform .06s ease, box-shadow .12s ease, background .12s ease;
    }

        .cv-menu a:hover {
            background: var(--brand-amber-10);
        }

        .cv-menu a:hover {
            background: var(--brand-amber-dark);
            box-shadow: 0 4px 10px rgba(0,0,0,.16);
        }

        .cv-menu a:active {
            transform: translateY(1px);
        }

        .cv-menu a:focus {
            outline: 2px solid #fff3; /* dezenter Fokusring */
            outline-offset: 2px;
        }

        /* Varianten */
        .cv-menu a.btn--secondary {
            background: #eef2f7;
            color: var(--brand-slate) !important;
            height: 25px;
        }

        .cv-menu a.btn--danger {
            background: #d9534f;
        }

        .cv-menu a.btn--ghost {
            background: transparent;
            color: var(--brand-amber) !important;
            border: 2px solid var(--brand-amber);
        }

        /* Falls DevExpress Theme Pseudodekos an Links injiziert: killen */
        .cv-menu a::before,
        .cv-menu a::after {
            content: none !important;
            border: 0 !important;
        }

/* schöner Schatten (Theme-Schatten ggf. überschreiben) */
.dxpcLite .dxpc-mainDiv, .dxpcLite.dxpc-mainDiv, .dxdpLite .dxpc-mainDiv, .dxdpLite.dxpc-mainDiv {
    border-radius: 14px !important;
    /*box-shadow: 0 16px 40px rgba(0,0,0,.25) !important;*/
    border: .1px solid #8B8B8B;
}

.cv-popup .dxpc-content, .cv-popup .dxpc-contentWrapper {
    border-radius: 14px !important;
}

/* Mood-Dialog optisch etwas luftiger */
.mood-wrap {
    padding: 14px 16px;
}

.mood-title {
    font-size: 16px;
    margin-bottom: 6px;
}

.mood-child {
    margin: 6px 0 10px;
}

/* Range-Dialog (falls du eigene Klassen nutzen willst) */
.mrange-wrap {
    padding: 14px 16px;
}

.mrange-title {
    font-size: 16px;
    margin-bottom: 6px;
}

/* Buttons leicht veredeln */
.mood-btn {
    border-radius: 10px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
}

    .mood-btn.secondary {
        background: #f2f3f5;
        color: #30343a;
    }

/* Damit Modal-Overlay sicher oben liegt, aber unter dem Popup selbst */
.dxpc-overlay, .dxpcModalBack {
    z-index: 100000 !important; /* Hintergrund */
}

.cv-popup {
    z-index: 100001 !important; /* Popup-Box */
}

.mood-wrap {
    padding: 10px 12px;
}

.mood-title {
    font-weight: 700;
    color: var(--brand-slate);
    margin-bottom: 8px;
}

.mood-child {
    margin: 6px 0 8px;
    color: var(--brand-slate);
    font-weight: 600;
}

.mood-choices {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 8px 0 12px;
}

    .mood-choices a {
        font-size: 28px;
        margin-right: 12px;
        line-height: 1;
        text-decoration: none;
        filter: grayscale(0.4);
        transform: scale(1);
        transition: transform .12s ease, filter .12s ease;
    }

        .mood-choices a:hover {
            transform: scale(1.08);
            filter: grayscale(0);
        }

        .mood-choices a.active {
            filter: grayscale(0);
            outline: 2px solid var(--brand-amber);
            outline-offset: 4px;
            border-radius: 8px;
        }

.mood-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.mood-btn {
    background: var(--brand-amber);
    color: #fff;
    border: 0;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
}

    .mood-btn.secondary {
        background: #eee;
        color: #333;
    }

.iconmode-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.iconmode-label {
    font-size: 12px;
    color: var(--brand-slate-70);
}

/* visueller Switch */
.switch {
    position: relative;
    width: 44px;
    height: 24px;
    cursor: pointer;
    display: inline-block;
}

.switch__track {
    position: absolute;
    inset: 0;
    background: #dfe3ea;
    border-radius: 999px;
    transition: background .15s ease;
}

.switch__thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
    transition: left .15s ease;
}
/* eingeschaltet */
.switch.is-on .switch__track {
    background: var(--brand-amber);
}

.switch.is-on .switch__thumb {
    left: 23px;
}


/* host: zentriert unten, 50% Breite */
.toast-host {
    position: fixed;
    left: 50%;
    bottom: max(16px, env(safe-area-inset-bottom));
    transform: translateX(-50%);
    width: 50vw; /* 50% der Bildschirmbreite */
    max-width: 900px;
    min-width: 280px;
    z-index: 100200; /* über Overlay/Popups sichtbar */
    display: flex;
    flex-direction: column-reverse; /* neue Toasts unten anhängen, visuell ganz unten */
    gap: 8px;
    align-items: center;
    pointer-events: none; /* Klicks gehen durch – außer auf den Toasts selbst */
}

/* Toast-Karte */
.toast {
    width: 100%;
    color: #fff;
    background: #333;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    padding: 10px 12px;
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    animation: toast-in-bottom .25s ease-out;
}

.toast__title {
    font-weight: 700;
    margin: 0 0 2px;
}

.toast__msg {
    margin: 0;
}

.toast--success {
    background: #5cb85c;
}

.toast--error {
    background: #d9534f;
}

.toast--info {
    background: #5bc0de;
}

.toast__close {
    margin-left: auto;
    background: transparent;
    border: 0;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

/* Einblend-Animation von unten */
@keyframes toast-in-bottom {
    from {
        transform: translateY(6px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* kleine Screens: fast volle Breite */
@media (max-width: 640px) {
    .toast-host {
        width: 92vw;
    }
}

/* === Filterleiste (sticky, tablet-freundlich) === */
.filterbar {
    position: sticky;
    top: 0; /* sitzt unter evtl. eigener Topbar – ggf. anpassen */
    z-index: 9998;
    background: linear-gradient(to bottom, rgba(255,255,255,.96), rgba(255,255,255,.88));
    backdrop-filter: saturate(1.05) blur(2px);
    border-bottom: 1px solid rgba(0,0,0,.06);
    padding: 8px 12px;
}

.flt__count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid #e6e6ea;
    background: #fff;
    color: #4D4F53;
    font-weight: 700;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    transition: background .12s ease, color .12s ease, border-color .12s ease, box-shadow .12s ease;
}

/* Icon-Toggle */
.flt {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid #e6e6ea;
    background: #fff;
    color: #4D4F53;
    font-weight: 700;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    transition: background .12s ease, color .12s ease, border-color .12s ease, box-shadow .12s ease;
}

    .flt:hover {
        border-color: #ddd;
        box-shadow: 0 1px 6px rgba(0,0,0,.06);
    }

.flt--active {
    background: var(--brand-amber-10);
    color: var(--brand-amber-dark);
    border-color: #F4E0B1;
}

.flt__icon {
    width: 18px;
    height: 18px;
    display: inline-block;
    object-fit: contain;
}

/* === IconMode auch für die Filter-Toggles anwenden === */
.chips-icons-only .flt span { /* Text im Toggle ausblenden */
    display: none !important;
}

.chips-icons-only .flt { /* kompakter, wenn nur Icons */
    gap: 0;
    padding-left: 10px;
    padding-right: 10px;
}

    /* Icons minimal größer, wenn kein Text daneben ist (optional) */
    .chips-icons-only .flt .flt__icon {
        width: 20px;
        height: 20px;
    }
