/*
    File: app.css
    Author: Bandi
*/

/* Base */
html {
    font-family: "Open Sans", sans-serif;
    font-size: 16px;
}

body {
    background-color: #ececec;
    margin: 0px;
}

.main {
    margin: 8px;
}

textarea {
    font-family: inherit;
    font-size: inherit;
    width: 80%;
    height: 100px;
}

/* Colors */

:root {
    /* --main: rgb(67, 137, 212); */
    --main: rgb(57 168 52);
    /* --second: rgb(203 228 255); */
    --second: rgb(193 239 191);
    /* --darker: rgb(51, 110, 172); */
    --darker: rgb(11 101 51)

}

/* Footer */

.footer {
    background-color: #d8d8d8;
    padding: 5px;
    margin-top: 25px;
    font-size: 14px;
}

.footer, .footer a {
    color: #414141;
}

.footer-show {
    position: fixed;
    right: 10px;
    bottom: 30px;
    display: flex;
}

.footer-show p, .footer-show a {
    font-size: 13px;
    color: #5e5e5e; 
}

.footer-show p {
    text-shadow: 0 0 10px #000000b3;   
}


.footer-show button {
    height: min-content;
    margin: auto;
}

.footer-show input {
    font-size: 13px;
    padding: 0;
    width: 35px;
    background-color: inherit;
    border-width: 1px;
    margin-bottom: 0;
    margin-left: 5px;
}

/* Box */
.border, .box-content, .box-title, .box-table, .box-maintitle, .button, form button, .button-form  {
    border: solid 1px rgb(160 160 160 / 50%);
    border-radius: 8px;
}

.box-shadow, .box-title , .box-content, .box-maintitle {
    box-shadow: 1px 1px 5px 1px rgb(0 0 0 / 20%)
}

.box-title {
    background-color: var(--main);
    position: relative;
    top: 10px;
}

.box-title h1, .box-title h2, .box-title h3, .box-title h4, .box-maintitle h1 {
    margin: 0;
    padding: 10px;
    text-align: center;
    color: white;
}

.box-content {
    background-color: white;
    padding: 10px;
    padding-top: 20px;
}

.box {
    margin: 5px;
    width: auto;
}

.box-maintitle {
    background-color: var(--main);
    /* margin-bottom: 15px; */
}

