﻿
:root {
    /* Hauptfarben */
    --color-primary: #00979F;
    --color-primary-dark: #007a82;
    --color-primary-light: #35b6bd;
    --color-darkblue: #05345D;
    /* Sekundärfarben */
    --color-secondary: #00565a;
    --color-secondary-light: #e0f7f8;
    /* Statusfarben */
    --color-success: #24923c;
    --color-info: var(--color-primary-light);
    --color-warning: #ffc107;
    --color-danger: #dc3545;
    /* Schriftfarben */
    --text-default: #212529;
    --text-light: #ffffff;
    --text-muted: #6c757d;
    /* Hintergrundfarben */
    --bg-body: #f4f6f9;
    --bg-card: #ffffff;
    /* Buttons */
    --btn-primary-bg: var(--color-primary);
    --btn-primary-hover: var(--color-primary-dark);
    --btn-primary-text: var(--text-light);
}

/* Body & Allgemeines */
body {
    background-color: var(--bg-body);
    color: var(--text-default);
}

/* AdminLTE Navbar */
.navbar-white, .navbar-light {
    background-color: var(--color-primary) !important;
    color: var(--text-light) !important;
}

    .navbar-white a, .navbar-light a {
        color: var(--text-light) !important;
    }

/* AdminLTE Sidebar */
.main-sidebar {
    background-color: var(--color-primary) !important;
    color: var(--text-light);
}

.nav-sidebar .nav-link.active {
    background-color: var(--color-primary-dark) !important;
    color: var(--text-light) !important;
}

/* Buttons */
.btn-primary {
    background-color: var(--btn-primary-bg) !important;
    border-color: var(--btn-primary-bg) !important;
    color: var(--btn-primary-text) !important;
}

    .btn-primary:hover {
        background-color: var(--btn-primary-hover) !important;
        border-color: var(--btn-primary-hover) !important;
        color: var(--btn-primary-text) !important;
    }

.btn-outline-primary {
    color: var(--btn-primary-bg) !important;
    border-color: var(--btn-primary-bg) !important;
}

    .btn-outline-primary:hover {
        background-color: var(--btn-primary-hover) !important;
        color: var(--text-light) !important;
        border-color: var(--btn-primary-hover) !important;
    }

/* Karten */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--color-primary-light);
}

/* Links */
a {
    color: var(--color-primary);
}

    a:hover {
        color: var(--color-primary-dark);
        text-decoration: underline;
    }


/* Einheitliche Schriftfarbe in deinem Corporate Design */
body, .content-wrapper, .main-footer, .card-body, .login-card-body, .form-control, .form-label,
h1, h2, h3, h4, h5, h6, p, a, .nav-link, label, .text, .breadcrumb, .brand-text {
    color: #05345D !important;
}

    a.nav-link:hover, a.nav-link:focus {
        color: var(--color-primary) !important;
    }

    .form-control::placeholder {
        color: #6c757d !important;
    }

/* Sidebar Hover Effekt: kompletter Hintergrund in Dunkelblau, Text in Weiß */
.nav-sidebar .nav-link:hover {
    background-color: #05345D !important;
    color: #ffffff !important;
}

    .nav-sidebar .nav-link:hover p {
        color: #ffffff !important;
    }

    .nav-sidebar .nav-link:hover span {
        color: #ffffff !important;
    }

    .nav-sidebar .nav-link:hover i {
        color: #ffffff !important;
    }

.navbar .nav-link {
    color: #05345D !important;
}
/* ==========================================================================
   Logout-Link oben rechts – Hover-Stil
   ========================================================================== */
.navbar .nav-item .nav-link:hover {
    background-color: var(--color-primary-light);
    color: var(--text-light) !important;
    border-radius: 0.25rem;
    transition: background-color 0.2s ease-in-out;
}

.btn-neutral {
    background-color: var(--color-primary-light); /* z. B. #35b6bd */
    color: var(--text-dark); /* z. B. #05345D */
    border: none;
    transition: background-color 0.3s ease;
}

    .btn-neutral:hover {
        background-color: var(--color-primary-dark); /* z. B. #00979F */
        color: white;
    }

