﻿/* Colors */
:root {
    --very-light-gray: #EEEEEE;
    --client-primary-color: #2DB6C6; /* cyan */
    --client-secondary-color: #D3D5D6; /* light gray */
    --client-background-color: #262A36; /* dark gray */
    --client-control-background-color: #4b4c4c; /* dark gray */
    --warning-color: #CC9F35; /* orange */
    --error-color: #AF272F /* red */
}

body {
    color: var(--client-secondary-color);
    background-color: var(--client-background-color);
    padding-top: 0px;
    padding-bottom: 40px;
}

/* Remove margin bottom from legend.
This is a fix for the fact that items following the legend are inconsistant in their
behaviour for removing their leading margin cross browsers, IE 9 actually does this
correctly, whilst Chrome/Firefox currently do not.
https://github.com/twitter/bootstrap/pull/1623
http://jsfiddle.net/tomhuze/YdFus/
*/
legend {
    margin-bottom: 0px;
}

/* Footer styles, taken from http://getbootstrap.com/examples/sticky-footer-navbar/ */
html {
    position: relative;
    min-height: 100%;
}

body {
    /* Margin bottom by footer height */
    margin-bottom: 60px;
}

.nav-list {
    display: inherit;
}

.navigation-bar {
    padding-top: 2em;
}

.navigation-bar .current-user-text {
    width: 100%;
    text-align: right;
}

.navigation-bar .client-logo {
    max-width: 100%;
    height: auto;
    margin-bottom: 2em;
}

.navigation-bar .item p {
    margin-bottom: 1.5em;
}

.navigation-bar .item i,
.navigation-bar .item p {
    width: 100%;
    text-align: center;
    display: block;
}

.navigation-bar hr {
    margin-top: 1em;
}

@media (min-width: 550px) {
    .navigation-bar .client-logo,
    .navigation-bar .item p {
        margin-bottom: 0;
    }
    .navigation-container {
        display: flex;
    }
}

/* Hide the logout form (auto-generated in the navigation bar) to prevent it from adding additional space. */
#logoutForm {
    display: none;
}

.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    /* Set the fixed height of the footer here */
    height: 60px;
}

    .footer > .container {
        padding-right: 15px;
        padding-left: 15px;
    }

    .footer .container p {
        margin: 20px 0;
    }

/* Defaults */
h1, h2, h3, h4, h5, h6 {
    color: var(--client-secondary-color);
}

a {
    color: var(--client-primary-color);
    text-decoration: none;
}

    a:hover {
        color: var(--client-secondary-color);
    }

i {
    color: var(--client-primary-color);
}

input {
    color: var(--client-primary-color);
    background-color: var(--client-background-color);
    border: 1px solid var(--client-secondary-color);
}

    input:focus {
        border-color: var(--client-primary-color);
    }

    input[type="datetime-local"],
    input[type="date"] {
        height: 38px;
        padding: 6px 10px; /* The 6px vertically centers text on FF, ignored by Webkit */
        border-radius: 4px;
        box-shadow: none;
        box-sizing: border-box;
        /* Removes awkward default styles on some inputs for iOS */
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }

        input[type="datetime-local"]::-webkit-calendar-picker-indicator,
        input[type="date"]::-webkit-calendar-picker-indicator {
            color: var(--client-primary-color);
        }

select {
    color: var(--client-primary-color);
    background-color: var(--client-background-color);
    border: 1px solid var(--client-secondary-color);
}

    select:focus {
        border-color: var(--client-primary-color);
    }

label {
    color: var(--client-primary-color);
}

/* Styles for buttons with FA icons. Align the icon on the left and center the text on the right. */
.button.button-with-icon, .button-with-icon {
    text-align: left;
    cursor: pointer;
}

.button.button-with-icon i {
    vertical-align: sub;
    margin-left: 0.4em;
}

.button.button-with-icon span {
    width: 100%;
    text-align: center;
    display: inline-block;
    margin-left: -2.2em;
}