/* Flex */
.flex {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flexcontent {
    flex-direction: column;
    align-items: stretch;
}

/* Table */

.box-table {
    overflow-x: scroll;
}

@media (min-width: 800px) {
    .box-table {
        overflow-x: auto;
    }

    .flex {
        flex-direction: row;
    }

    .flex-1 {
        flex: 1;
        margin-left: 10px;
    }
    
    .flex-2 {
        flex: 2;
    }

    .flexcontent {
        align-items: self-start;
    }
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
}

thead {
    background-color: var(--main);
    color: white;
}

tr {
    border-top: solid 1px rgb(160 160 160 / 50%);
}

tr:first-child {
    border: 0;
}

tr:nth-child(2n) {
    background-color: var(--second);
}

tr:first-child th:first-child {
    border-top-left-radius: 8px;
}

tr:first-child th:last-child {
    border-top-right-radius: 8px;
}

tr:last-child td:first-child {
    border-bottom-left-radius: 8px;
}

tr:last-child td:last-child {
    border-bottom-right-radius: 8px;
}

th {
    padding: 0.5em;
}


/* Link */
.button, form button, .button-form  {
    background-color: var(--main);
    color: white;
    padding: 8px 10px;
    margin: 5px;
    display: inline-block;
    font-size: 1em;
    text-decoration: none;
}

.button:hover {
    background-color: var(--darker);
    color: #bfbfbf;
}

.a-box {
    text-decoration: none;
}

.button i {
    margin-right: 5px;
}

/* Formulaire */

input {
    font-size: 1em;
    padding: 0.15em;
    margin-bottom: 10px;
}

label {
    display: block;
}

form button, .button-form {
    font-size: 1em;
    background-color: #a947ff;
}

form button:hover, .button-form  {
    background-color: #8135c3;
}

/* Statut */
.traitement td {
    background-color: rgba(255, 136, 0, 0.5);
}

.echec td {
    background-color: rgba(255, 0, 0, 0.5);
}

.chrono {
    font-family: monospace;
    font-size: 2em;
    text-align: center;
    margin: 0.5em;
}

/* Sidebar */
.sidebar {
    background-color: var(--main);
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0px 1px 5px 1px rgb(0 0 0 / 20%);
}

.sidebar h2 {
    color: white;
    margin: 0 0 0 5px;
    padding: 0;

}

.menu a {
    color: white;
    font-size: 1.2em;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    margin-right: 10px;
}

.menu a i {
    margin-right: 5px;
}

.menu a:hover {
    color: #bfbfbf;
}

.sidebar-logo {
    max-width: 72px;
    height: 36px;
}

.sidebar-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.banner {
    display: flex;
    justify-content: center;
}

.banner img {
    max-height: 300px;
    max-width: 100%;
}

.link {
    color: black;
}

/*
 * Made by Erik Terwan
 * 24th of November 2015
 * MIT License
 *
 *
 * If you are thinking of using this in
 * production code, beware of the browser
 * prefixes.
 */
 
 #menuToggle
 {
   display: block;
   z-index: 12;
   
   -webkit-user-select: none;
   user-select: none;
 }
 
 #menuToggle input
 {
   display: block;
   width: 70px;
   height: 50px;
   position: absolute;
   top: 0;
   right: 0;
   
   cursor: pointer;
   
   opacity: 0; /* hide this */
   z-index: 13; /* and place it over the hamburger */
   
   -webkit-touch-callout: none;
 }
 
 /*
  * Just a quick hamburger
  */
 #menuToggle span
 {
   display: block;
   width: 33px;
   height: 4px;
   margin-bottom: 5px;
   position: relative;
   
   background: white;
   border-radius: 3px;
   
   z-index: 12;
   
   transform-origin: 4px 0px;
   
   transition: transform 0.5s cubic-bezier(0.77,0.2,0.05,1.0),
               background 0.5s cubic-bezier(0.77,0.2,0.05,1.0),
               opacity 0.55s ease;
 }
 
 #menuToggle span:first-child
 {
   transform-origin: 0% 0%;
 }
 
 #menuToggle span:nth-last-child(2)
 {
   transform-origin: 0% 100%;
 }
 
 /* 
  * Transform all the slices of hamburger
  * into a crossmark.
  */
 #menuToggle input:checked ~ span
 {
   opacity: 1;
   transform: rotate(45deg) translate(-2px, -1px);
   background: rgb(221, 221, 221);
 }
 
 /*
  * But let's hide the middle one.
  */
 #menuToggle input:checked ~ span:nth-last-child(3)
 {
   opacity: 0;
   transform: rotate(0deg) scale(0.2, 0.2);
 }
 
 /*
  * Ohyeah and the last one should go the other direction
  */
 #menuToggle input:checked ~ span:nth-last-child(2)
 {
   transform: rotate(-45deg) translate(0, -1px);
 }

  /*
  * And let's slide it in from the left
  */
  #menuToggle input:checked ~ ul
  {
    transform: none;
  }
 
 /*
  * Make this absolute positioned
  * at the top left of the screen
  */
 .menu
 {
   position: absolute;
   width: 80%;
   right: 0;
   margin: 20px 0 0 0;
   padding: 30px;
   z-index: 10;
   
   background: var(--darker);
   list-style-type: none;
   -webkit-font-smoothing: antialiased;
   /* to stop flickering of text in safari */
   
   transform-origin: 0% 0%;
   transform: scaleY(0);
   
   transition: transform 0.5s cubic-bezier(0.77,0.2,0.05,1.0);
 }

 @media (min-width: 800px) {
    .menu {
        position: inherit;
        transform: none;
        display: flex;
        align-items: center;
        background-color: inherit;
        padding: 0;
        margin: 0;
        width: auto;
    }

    #menuToggle span {
        display: none;
    }

    #menuToggle input {
        display: none;
    }

    .sidebar-logo {
        max-width: 96px;
        height: 48px;
    }
 }

 /* Infobulle */
 .infobulle {
    font-size: 0.8em;
 }

 /* Fuel indicator */
 .fuel-indicator {
    width: 100px;
    height: 20px;
    display: flex;
    margin: auto;
  }
  
  .fuel-bar {
    flex: 1;
    height: 100%;
    background-color: green;
    border-radius: 10px;
    margin-right: 1px;
    box-sizing: border-box;
  }

  /* Icon bonus */
  .bomalus-icon {
    width: 25px;
    height: 25px;
    margin-right: 5px;
    margin-left: 15px;
  }

.infoCourse {
    justify-content: space-around;
}

.infoCourse img {
    height: 80px;
    margin: 5px;
}

#place1 {
    background-color: gold;
}

#place2 {
    background-color: silver;
}

#place3 {
    background-color: brown;
}

tr.bonus-line {
    background-color: var(--main);
}

@media (max-width: 800px) {
    h1 {
        font-size: 1.5em;
    }

    h2 {
        font-size: 1.2em;
    }

    .infoCourse img {
        height: 50px;
        margin: 5px;
    }
}