/* Dunkelblaue Card-Header für einheitliches Branding */
.card-header-dark {
    background-color: var(--color-darkblue) !important;
    color: var(--text-light) !important;
}

    .card-header-dark h1,
    .card-header-dark h2,
    .card-header-dark h3,
    .card-header-dark h4,
    .card-header-dark h5,
    .card-header-dark h6 {
        color: var(--text-light) !important;
    }

/*Für das Hover der Artikelbilder*/
.preview-container {
    position: relative;
    display: inline-block;
}

.preview-thumb {
    height: 60px;
    cursor: pointer;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.preview-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    padding: 5px;
    background-color: white;
    border: 1px solid #ccc;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    pointer-events: none;
}


    .preview-popup img {
        max-width: 200px;
        max-height: 200px;
        display: block;
    }


.preview-container:hover .preview-popup {
    display: block;
}

/* wwwroot/css/site.css oder ähnliche */
.draggable {
    cursor: grab;
}

/* 1 cm = 5 px  | 10 cm = 50 px */
#layoutCanvas {
    /* feines 1-cm-Raster */
    background-image: linear-gradient(to right, rgba(0,0,0,.12) 1px, transparent 1px), linear-gradient(to bottom, rgba(0,0,0,.12) 1px, transparent 1px),
    /* kräftiges 10-cm-Raster */
    linear-gradient(to right, rgba(0,0,0,.35) 1px, transparent 1px), linear-gradient(to bottom, rgba(0,0,0,.35) 1px, transparent 1px);
    /* Hintergrund-Kachelgrößen:   1-cm-Ebenen  |  10-cm-Ebenen */
    background-size: 5px 5px, 5px 5px, 50px 50px, 50px 50px;
    /* sonst schon vorhanden? – dann weglassen */
    background-color: #e9ecef; /* Ihr helles Grau */
    position: relative; /* für spätere absolute Objekte */
}
/*Für die Layout Tabellen */
/* ===== Tables: Search & Fav – Grundlayout ===== */
#searchResults, #favTable {
    table-layout: fixed;
}

    #searchResults th, #searchResults td,
    #favTable th, #favTable td {
        vertical-align: middle;
    }

    /* Spaltenbreiten via <colgroup> */
    #searchResults col.pic, #favTable col.pic {
        width: 56px;
    }

    #searchResults col.ean, #favTable col.ean {
        width: 160px;
    }

    #searchResults col.act, #favTable col.act {
        width: 46px;
        text-align: center;
    }

    /* Thumbnails */
    #searchResults td.col-pic img, #favTable td.col-pic img {
        width: 40px;
        height: auto;
    }

    /* Search: Einzeilig + Ellipsis */
    #searchResults td.col-ean, #searchResults td.col-bez {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    /* Fav: Bezeichnung darf umbrechen */
    #favTable td.col-bez {
        white-space: normal;
        word-break: break-word;
    }

    /* Search: Checkbox sauber zentrieren (Bootstrap override) */
    #searchResults td.col-act .form-check-input {
        position: static !important;
        float: none;
        display: block;
        margin: 0 auto;
    }
/* EINZIGE Quelle der Wahrheit fürs Panel */
/* EINZIGER Block fürs Panel */
/* EINZIGER Block fürs Panel */
#favPanel.floating-fav {
    position: fixed !important;
    left: 40px;
    top: 80px;
    z-index: 3000 !important;
    /* WICHTIG: keine clamp-Width, damit JS-Width 1:1 greift */
    width: 62vw;
    min-width: 700px;
    max-width: 1400px;
    display: flex;
    flex-direction: column;
    height: 72vh; /* Start */
    max-height: 85vh; /* Deckel */
    box-sizing: border-box;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,.25);
    overflow: hidden; /* Scrollen nur im Body */
    transform: none !important;
    touch-action: none;
    resize: none; /* wir resizen über interact.js */
}

/* Header fix oben, Body füllt Rest und scrollt */
#favPanel .card-header {
    flex: 0 0 auto;
    cursor: move;
    user-select: none;
}

#favPanel .card-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

#favPanel.floating-fav .card-body {
    overflow: auto;
    scrollbar-gutter: stable; /* Edge/Chromium: reserviert Platz für die Scrollbar */
    padding-right: 18px; /* Scrollbar rückt nach innen, Rand bleibt frei */
}




