#scoresheet {
    height: inherit;
    display: flex;
    flex-direction: column;
}

#scoresheet .error-link {
    cursor: pointer;
}

/* Intro */

#intro {
    height: inherit;
    background-image: url('/img/scoresheet_lobby_background.jpg');
    background-size: 100%;
    transition: all linear 0.2s;
}

#intro h3 {
    font-family: latolight;
}

#intro .intro-card {
    width: 30em;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    padding: 1em;
}

#intro.ng-animate .intro-card {
    display: none;
}

#intro.ng-hide {
    opacity: 0;
    transition: none;
}

#intro-toolbar {
    background: lightgrey;
    color: black;
    min-height: 3em;
    justify-content: space-between;
    transition: all linear 0.2s;
}

#intro-toolbar.ng-hide {
    margin-top: -3em;
    transition: none;
}

#intro-toolbar select {
    margin: 0.5em;
    width: fit-content;
    background: inherit;
    border: white 2px solid;
    color: white;
}

#intro-toolbar select {
    background: inherit;
    border: white 2px solid;
    margin: 0.5em;
    color: white;
}

/* Teams */

#scoresheet-teams {
    flex: 1;
    margin: 1em;
    display: grid;
    padding: 1em;
    grid-gap: 1em;
    grid-template: 2fr 1fr / 1fr 1fr;
    transition: all linear 0.2s;
    position: relative;
}

#no-teams-message {
    grid-area: 1 / 1 / 3 / 3;
    text-align: center;
    font-size: 2rem;
    margin-top: 2rem;
}

#no-teams-message small {
    display: block;
    margin-top: 1em;
}

#scoresheet-teams .teams-search-input {
    position: absolute;
    z-index: 1;
    right: 50%;
    top: 1.5em;
}

#scoresheet-teams .teams-list {
    grid-row-end: span 2;
    overflow-y: auto;
}

#scoresheet-teams .teams-list table tbody {
    height: calc(100% - 4em);
}

#scoresheet-teams .teams-list table tr {
    cursor: pointer;
}

#scoresheet-teams .teams-list table td.name {
    flex: 1;
}

#scoresheet-teams .stage-select .stages {
    display: flex;
    flex-direction: column;
}

#scoresheet-teams .stage-select .stages i {
    vertical-align: middle;
}

#scoresheet-teams .stage-select .stage {
    text-align: center;
    margin: 0.5em;
}

#scoresheet-teams .stage-select .stage .stage-title {
    border: 1px solid gray;
    border-bottom: none;
}

#scoresheet-teams .stage-select .stage .rounds {
    display: flex;
    justify-content: space-around;
}

#scoresheet-teams .stage-select .round {
    display: inline-block;
    margin: 0.5em;
    background: lightgray;
    line-height: 2em;
    width: 2em;
    text-align: center;
    border-radius: 0.5em;
    cursor: pointer;
}

#scoresheet-teams .stage-select .round.selected {
    background: lightgreen;
}

#scoresheet-teams .actions {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

#scoresheet-teams .actions .move-on {
    margin: 0 auto;
    width: 6em;
}

@media screen and (max-width: 875px) and (min-width: 100vh) {

    #scoresheet-teams .teams-search-input {
        display: none;
    }

}

@media screen and (max-width: 100vh) {

    #scoresheet-teams {
        grid-template: 3fr 2fr 1fr / 1fr;
    }

    #scoresheet-teams .teams-search-input {
        right: 1em;
    }

    #scoresheet-teams .teams-list {
        grid-row-end: span 1;
    }

    #scoresheet-teams .teams-list {
        grid-row-end: span 1;
    }

    #scoresheet-teams .stage-select .stages {
        flex-direction: row;
    }

    #scoresheet-teams .stage-select i {
        display: none;
    }

}

@media screen and (max-width: 400px) {

    #scoresheet-teams .teams-search-input {
        display: none;
    }

}

#scoresheet-teams.ng-hide {
    opacity: 0;
    transition: none;
}

#scoresheet-teams .stage-select .round-score {
    font-weight: bolder;
    font-size: 1.5rem;
    transform: rotate(-20deg);
    margin-top: -0.5em;
    border-radius: 2px;
    padding: 0.1em;
}

#team-toolbar {
    background: lightgrey;
    color: black;
    min-height: 3em;
    justify-content: space-between;
    transition: all linear 0.2s;
}

#team-toolbar.ng-hide {
    margin-top: -3em;
    transition: none;
}

#team-toolbar .score-diff{
    position: absolute;
    height: 3em;
    width: 3em;
    right: 10%;
    font-size: 2rem;
    border-radius: 100%;
    background: radial-gradient(circle at 50% 55%, rgba(240, 245, 255, 0.9), rgba(240, 245, 255, 0.9) 40%, rgba(225, 238, 255, 0.8) 60%, rgba(43, 130, 255, 0.4));
}

#team-toolbar .score-diff:after {
    content: "";
    position: absolute;
    top: 5%;
    left: 10%;
    width: 80%;
    height: 80%;
    border-radius: 100%;
    filter: blur(1px);
    z-index: 2;
    transform: rotateZ(-30deg);
    display: block;
    background: radial-gradient(circle at 50% 80%, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0) 74%, white 80%, white 84%, rgba(255, 255, 255, 0) 100%);
}

#team-toolbar .score-diff.animating {
    animation: 2s linear score-diff-animation;
}

#team-toolbar .score-diff:not(.animating) {
    display: none;
}

@keyframes score-diff-animation {
    0% { top: 4em;  }
    100% { top: -5em;  }
}

/* Missions */

#missions {
    overflow-y: auto;
}

#missions .mission:not(.ok) .mission-score {
    display: none;
}

#missions .mission .objective {
    height: 3em;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#missions .card .error {
    display: flex;
    align-items: center;
}

#missions .errors.card .error {
    margin: 0.5em 1em;
}

#missions .mission:not(.error) .errors {
    display: none;
}

#missions .move-on.btn {
    display: block;
    margin: 1em auto;
    width: 5em;
}

/* Signoff */

#signoff {
    flex: 1;
    margin: 1em;
    display: flex;
    flex-direction: column;
}

#signoff .signoff-grid {
    flex: 1;
    display: grid;
    grid-template: 1fr 0fr / 1fr 1fr;
    grid-gap: 1em;
    margin: 1em;
}

#signoff .signoff-grid .missions {
    overflow-y: auto;
    grid-row-end: span 2;
}

@media screen and (max-width: 100vh) {

    #signoff .signoff-grid {
        grid-template: 3fr 2fr 1fr / 1fr;
    }

    #signoff .signoff-grid .missions {
        grid-row-end: span 1;
    }

}

#signoff [fll-sigpad] {
    align-items: flex-start;
}

#signoff .signoff-grid [fll-sigpad] canvas {
    border: lightgray 1px solid;
    width: 100%;
    height: fit-content;
}

#signoff .signoff-grid .missions .mission > .title {
    font-weight: bold;
}

#signoff .signoff-grid .missions .objective {
    margin: 0.5em;
}

#signoff .signoff-grid .missions .objective .title {
    display: inline-block;
}

#signoff .signoff-grid .missions .objective .value {
    display: inline-block;
    font-weight: bold;
}