input.millebornes {
    width: 60px;
    font-size: 1.2em;
    padding: 10px;
    border: solid 2px var(--main);
    border-radius: 8px;
}

button.millebornes {
    font-size: 1.2em;
}

h1#equipeNumero {
    font-size: 2em;
    padding-left: 20px;
}

.box-title.millebornes {
    background-color: white;
    display: flex;
    justify-content: space-between;
    padding: 5px 10px;
}

.cancel {
    background-color: #d71515;
}

#addfuel {
    margin-left: 20px;
}

#bonusDesc, #malusDesc {
    font-size: 0.8em;
}

.box-title.notifbox {
    background-color: #dabf00;
}

.box-content.notifbox {
    background-color: #f0ff0026;
}

.succes div[class~="box-title"] {
    background-color: #28b422;
}

.succes div[class~="box-content"] {
    background-color: #27b4226c;
}

.echec div[class~="box-title"] {
    background-color: #df5113;
}

.echec div[class~="box-content"] {
    background-color: #df50138e;
}

.box-feu {
    background-color: #eeff00;
    width: 100px;
    height: 100px;
    border: 8px solid rgb(0 0 0);
    border-radius: 50%;
    margin: auto;
    align-content: center;
    box-shadow: inset 0px 0px 5px 3px rgb(77, 77, 77);
    text-align: center;
    font-size: 3em;
    text-shadow: 0 0 15px #fffab5c2;
    
}

.feu-vert {
    background-color: green;
}

.feu-orange {
    background-color: orange;
}

.feu-rouge {
    background-color: red;
}

        @keyframes stopExpiredPulse {
            0% {
                background: #ffe5e5;
                box-shadow: inset 0 0 0 1px #f2b1b1;
            }
            50% {
                background: #ffb4b4;
                box-shadow: inset 0 0 0 2px #d64a4a;
            }
            100% {
                background: #ffe5e5;
                box-shadow: inset 0 0 0 1px #f2b1b1;
            }
        }

        #stopListContainer tr.stop-expired {
            background: #ffe5e5;
            box-shadow: inset 0 0 0 1px #f2b1b1;
            font-weight: 700;
            animation: stopExpiredPulse 1.2s ease-in-out infinite;
        }

        #stopListContainer tr.stop-expired td {
            color: #8b1f1f;
        }

        #stopListContainer tr.stop-expired .bomalus-countdown {
            color: #8b1f1f;
        }

.text-muted {
    color: darkgray;
    font-style: italic;
}

.dashboard-wrapper {
    max-width: 1440px;
    margin: 1rem auto 2rem;
}

.dashboard-shell {
    --dashboard-border: rgb(160 160 160 / 50%);
    --dashboard-muted: #5e665e;
}

.dashboard-tabs {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 1rem;
    border-bottom: 3px solid var(--main);
}

.dashboard-tab, .dashboard-tab-useless {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0.65rem 1rem;
    border: 1px solid var(--dashboard-border);
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    background: #e4e4e4;
    color: #303630;
    font: inherit;
    cursor: pointer;
}

.dashboard-tab:hover,
.dashboard-tab.is-active {
    background: var(--main);
    color: #fff;
}

.dashboard-tab-panel {
    display: grid;
    gap: 1rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.dashboard-panel {
    background: #ffffff;
    border: 1px solid var(--dashboard-border);
    border-radius: 8px;
    padding: 0 0 1rem;
    box-shadow: 1px 1px 5px 1px rgb(0 0 0 / 12%);
    overflow: hidden;
}

.dashboard-panel h2 {
    margin: 0 0 0.75rem;
    padding: 0.65rem 0.85rem;
    background: var(--main);
    font-size: 1.1rem;
    color: #fff;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding-right: 0.75rem;
    background: var(--main);
    color: #fff;
}

.dashboard-header h2 {
    margin: 0;
    padding: 0.65rem 0.85rem;
    background: transparent;
    color: #fff;
}

.sync-pill {
    color: #fff;
    font-size: 0.85rem;
}

.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
    margin: 0 0.85rem 0.85rem;
}

.dashboard-input {
    margin-bottom: 0px;
    width: 35px;
}

.course-chart-wrap {
    position: relative;
    height: 320px;
    margin: 0 0.85rem;
}

.course-chart-wrap canvas {
    max-width: 100%;
}

