body{
    margin: 0;
    overflow-x: hidden;
}

#sessions-container{
    width: 100vw;
}

.session-container{
    width: calc(100% - 70px);
    height: 40px;
    margin: 15px;
    padding: 10px;
    background-color: var(--accent);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);

    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    justify-content: space-between;
}

.session-code-button{
    user-select: none;
    text-align: center;
    width: 40px;
    margin-left: 20px;
    padding: 5px;
    padding-left: 7px;
    padding-right: 7px;
    border-radius: var(--border-radius);
    transition: background-color 0.2s, opacity 0.1s;
}
.session-code-button:hover{
    background-color: var(--border);
}
.session-code-button:active{
    background-color: var(--border);
    opacity: 0.8;
}

#code-background{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(3px) brightness(90%);

    opacity: 0;

    animation-name: close-code-window;
    animation-fill-mode: forwards;
    animation-duration: 0.2s;
}

#code-background.open{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(3px) brightness(90%);

    animation-name: open-code-window;
    animation-fill-mode: forwards;
    animation-duration: 0.2s;
}

#code-window{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    width: fit-content;
    height: 200px;
    
    background-color: var(--accent);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);

    padding: 10px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#code-window > code {
    width: fit-content;
    font-size: 12pt;
    padding: 5px;
    background-color: var(--border);
    border-radius: var(--border-radius);
    white-space: nowrap;
}

@keyframes open-code-window {
    from {
        opacity: 0;
        pointer-events: all;
    }
    to {
        opacity: 1;
    }
}
@keyframes close-code-window {
    from {
        opacity: 1;
        pointer-events: all;
    }
    to {
        opacity: 0;
        pointer-events: none;
    }
}

#code-window > a {
    margin-bottom: 20px;
    white-space: nowrap;
}

.session-status{
    margin-right: 20px;
}

.session-status.loading {
    display: flex;
    border-top: 4px solid var(--link);
    border-radius: 50%;
    height: 15px;
    width: 15px;
    animation: spin 2s linear infinite;
}

.session-status.good {
    display: flex;
    border: 1px solid var(--text);
    background-color: var(--good);
    border-radius: 50%;
    height: 20px;
    width: 20px;
}

.session-status.bad {
    display: flex;
    border: 1px solid var(--text);
    background-color: var(--bad);
    border-radius: 50%;
    height: 20px;
    width: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}