@import "main.css";


main{
    display: flex;
    align-items: center;
}

* {
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}
body {
    background: url('../img/wood-591631.jpg') no-repeat;
    background-size: cover;
}
.card, .ui-message {
    border-top: none;
    border-right: none;
    border-bottom: 3px solid var(--ui-fg-color);
    border-left: 3px solid var(--ui-fg-color);
}
.control-panel, .player-cards, .board-middle, .player-tag .speaker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}
.control-item, .score-board {
    -webkit-box-shadow: -3px 3px 0px 0px var(--ui-fg-color);
    -moz-box-shadow: -3px 3px 0px 0px var(--ui-fg-color);
    box-shadow: -3px 3px 0px 0px var(--ui-fg-color);
}
.control-panel {
    display: flex;
    justify-content: center;
    border-radius: 20px 20px 0px 0px;
    background: var(--ui-panel-color);
    width: 45%;
    min-width: 635px;
    max-width: 700px;
    height: 50px;
    bottom: 0;
    border-top: 3px solid var(--ui-fg-color);
    border-left: 3px solid var(--ui-fg-color);   
}
.control-panel .container {
    position: absolute;
    top: -33%;
    display: flex;
    column-gap: 1rem;
}
.control-item {
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--ui-control-item);
    padding: 0.5rem 1rem;
    border-radius: 1.5rem;
    width: 110px;
    font-variant: small-caps;
    font-weight: 500;
    font-size: 1.2rem;
    cursor: pointer;
    position: relative;
}
.control-item:hover, .control-item.active {
    background: var(--ui-highlight-color);
    color: white;
}
.control-item.inactive {
    cursor: not-allowed;
    background: var(--ui-light-gray-300);
    color: var(--ui-dark-gray-100);
}
.control-item.fab {
    width: 3rem;
    aspect-ratio: 1;
    box-sizing: border-box;
    border-radius: 50%;
    font-variant: unset;
    display: flex;
    justify-content: center;
    align-items: center;
}
.control-item .speaker {
    display: none;
    flex-direction: column;
    color: var(--ui-fg-color);
    row-gap: 0.5rem;
    position: absolute;
    bottom: 100%;
    background: var(--ui-control-item);
    min-width: 100%;
    border-radius: 10px;
    border-top: 2px solid var(--ui-fg-color);
    border-left: 2px solid var(--ui-fg-color);
    margin-bottom: 0.8rem;
    padding: 0.5rem;
    cursor: default;
}
.control-item .speaker::after {
    content: "";
    position: absolute;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid var(--ui-control-item);
    left: 50%;
    margin-left: -10px;
    bottom: -10px;
}
.control-item:not(.inactive).active .speaker {
    display: flex;
}
.speaker.announced-cards .row {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.33rem;
    font-size: 1rem;
    row-gap: 0.33rem;
}
.speaker.announced-cards .row h4 {
    font-size: 0.7rem;
    font-variant: small-caps;
    margin: 0;
}
.speaker.announced-cards .row .row-body {
    display: flex;
    column-gap: 0.33rem;
}
.speaker.announced-cards img {
    width: 1.5rem;
    aspect-ratio: 1;
}
.speaker.game-info {
    display: none;
    padding: 1.25rem;
    row-gap: 0.75rem;
}
.speaker.game-info .settings-group {
    min-width: 225px;
    display: flex;
    flex-direction: column;
    row-gap: 0.25rem;
}
.speaker.game-info h4, .speaker.voice-chat h4 {
    margin: 0;
}
.speaker.game-info h4, .speaker.game-info .row, .speaker.voice-chat {
    font-size: 0.8rem;
}
.speaker.game-info .row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.speaker.game-info .row img {
    height: 1rem;
    border-radius: 3px;
}
.speaker.voice-chat {
    min-width: 150px;
    padding: 1rem;
}
.speaker.voice-chat h4 {
    text-align: center;
}
.speaker.voice-chat .player-list {
    min-height: 80px;
    display: flex;
    flex-direction: column;
    row-gap: 0.2rem;
}
.speaker.voice-chat .player-list.no-data {
    border: 2px dashed var(--ui-dark-gray-100);
    border-radius: 0.5rem;
    justify-content: center;
    align-items: center;
}
.speaker.voice-chat .player-list.no-data::after {
    content: "Niemand da";
    font-size: 0.8rem;
    color: var(--ui-dark-gray-100);
}
.speaker.voice-chat .player-list span {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.speaker.voice-chat .player-list span .material-icons {
    font-size: 14px;
}
.speaker.voice-chat .button {
    box-sizing: border-box;
    padding: 0.33rem;
    background: transparent;
    border: 2px solid var(--ui-bg-color);
    border-radius: 0.5rem;
    color: var(--ui-bg-color);
}
.speaker.voice-chat .button:hover {
    background: var(--ui-bg-color);
    color: white;
}
.score-board {
    overflow-y: scroll;
    background: var(--ui-control-item);
    width: 225px;
    max-height: 165px;
    border-radius: 1rem;
    position: absolute;
    right: 2rem;
    top: 2rem;
    padding: 1rem;
    box-sizing: border-box;
    z-index: -1;
    box-sizing: border-box;
}

.score-board .table {
    display: flex;
    justify-content: space-around;
    width: 100%;
    text-align: center;
    font-size: 1.5rem;
    font-weight: normal;
    font-variant: small-caps;
}

.score-board .table element {
    margin-top: 1rem;
}

.player-cards {
    display: flex;
    column-gap: 0.5rem;
    bottom: 5rem;
}
.card {
    border-radius: 1rem;
    width: 84px;
    height: 148px;
    background-size: cover;
    cursor: pointer;
}
.card:hover {
    border-left-color: var(--ui-highlight-color);
    border-bottom-color: var(--ui-highlight-color);
}
.card.back {
    background-image: url(../img/release/Back.svg);
}
.card.ha {
    background-image: url(../img/release/Herz-Ass.svg);
}
.card.ea {
    background-image: url(../img/release/Eichel-Ass.svg);
}
.card.sa {
    background-image: url(../img/release/Schell-Ass.svg);
}
.card.la {
    background-image: url(../img/release/Laub-Ass.svg);
}
.card.sk {
    background-image: url(../img/release/Schell-Koenig.svg);
}
.card.ek {
    background-image: url(../img/release/Eichel-Koenig.svg);
}
.card.hk {
    background-image: url(../img/release/Herz-Koenig.svg);
}
.card.lk {
    background-image: url(../img/release/Laub-Koenig.svg);
}
.card.so {
    background-image: url(../img/release/Schell-Ober.svg);
}
.card.eo {
    background-image: url(../img/release/Eichel-Unter.svg);
}
.card.ho {
    background-image: url(../img/release/Herz-Ober.svg);
}
.card.lo {
    background-image: url(../img/release/Laub-Ober.svg);
}
.card.hu {
    background-image: url(../img/release/Herz-Unter.svg);
}
.card.eu {
    background-image: url(../img/release/Eichel-Unter.svg);
}
.card.lu {
    background-image: url(../img/release/Laub-Unter.svg);
}
.card.su {
    background-image: url(../img/release/Schell-Unter.svg);
}
.card.h10 {
    background-image: url(../img/release/Herz-Zehn.svg);
}
.card.e10 {
    background-image: url(../img/release/Eichel-Zehn.svg);
}
.card.s10 {
    background-image: url(../img/release/Schell-Zehn.svg);
}
.card.l10 {
    background-image: url(../img/release/Laub-Zehn.svg);
}
.card.h9 {
    background-image: url(../img/release/Herz-Neun.svg);
}
.card.e9 {
    background-image: url(../img/release/Eichel-Neun.svg);
}
.ui-messages {
    margin: auto;
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
}

.ui-messages form {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    column-gap: 1rem;
}

dialog::backdrop {
    background-color: rgba(0, 0, 0, 0.65);
}

.accept, .decline {
    width: 50%;
    height: 50%;
    border-width: 2px;
    border-style: solid;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: 1.5rem;
    font-size: 0.8rem;
    text-align: center;
    text-shadow: none;
    cursor: pointer;
    background-color: transparent;
}
.accept {
    border-color: var(--ui-accept-color);
    color: var(--ui-accept-color);
}
.accept:hover {
    background: var(--ui-accept-color);
    color: white;
}
.decline {
    border-color: var(--ui-decline-color);
    color: var(--ui-decline-color);
}
.decline:hover {
    background: var(--ui-decline-color);
    color: white;
}
.round-score {
    position: absolute;
    top:148px;
    border-radius: 0 10px 10px 0;
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    padding: 1rem;
    box-sizing: border-box;
    text-shadow: -2px 2px 0px var(--ui-text-shadow);
    border-right: 3px solid var(--ui-fg-color);
    border-bottom: 3px solid var(--ui-fg-color);
}
.current-announcement {
    background: var(--ui-control-item);
    position: absolute;
    top: 2rem;
    padding: 1rem;
    border-radius: 0 1rem 1rem 0;
    border-right: 3px solid var(--ui-fg-color);
    border-bottom: 3px solid var(--ui-fg-color);
    display: flex;
    align-items: center;
    column-gap: 1.5rem;
    font-size: 1.5rem;
    font-variant: small-caps;
    box-sizing: border-box;
    height: 100px;
}
.current-announcement img {
    height: 64px;
}
.current-value {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.board-middle {
    display: flex;
    position: absolute;
    left: 50%;
    transform: translate(-50%, -50%);
    top: 40%;
    column-gap: 0.5rem;
}
.board-middle .col {
    display: flex;
    flex-direction: column;
    row-gap: 1rem;
    align-items: center;
    justify-content: center;
}
.board-middle .col.left {
    flex-direction: row;
    column-gap: 1rem;
}
.board-middle .col.right {
    flex-direction: row-reverse;
    column-gap: 1rem;
}
.board-middle .card {
    border: 3px solid var(--ui-fg-color);
    cursor: default;
}
.player-tag {
    background: var(--ui-dark-gray-300);
    color:white;
    padding-left: 0.5rem;
    border-radius: 1.5rem;
    box-sizing: border-box;
    width: 125px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    border: 2px solid transparent;
}
.player-tag span {
    text-overflow: ellipsis;
    width: 65%;
    overflow: hidden;
    text-align: center;
}
.player-tag.has-turn {
    outline: 3px solid var(--ui-highlight-color);
}
.player-tag:after {
    content: "0";
    width: 1.25rem;
    height: 1.25rem;
    padding: 0.5rem;
    font-size: 1.5rem;
    border-radius: 1.25rem;
    justify-content: center;
    align-items: center;
    display: flex;
}
.player-tag .badge {
    position: absolute;
    top: 105%;
    left: 12.5%;
    width: fit-content;
    padding: 0 0.5rem;
    background: var(--ui-control-item);
    border-radius: 1rem;
    font-size: 0.8rem;
    -webkit-box-shadow: -2px 2px 0px 0px var(--ui-fg-color);
    -moz-box-shadow: -2px 2px 0px 0px var(--ui-fg-color);
    box-shadow: -2px 2px 0px 0px var(--ui-fg-color);
}
.player-tag.p1 .badge {
    top: -55%;
    -webkit-box-shadow: 2px -2px 0px 0px var(--ui-fg-color);
    -moz-box-shadow: 2px -2px 0px 0px var(--ui-fg-color);
    box-shadow: 2px -2px 0px 0px var(--ui-fg-color);
}
.player-tag .speaker, .player-tag .speaker span {
    overflow: initial;
    width: max-content;
}
.player-tag .speaker {
    display: flex;
}
.player-tag .speaker span {
    background: white;
    color: var(--ui-fg-color);
    padding: 0.5rem 1rem;
    border-radius: 10px;
}
.player-tag .speaker:before {
    position: absolute;
    content: "";
    display: block;
    width: 0;
    height: 0;
}
.player-tag.p1 .speaker {
    top: 150%;
}
.player-tag.p1 .speaker span {
    border-left: 2px solid var(--ui-fg-color);
    border-bottom: 2px solid var(--ui-fg-color);
}
.player-tag.p1 .speaker:before {
    left: 50%;
    top: -8px;
    margin-left: -9px;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
}
.player-tag.p3 .speaker, .player-tag.p2 .speaker, .player-tag.p4 .speaker {
    top: calc(-150% - 2px);
}
.player-tag.p3 .speaker span, .player-tag.p2 .speaker span, .player-tag.p4 .speaker span {
    border-top: 2px solid var(--ui-fg-color);
    border-right: 2px solid var(--ui-fg-color);
}
.player-tag.p3 .speaker:before, .player-tag.p2 .speaker:before, .player-tag.p4 .speaker:before {
    left: 50%;
    margin-left: -9px;
    top: 100%;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid white;
}

.control-item:not(.fab) i{
    font-variant: normal;
    display: none;
}

@media (max-width: 950px) {
    .score-board{
        height: 158px;
    }  
}

@media (max-width: 730px) {
    .score-board{
       top: 0;
       right: 0;
       border-top-right-radius: 0;
       border-top-left-radius: 0;
       border-bottom-right-radius: 0;
    }    
}

@media (max-width: 650px) {

    .score-board{
        height: 80px;
    }   
}

@media (max-width: 610px) {

    .control-panel {
        min-width: none;
        width: 100%;
    }

    .control-item div {
        display: none;
    }

    .control-item:not(.fab) i {
        display: block;
    }

    .control-item {
        width: 3rem;
        height: 3rem;
        box-sizing: border-box;
        border-radius: 50%;
        font-variant: unset;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .score-board {
        padding: 0.5rem;
        width: 175px;
    }

    :where(.left, .right) .player-tag {
        position: absolute;
    }

    .board-middle{
        column-gap: 0.1rem;
    }
}

@media (max-width: 500px) {

    .player-cards {
        width: 100%;
        justify-content: center;
    }

    .current-announcement {
        top: 0;
        border-top-right-radius: 0;
        padding: 0.5rem;
    }

    .round-score {
        top: 108px;
    }

    .card {
        border: none;
        max-width: calc((100vw - 1.3rem) / 5);
        max-height: calc(((100vw - 1.3rem) / 5 ) * 1.76);
        border-radius: 0.5rem;
    }  
}

@media (max-height: 785px) {

    .col:not(.left, .right) .player-tag {
        position: absolute;
    }

    .col:not(.left, .right) .player-tag:first-child {
        top: calc(33% - 1rem);
        transform: translateY(-100%);  
    }

    .col:not(.left, .right) .player-tag:last-child {
        bottom: calc(33% - 1rem);
        transform: translateY(100%);  
    }
}

@media (max-height: 660px) {

    .player-cards {
        bottom: 0;
    }

    .board-middle{
        top: 0;
        transform: translate(-50%, 1rem);
    }

    .control-panel {
        left:0;
        height: calc(100dvh - 165px - 0.5rem);
        width: 40px;
        align-items: center;
        max-height: 300px;
        bottom: 0.5rem;
        border-bottom-right-radius: 1rem;
        border-top-left-radius: 0;
        border-right: 3px solid var(--ui-dark-gray-300);
        border-bottom: 3px solid var(--ui-dark-gray-300);
        min-width:unset;
        min-height:unset;
        transform: none;
    }

    .control-panel .container {
        left: 33%;
        height: 100%;
        flex-direction: column;
        justify-content: space-around;
        top:auto;
    }

    .control-panel .control-item {
        width: 50px;
        aspect-ratio: 1;
        box-sizing: border-box;
        border-radius: 50%;
    }

    .control-panel .control-item > div {
        display: none;
    }

    .control-panel .control-item .material-icons {
        display: block;
    }
}


@media (max-height: 540px) {

    .current-announcement {
        top:0;
        border-top-right-radius: 0;
    }

    .round-score {
        top: 110px;
    }
}

@media (max-height: 505px) {
    .card {
        height: calc((100dvh - 3rem) / 3);
        width: calc(((100dvh - 3rem) / 3) * 0.576);
    }   
}

@media (max-height: 490px) and (orientation: landscape) {
    
    .round-score {
        top: 0;
        left: 175px;
        border-top-right-radius: 0;
        border-bottom-left-radius: 0.5rem;
        border-left: 3px solid var(--ui-fg-color);
    }

    .board-middle .col {
        row-gap: 0.5rem;
    }
}

@media (max-height: 475px) {
    .control-panel {
        height: calc(100dvh - 110px);
        bottom: 0;
        border-bottom-right-radius: 0;
        border-bottom: none;
    }
}

@media (max-height: 400px){
    .current-announcement{
        padding: 0 0.5rem;
    }

    .card{
        border-radius: 0.5rem;
    }
}

@media (max-height: 380px) {
    .control-panel .control-item {
        width: 40px
    }   
}