/* Equipment icon SVG sizing. */
.equipment-icon {
    max-width: 10em;
}

/* Utilities */
.no-preferred-size-button{
    cursor: not-allowed;
}

.preferred-size-helper a{
    font-style: italic;
}

.preferred-size-helper i{
    color: orangered;
}

.field-validation-error{
    color: var(--error-color);
    white-space:break-spaces;
}

.flex-row {
    display: flex;
    flex-direction: row;
    gap: 1rem;
}

.exercise-header {
    color: var(--client-primary-color);
    padding: 2px;
    margin-top: 10px;
    border-bottom: solid 1px;
    border-bottom-color: var(--client-primary-color);
}

.section-divider-line {
    border-bottom: solid 1px;
    margin-bottom: 15px;
    border-bottom-color: var(--client-primary-color);
}

.homepage-point-label {
    text-align: center;
    font-size: 18pt;
    margin-top: 1em;
}

.motivational-message-label {
    text-align: center;
    font-size: 16pt;
    margin-top: 1em;
}

.current-stage-label {
    text-align: center;
    font-size: 24pt;
    margin-top: 1em;
    display: inline;
}

.current-stage-name {
    text-align: center;
    font-size: 24pt;
    margin-top: 1em;
    display: inline;
    color: var(--client-primary-color);
}

.current-stage-date {
    text-align: center;
    font-size: 14pt;
    margin-top: 1em;
    display: inline;
}

.current-stage-progress {
    text-align: center;
    font-size: 10pt;
    margin-top: 1em;
    display: inline;
    color: var(--client-primary-color);
}

.stage-container {
    text-align: center;
}

.stage-result-header.stage-name {
    font-size: 2.4rem;
    width: 70%;
}

.stage-group-result-header{
    font-size: 2.4rem;
    width: 70%;
    color:var(--client-primary-color);
}

.stage-result-header.stage-date {
    font-size: 1.8rem;
    color: var(--client-primary-color);
    width: 30%;
}

.stage-result-header.stage-arrow {
    font-size: 2.4rem;
    width: 15%;
}

.stage-result-table {
    margin-left: auto;
    margin-right: auto;
}

.stage-result-cell{
    margin-left: 0px;
}

.stage-result-table-row.team-name {
    width: 80%;
}

.stage-result-table-row.position {
    width: 30%;
}

.stage-result-table-row.points {
    text-align:center;
    width: 15%;
}

.stage-dates-container{
    text-align: center;
}

.point-number {
    text-align: center;
    font-size:50pt;
}

.primary {
    color: var(--client-primary-color);
}

.secondary {
    color: var(--client-secondary-color);
}

.inherit {
    color: inherit;
    background-color: inherit;
}

.inline-block {
    display: inline-block;
}

.legend-table {
    padding-top: 5px;
    padding-bottom: 5px;
    padding-right: 5px;
}

.team-banding-table {
    padding-top: 5px;
    padding-bottom: 5px;
    padding-right: 5px;
}

@media (min-width: 550px) {
    .pull-right-when-large {
        float: right;
    }
}

.team-banding-chart-container {
    aspect-ratio: 854 / 409;
}

#team-banding-chart {
    height: 100% !important;
    min-width: 100%;
}

#points-chart-container {
    height: 300px;
}

#points-chart {
    height: 300px !important;
    width: 300px !important;
    max-width: 300px;
    max-height: 300px;
    position: relative;
    left: calc(50% - 150px);
}

#points-chart-container > .homepage-point-label {
    bottom: calc(50% + 35px);
    margin: 0;
    position: relative;
    width: 150px;
    left: calc(50% - 75px);
}

/*Arabic RTL handling*/
html[dir="rtl"] #points-chart {
    right: calc(50% - 150px);
}

html[dir="rtl"] #points-chart-container > .homepage-point-label {
    right: calc(50% - 75px);
}

