@property --animate-highlight {
  syntax: "*";
  inherits: true;
   /* property name | duration | easing function | delay */
   initial-value: border 1.05s ease-in -1s;
}

:root{
    --create-button-background:  #c7e0c7;
    --create-button-background-highlight: #d1ead1;
    /* #b6ceb6
    #e2c1c1
    #b6ceb6
    #cce9cc
    
    */
    --basic-mat-background: #e2c1c1;
}


body {
    font-family: system-ui, sans-serif;
    background: #fafafa;
    color: #222;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: flex-start;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 0;
    margin: 0;
}

body:not(.demoPage) {
    overflow-x: hidden;
}

.all{
    display: block;
    position: relative;
}

h1 {
    font-size: 3rem;
    margin-bottom: 1.25rem;
}

.title{
    margin-left: auto;
    margin-right: auto;
    display: flex;
    height: 50%;
    color:lightgray;
    pointer-events: none;
    user-select: none;
    position: relative;
    top:-0.7rem;
    flex-direction: row;
    align-items: baseline;
   }
    .title h1{
        margin:0;
        padding: 0;
        height:50%;
    }
    .title p{
        margin-block-end: 0.6rem;
        padding-left: 0.5rem;   
        font-size: 1.25rem;
    }

h2 {
    margin-top: 2rem;
    font-size: 1.75rem;
}

ul {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 0;
    margin: 0;
}

ul.basic-mat>li {
    
    list-style: none;
    display: flex;
    
    padding: 1rem;
    margin: 0;
}

a {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
}
a:hover {
    text-decoration: underline;
}

.spotlight{
    width: 14rem;
    height: 14rem;
    box-shadow: 0 1rem 1.5rem rgba(0, 0, 0, 0.15);
    background: #c6fbff;
}

.players{
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1rem;
    height: fit-content;
    width: 100%;
}
    .players .playersText{
        height: fit-content;
        display: flex;
        flex-direction: column;
        max-width: 100%;
        justify-content: flex-start;
        align-items: flex-start;
        padding-top: 1rem;
    }

    .players h2{
        padding: 0;
        margin: 0;
    }

.cards .cardsText.owned-cards-text {
    min-width: min(100%, 30rem);
}

.owned-cards-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.owned-cards-heading h3 {
    margin: 0;
}

.collection-sort-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
}

.collection-sort-label {
    font-size: 0.9rem;
    font-weight: 600;
}

.collection-sort-control {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border: 1px solid #777;
    border-radius: 0.3rem;
    background: #fff;
    font-size: 0.9rem;
    line-height: 1.2;
}

.collection-sort-control:hover {
    background: #f0f6f6;
    text-decoration: none;
}

.collection-sort-control:focus-visible {
    outline: 3px solid;
    outline-offset: 2px;
}

.collection-sort-control.is-active,
.collection-sort-control[aria-current="true"] {
    border-color: #174c8c;
    background: #dbeafe;
    font-weight: 700;
}

.players .challenge-list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
    width: min(100%, 48rem);
}

.players .challenge-list > .challenge-card {
    display: block;
    width: 100%;
    padding: 0;
}

.challenge-card-link {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    padding: 0.5rem 0.75rem;
    border: 2px solid #777;
    border-radius: 0.5rem;
    background: #fff;
    line-height: 1.25;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.challenge-card-link:hover {
    border-color: #222;
    background: #f0f6f6;
    text-decoration: none;
}

.challenge-card-link:focus-visible {
    outline: 3px solid #174c8c;
    outline-offset: 4px;
}

.challenge-card-heading {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.1rem 0.5rem;
    min-width: 0;
}

.challenge-card-title {
    margin: 0;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.challenge-result-badge {
    display: inline-block;
    padding: 0.1em 0.5em;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.2;
}

.challenge-result--won {
    background: #d9f2d9;
    color: #14532d;
}

.challenge-result--lost {
    background: #f8d7da;
    color: #7f1d1d;
}

.challenge-result--fled {
    background: #e5e7eb;
    color: #333;
}

.challenge-card-subtitle {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.1rem 0.75rem;
    margin: 0;
    min-width: 0;
}

.challenge-card-subtitle p {
    margin: 0;
    padding: 0;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.challenge-participants {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.1rem 0.6rem;
    margin: 0.35rem 0 0;
    padding: 0.3rem 0 0;
    border-top: 1px solid #bbb;
    list-style: none;
}

.challenge-participants > li {
    padding: 0;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.challenge-card-versus {
    font-style: italic;
}

.challenge-no-participants {
    margin: 0.35rem 0 0;
    padding: 0.3rem 0 0;
    border-top: 1px solid #bbb;
    line-height: 1.2;
}

@media (max-width: 40rem) {
    .challenge-card-link {
        padding: 0.4rem 0.5rem;
    }
}

.playerOptions{
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    align-content: stretch;
    justify-content: space-evenly;
}
    .playerOptions .smallCard{
        display: flex;
        flex-direction: column-reverse;
        height: 7rem;
        align-items: center;
        align-content: center;
        justify-content: space-between;
        width: 4rem;
    }
        .playerOptions .smallCard label{
            display: flex;
            flex-direction: column;
        }
            .playerOptions .smallCard label .fit-picture {
                margin:0;
            }


.playerInfo{    
    display: flex;
    flex-direction: column;
    align-content: center;
    align-items: center;
    width: calc(82px + 4em);
    height: 10em;
    padding-left: 1rem;
    padding-top: 0.25rem;
}

.playerInfo h2{
    padding: 0;
    margin: 0;
    padding-bottom: 0.25rem;
}
.createButton {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--create-button-background);
    position: relative;
    border-radius: 0.5rem;
    border: 3px solid black;
    box-shadow: 1px 1px 1px 1px black;
    max-height: 6rem;
    max-width: 10rem;
}
    .createButton::before{
        content: '+';
        font-size:2rem;
        font-weight: 600;
        padding-top: 1rem;
    }
    .createButton a, .createButton button{
        padding: 1rem;
        padding-top: 0;
        text-align: center;
        font-size: 0.85rem;
        border: none;
        background: none;
        font-weight: 500;
        cursor: pointer;
        font-family: unset;
    }
    .createButton a::before, .createButton button::before{
        content: '';
        position: absolute;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        border-radius: 0.5rem;
    }
    .createButton:hover, .createButton:active, .createButton:focus-within{
        background: var(--create-button-background-highlight);
    }
    .createButton:active{
        box-shadow: unset;
        left:2px;
        top:2px;
    }
    .createButton:focus-within{
        outline: auto;
        outline-offset: 6px;
    }
    .createButton:focus-within:active{
        outline: auto;
        outline-width: 2px;
        outline-offset: 0.2rem;
    }
    .createButton a:focus, .createButton button:focus{
        outline:0;
    }

a.backlink{
    font-weight: 800;
    &::before{
        content: '←';
        padding: 0;
        font-size: 1.5rem;
    }
}

.invisible{
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}