.timeline-interval-control {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.timeline-custom-interval {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: 0.35rem;
    color: #fff;
    font-size: 0.85rem;
}

.timeline-custom-interval input {
    width: 4.5rem;
    min-height: 2.25rem;
    padding: 0.35rem;
    border: 1px solid var(--dashboard-border);
    border-radius: 6px;
    font: inherit;
}

.chart-caption {
    margin: 0.75rem 0.85rem 0;
    color: var(--dashboard-muted);
    font-size: 0.8rem;
}

.metric-box {
    background: #c1efbf;
    border-radius: 8px;
    padding: 0.75rem;
    box-shadow: 1px 1px 4px 1px rgb(0 0 0 / 12%);
    border: 1px solid rgb(193 225 192);
}

.metric-box strong {
    display: block;
    font-size: 1.1rem;
    color: #174d27;
}

.metric-box span {
    color: #455247;
    font-size: 0.8rem;
}

.dashboard-panel table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.dashboard-team-link {
    color: var(--darker);
    font-weight: 600;
    text-decoration-color: transparent;
    text-underline-offset: 0.15em;
}

.dashboard-team-link:hover,
.dashboard-team-link:focus-visible {
    color: var(--darker);
    text-decoration-color: currentColor;
}

.dashboard-team-link:focus-visible {
    outline: 2px solid var(--main);
    outline-offset: 2px;
}

.dashboard-panel th,
.dashboard-panel td {
    padding: 0.5rem 0.25rem;
    border-bottom: 1px solid #d8ded7;
    text-align: left;
}

.dashboard-table-scroll {
    overflow-x: auto;
    margin: 0 0.85rem;
}

.game-ranking + .game-ranking {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #d8ded7;
}

.game-ranking h3 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    color: var(--darker);
}

.game-ranking-list,
.dashboard-panel > .bonus-list,
.dashboard-panel > .course-summary-list,
.dashboard-panel > .highlight-box,
.dashboard-panel > .empty-state {
    margin-right: 0.85rem;
    margin-left: 0.85rem;
}

.dashboard-course-heading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 88px;
    padding: 0.75rem 1rem;
    background: var(--main);
    color: #fff;
}

.dashboard-course-heading img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.dashboard-course-heading span {
    font-size: 0.85rem;
}

.dashboard-course-heading h2 {
    margin: 0.15rem 0 0;
    padding: 0;
    background: transparent;
    color: #fff;
    text-align: left;
}

.dashboard-course-content {
    padding: 0 0.85rem;
}

.dashboard-course-status {
    display: grid;
    gap: 0.25rem;
    margin: 0.75rem 0;
}

.dashboard-course-status strong {
    color: var(--darker);
    font-size: 1.1rem;
}

.dashboard-course-status span,
.dashboard-course-message {
    color: var(--dashboard-muted);
}

.dashboard-course-status .dashboard-countdown {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.dashboard-countdown strong {
    color: var(--darker);
    font-variant-numeric: tabular-nums;
}

.dashboard-countdown small {
    color: var(--dashboard-muted);
}

.dashboard-course-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    padding: 0.75rem 0;
    border-top: 1px solid #d8ded7;
    border-bottom: 1px solid #d8ded7;
}

.dashboard-course-message {
    margin: 0.75rem 0 0;
}

.dashboard-course-message.is-muted {
    font-style: italic;
}

.filter-button {
    min-height: 36px;
    padding: 0.4rem 0.7rem;
    border: 1px solid var(--darker);
    border-radius: 6px;
    background: #fff;
    color: var(--darker);
    font: inherit;
    cursor: pointer;
}

.filter-button:hover,
.filter-button.is-active {
    background: var(--darker);
    color: #fff;
}

.monitoring-alert-row td:first-child,
.fuel-empty {
    color: #b42318;
    font-weight: 700;
}

.fuel-protection {
    display: block;
    color: #087443;
    font-size: 0.75rem;
    font-weight: 400;
}

.untracked-teams {
    display: grid;
    gap: 0.35rem;
    margin-top: 0.75rem;
    margin-right: 0.85rem;
    margin-left: 0.85rem;
    color: var(--dashboard-muted);
    font-size: 0.9rem;
}

.mb-state {
    display: inline-block;
    font-weight: 700;
}

.mb-state.is-moving {
    color: var(--darker);
}

.mb-state.is-stopped {
    color: #b42318;
}

.mb-state.is-uninitialized {
    color: #76520a;
}

.dashboard-panel ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dashboard-panel li {
    display: flex;
    justify-content: space-between;
    padding: 0.45rem 0;
    border-bottom: 1px solid #d8ded7;
}

.empty-state {
    color: var(--dashboard-muted);
    font-style: italic;
}

@media (max-width: 600px) {
    .dashboard-tab {
        flex: 1;
        justify-content: center;
        padding: 0.55rem 0.5rem;
        font-size: 0.9rem;
    }

    .dashboard-header {
        padding: 0 0.5rem 0.5rem;
    }

    .dashboard-course-heading img {
        width: 48px;
        height: 48px;
    }

    .course-chart-wrap {
        height: 260px;
    }
}