.arrow-icon {
    direction: ltr !important;
}

.current-banding {
    text-align: center;
}

.average-banding {
    text-align: center;
}

@media (min-width: 550px) {
    .current-banding {
        text-align: left;
    }

    .average-banding {
        text-align: right;
    }
}

.leaderboards-pane {
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    column-gap: 75px;
}

.leaderboard {
    flex-basis: 0;
    flex-grow: 1;
    min-width: 350px;
}

.leaderboard td {
    padding-top: 5px;
    padding-bottom: 5px;
}

.intracompany-leaderboards-pane {
    display: flex;
    flex-wrap: wrap;
    align-content: center;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0, 0, 0);
    background-color: rgb(0, 0, 0, 0.4);
}

.modal-content {
    background-color: var(--client-background-color);
    margin: 15% auto;
    padding: 20px;
    width: 80%;
    max-width: 450px;
    font-size: 1.5rem;
}

.modal-close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.modal-close-button:hover,
.modal-close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

td.team-banding-table.current {
    font-weight: bold;
}

td {
    border-color: #E1E1E166;
}

progress {
    accent-color: var(--client-primary-color);
}

.team-banding-legend{
    margin: 0.5em 0;
}

.team-banding-legend::before {
    content: '';
    height: 0.75em;
    width: 0.75em;
    border: 2px solid;
    display: inline-block;
    margin-top: -0.2em; /*Adjust for font descender */
    vertical-align: middle;
    margin-right: 0.5em;
}

.team-banding-legend.legend-overall::before {
    height: 0.1em;
    background: #EEEEEE;
    border-color: #EEEEEE;
}

.team-banding-legend.legend-points::before {
    background: #2DB6C6FF;
    border-color: #2DB6C6FF;
}

.team-banding-legend.legend-participation::before {
    background: #D3D5D6;
    border-color: #D3D5D6;
}

.team-banding-legend.legend-today::before {
    border-color: #D3D5D6;
}

.communication{
    overflow:hidden;
}

.communication:hover {
    cursor:pointer;
    filter: brightness(120%);
}

.communication-subject {
    font-size: 2.4rem;
    width: 70%;
    color: var(--client-primary-color);
}


.communication.unread .communication-subject {
    font-weight: bold;
}


    .communication.unread .communication-subject::after {
        content: '';
        width: 0.8rem;
        height: 0.8rem;
        display:inline-block;
        border-radius: 4px;
        vertical-align: text-top;
        margin-left: 5px;
        background-color: white;
    }

.communication-body {
    white-space: pre-line;
    text-overflow: ellipsis;
}

.communication-content {
    display: block;
    position: relative;
    max-height: 150px;
    overflow: hidden;
    padding: 10px;
    margin-bottom: 20px;
    transition: max-height 0.15s ease-out;
}

    .communication-content.expand {
        max-height: 5000px !important;
        transition: max-height 0.35s ease-in-out;
    }

    .communication-content .readmore-link {
        position: absolute;
        bottom: 0;
        right: 0;
        display: block;
        width: 100%;
        padding-bottom: 20px;
        height: 20px;
        text-align: center;
        font-weight: bold;
        font-size: 16px;
        padding-top: 100px;
        background-image: linear-gradient(to bottom, transparent, var(--client-background-color));
        cursor: pointer;
    }

    .communication-content.expand .readmore-link {
        background-image: none;
        padding-bottom: 10px;
        height: 20px;
    }


.button-warning {
    color: #CF6679;
    border: 1px solid #CF6679;
}

.integration-image-container {
    width: 40%;
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0;
}

.integration-text-container {
    width: 60%;
    padding: 0;
}

.button-wide {
    max-width: 22em;
}

.password-visibility-button {
    width: 30px;
    margin-left: 5px;
    margin-bottom: 15px;
}

.password-validation {
    margin-left: 10px;
    margin-bottom: 15px;
}
