/* ============================================================
   Timeline
   Les couleurs dynamiques (itemTypeColor*) sont injectées
   par generateColorStyles() dans timeline.js
   ============================================================ */


/* ----------------------------------------------------------
   Mise en page générale
   ---------------------------------------------------------- */

#menu {
    margin-bottom: 10px;
}

.menu {
    position: absolute;
    top: 30px;
    right: 0;
    margin: 10px;
    z-index: 9999;
}

#visualization-container {
    /* To make if full width */
    /*width: 100vw;*/
    /*margin-left: calc(50% - 50vw);*/
    margin-left: auto;
    margin-top: 10px;
    padding: 12px 16px;
    position: relative;
    border-style: solid;
    border-width: 10px 0 0 0 !important;
    border-color: black;
}

#fullscreen-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 100;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 14px;
}

#fullscreen-btn:hover {
    background: #f0f0f0;
}

#visualization-container.is-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background-color: #ebeae6;
    overflow: auto;
}

#visualization-container.is-fullscreen #fullscreen-btn {
    position: fixed;
    top: 20px;
    right: 10px;
}

#visualization{
    height: 65vh;
}

#visualization.is-expanded{
    height: 80vh;
}
/* ----------------------------------------------------------
   Formulaire de configuration
   ---------------------------------------------------------- */

.timeline-elem-wrapper {
    width: 450px;
    margin-right: 40px;
    float: left;
    clear: none;
}

.timeline-elem-wrapper label {
    display: block;
    clear: both;
}

#timelineform label[for='submit'] {
    display: none;
}

.jscolor {
    cursor: pointer;
}


/* ----------------------------------------------------------
   Groupes (labels de collection)
   ---------------------------------------------------------- */

/* Colonne des labels : largeur max 15% */
.vis-left {
    max-width: 15%;
}

/* En-tête de la colonne des groupes */
#timeline-header-groups {
    border: solid 1px gray;
    width: 14.99%;
    text-align: center;
    height: 1.5em;
}

/* Label de base */
.vis-label {
    cursor: pointer;
    display: flex;
    align-items: center;
    background-color: #dfdfdf;
}

.vis-label .vis-inner {
    padding-left: 5px;
}

/* Niveau 2 : groupe parent avec enfants */
.vis-label.vis-nesting-group.vis-nested-group {
    background-color: #ccc9c9;
}

/* Niveau 3+ : feuille pure (nested sans nesting) */
.vis-label.vis-nested-group:not(.vis-nesting-group) {
    background-color: #b8b5b5;
}


/* ----------------------------------------------------------
   Items
   ---------------------------------------------------------- */

.vis-item .vis-item-content {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 1px !important;
}


.vis-item.search-match {
    outline: 2px solid #e03030 !important; outline-offset: 1px !important; z-index: 10 !important;
}

/* ----------------------------------------------------------
   Scrollbar
   ---------------------------------------------------------- */

/* Panneau des labels (gauche) : scrollbar masquée */
.vis-panel.vis-left {
    overflow: hidden !important;
}

/* Panneau des items (droite) : scrollbar fine */
.vis-panel.vis-center {
    scrollbar-width: thin;
}

.vis-panel.vis-center::-webkit-scrollbar {
    width: 6px;
}

.vis-panel.vis-center::-webkit-scrollbar-thumb {
    background: #aaa;
    border-radius: 3px;
}

#toggle-instructions-btn {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 6px;
}

#toggle-instructions-btn:hover {
    background: #f0f0f0;
}

#instructions-list {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    max-height: 500px;
    opacity: 1;
    padding: 1em;
}

#instructions-list.is-collapsed {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
}

/* ----------------------------------------------------------
   Controls
   ---------------------------------------------------------- */

#timeline-controls {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
    padding: 10px;
    background: #f4f4f4;
    align-items: center;
    font-size: 13px;
    border-radius: 4px;
    flex-wrap: wrap;
    width: fit-content;
}

#timeline-controls label {
    margin: 0;
    padding: 0;
    display: block;
}

#timeline-controls-slider {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

#timeline-controls-slider-row {
    font-weight: 700;
}

#timeline-controls-grouping {
    display: flex;
    flex-direction: column;
    align-self: stretch;
    justify-content: center;
}

#toggle-grouping-btn {
    padding: 4px 10px;
    border: 1px solid #aaa;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 13px;
    margin-top: 2px;
    text-transform: none !important;

}

#timeline-controls-search {
    display: flex;
    flex-direction: column;
}

#search-input {
    padding: 4px 7px;
    border: 1px solid #aaa;
    border-radius: 4px;
    font-size: 13px;
    width: 180px;
}

#search-count {
    font-size: 12px;
    color: #666;
    margin-top: 3px;
    min-height: 16px;
}

/*.vis-panel .vis-shadow {*/
/*    height: 0 !important;*/
/*    box-shadow: 0 6px 6px -2px rgba(0, 0, 0, 0.5) !important;*/
/*}*/