/* Optional sichtbarer Resize-Griff unten rechts */
#favPanel .fav-resize-handle {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0; /* voller Streifen von oben bis unten */
    width: 16px; /* ggf. auf 20–24px erhöhen, wenn es sich besser greifen soll */
    cursor: ew-resize;
    z-index: 20; /* über dem Tabelleninhalt */
    background: transparent; /* unsichtbar */
    pointer-events: auto; /* damit man ihn wirklich „treffen“ kann */
}

    /* Optional: in der Ecke zusätzlich diagonalen „Treffer“ anbieten */
    #favPanel .fav-resize-handle::after {
        content: "";
        position: absolute;
        right: 0;
        bottom: 0;
        width: 16px;
        height: 16px;
        cursor: se-resize;
    }

/* DataTables: kompakter, keine Layoutsprünge */
#favPanel table.dataTable thead > tr > th.sorting,
#favPanel table.dataTable thead > tr > th.sorting_asc,
#favPanel table.dataTable thead > tr > th.sorting_desc {
    padding-right: 1.75rem !important;
    white-space: nowrap;
}

/* Einklappen: nur Body verstecken, Header bleibt sichtbar */
#favPanel.fav-collapsed {
    height: auto !important;
    max-height: none !important;
}

    #favPanel.fav-collapsed .card-body {
        display: none !important;
    }

    #favPanel.fav-collapsed #btnFavCollapse .fa-chevron-up {
        transform: rotate(180deg);
    }



/* Kompaktere DT-UI im Panel */
#favPanel .dataTables_wrapper .dataTables_filter {
    float: none;
    text-align: left;
    margin-bottom: .25rem;
}

    #favPanel .dataTables_wrapper .dataTables_filter input {
        max-width: 280px;
    }

#favPanel .dataTables_wrapper .dataTables_length,
#favPanel .dataTables_wrapper .dataTables_info,
#favPanel .dataTables_wrapper .dataTables_paginate {
    font-size: .85rem;
}


/* native Resize deaktivieren – wir nehmen interact.js */



/* Harte Resets gegen alte Reste */
#favTable_wrapper {
    max-height: none !important;
    overflow: visible !important;
}

@media (max-width: 1200px) {
    #searchResults col.ean {
        width: 140px;
    }
}

/* ==== Select2: ADAM-Look — HARD OVERRIDES (scoped) ==== */
.select2-container {
    width: 100% !important;
}

    /* Single */
    .select2-container .select2-selection--single {
        height: 42px !important;
        border-color: #6c757d !important;
        border-radius: .25rem !important;
    }

        .select2-container .select2-selection--single .select2-selection__rendered {
            line-height: 42px !important;
            padding-left: .75rem !important;
            color: #343a40 !important;
        }

        .select2-container .select2-selection--single .select2-selection__arrow {
            height: 42px !important;
        }

    /* Multiple */
    .select2-container .select2-selection--multiple {
        min-height: 42px !important;
        border-color: #6c757d !important;
        border-radius: .25rem !important;
        padding: .15rem .35rem !important;
    }

        .select2-container .select2-selection--multiple .select2-selection__choice {
            margin-top: .15rem !important;
            padding: .15rem .4rem !important;
            border-radius: .2rem !important;
        }

        /* Focus */
        .select2-container .select2-selection--single:focus,
        .select2-container .select2-selection--multiple:focus {
            box-shadow: 0 0 0 .12rem rgba(0,0,0,.08) !important;
        }

    /* Dropdown-Liste */
    .select2-container .select2-results__option {
        background-color: #f8f9fa !important;
        color: #343a40 !important;
    }

    .select2-container .select2-results__option--highlighted[aria-selected] {
        background-color: #6c757d !important;
        color: #fff !important;
    }

    /* Placeholder im Dropdown */
    .select2-container .select2-search--dropdown .select2-search__field::placeholder {
        color: #999 !important;
    }

    /* Multiple */
    .select2-container .select2-selection--multiple {
        min-height: 42px !important;
        border-color: #6c757d !important;
        border-radius: .25rem !important;
        padding: .15rem .35rem !important;
    }

        .select2-container .select2-selection--multiple .select2-selection__choice {
            margin-top: .15rem !important;
            padding: .15rem .4rem !important;
            border-radius: .2rem !important;
            /* NEU: Farben überall */
            background-color: #17a2b8 !important;
            border-color: #117a8b !important;
            color: #fff !important;
        }

        .select2-container .select2-selection--multiple .select2-selection__choice__remove {
            color: #fff !important;
            margin-right: 4px !important;
        }

.select2-container {
    width: 100% !important;
}


#serverAlerts {
    padding-left: .5rem;
    padding-right: .5rem;
}

/* ==========================================
tab2shelf – Gruppenbaum Styling (FINAL)
========================================== */

/* leichte Hover-Optik */
#groupTree li:hover {
    background: rgba(0,0,0,.03);
    border-radius: .5rem;
}

#groupTree .group-name {
    font-weight: 500;
}

.group-node .node-row {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.group-node .name {
    font-weight: 500;
}

.group-node .children {
    margin-top: .25rem;
}



/* Globale, grazile Buttons (Basis) 
.btn-icon {
    width: 16px;
    height: 16px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .5rem;
    line-height: 1;
}
    */
.btn-icon--mini {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

    .btn-icon--mini i {
        line-height: 1;
    }

/* >>> OVERRIDES: gewinnen gegen .group-node .btn-icon */
/* Einheitliche X-Buttons im Gruppenbaum */
#groupTree .group-node .btn-icon.btn-icon--mini {
    width: 16px !important;
    height: 16px !important;
    border-radius: 999px !important;
    padding: 0 !important;
    line-height: 1 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    #groupTree .group-node .btn-icon.btn-icon--mini i {
        font-size: 0.7rem; /* feste Größe für das „X“ */
        line-height: 1; /* kein Browser-Default */
    }


    #groupTree .group-node .btn-icon.btn-icon--mini.btn-outline-primary:hover {
        color: #fff;
        background-color: #007bff;
        border-color: #007bff;
    }

/* Tree-Lines nur in Unterebenen (.children) */
#groupTree .children {
    position: relative;
    padding-left: .75rem;
    border-left: 1px solid #bcd7dd !important;
}

    #groupTree .children .group-node .node-row {
        position: relative;
        margin-bottom: .35rem;
    }
        /* horizontaler Arm */
        #groupTree .children .group-node .node-row::before {
            content: "";
            position: absolute;
            left: -.75rem;
            top: 50%;
            transform: translateY(-50%);
            width: 12px;
            height: 1px;
            background: #bcd7dd !important;
        }
        /* kurzer vertikaler Strich (Ecke) */
        #groupTree .children .group-node .node-row::after {
            content: "";
            position: absolute;
            left: -.75rem;
            top: calc(50% - 12px);
            width: 1px;
            height: 12px;
            background: #bcd7dd !important;
        }

#groupTree .group-node.active > .node-row {
    background-color: #e3f2fd; /* dezentes Blau */
    border-radius: 4px;
}

    #groupTree .group-node.active > .node-row .name {
        font-weight: 600;
        color: #0d6efd; /* AdminLTE/Bootstrap-Blau */
    }

#groupTree .node-toggle.disabled {
    cursor: default;
    opacity: 0.35;
}

    #groupTree .node-toggle.disabled i {
        pointer-events: none;
    }


/* Bootstrap 4/5 Einrückung */
.ml-4 {
    margin-left: 1.5rem !important;
}
/* BS4 */
.ms-4 {
    margin-left: 1.5rem !important;
}
/* BS5 */


/* Module, die (noch) nicht freigeschaltet sind */
.nav-sidebar .nav-link.module-disabled,
.nav-sidebar .nav-link.module-disabled:hover,
.nav-sidebar .nav-link.module-disabled:focus {
    background-color: transparent !important; /* kein Hover-Hintergrund */
    color: rgba(5, 52, 93, 0.35) !important; /* deutlich heller/blasser */
    cursor: not-allowed; /* zeigt „geht nicht“ an */
}

    /* Icons & Text im disabled-Link gleich mit ausgrauen */
    .nav-sidebar .nav-link.module-disabled i,
    .nav-sidebar .nav-link.module-disabled p,
    .nav-sidebar .nav-link.module-disabled span {
        color: inherit !important;
    }

.dashboard-chart-container {
    position: relative;
    height: 220px; /* fixe Höhe */
    max-height: 220px;
    width: 100%;
}
