/* Should be more comfortable on small screens. I hope. */

/* The regular sections. */

.text-container,
.changelog-container,
.page-home .weekly-container,
.page-home .meta-container {
    background: var(--color-section-background, var(--color-background-hover));
    border-radius: 20px;
    padding: 1.25rem 1rem;
}

.page-home .home-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.text-container {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.changelog-container {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.changelog-container h2 {
    text-align: left;
}

.changelog-container .error {
    padding: 1rem;
    background-color: var(--color-error);
    color: var(--color-on-error);
    border-radius: 0.5rem;
}

.changelog-content {
    flex: 1;
    min-height: 0;
    display: flex;
}

ol.changelog {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0;
    text-align: left;
    gap: 1rem;
}

.changelog-container ol.changelog p {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.4;
}

ol.changelog li p {
    margin: 0;
}

/* Pagination */

.pagination {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    justify-content: center;
}

.pagination button.btn {
    padding: 0.6rem 0.85rem;
    min-width: 2.75rem;
}

.pagination .btn {
    border: 2px solid var(--color-primary);
    background: transparent;
    color: var(--color-on-background);
    box-shadow: none;
}

.pagination .btn:disabled {
    border-color: var(--color-background-hover);
}

.pagination .btn.active {
    background: var(--color-primary);
    color: var(--color-on-primary);
}

.pagination .btn span {
    font-size: 20px;
}

/* Num input (applies to roulette page) */

input[type="number"] {
    text-align: center;
    background: transparent;
    border-radius: 10px;
    padding: 0;
    font-size: 1rem;
    font-weight: 200;
    font-family: 'Lexend Deca';
    appearance: textfield;
    -webkit-appearance: none;
    -moz-appearance: textfield;
    min-width: 50px;
    height: 100%;
    border: 2px solid var(--color-primary);
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pagination input[type="number"] {
    height: auto;
    align-self: stretch;
    min-height: 2.75rem;
}

/* Weekly alongside the staff */

.page-home .side-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Vid scales with box */
.page-home .weekly-demon__video {
    display: block;
    width: 100%;
    max-width: 28rem;
    margin-inline: auto;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 0.5rem;
    background: #000;
}

.page-home .weekly-demon__name {
    align-self: center;
    padding: 0 0 0.3rem;
    border: 0;
    background: none;
    color: inherit;
    text-align: center;
    text-decoration: underline dotted;
    text-underline-offset: 0.25em;
    cursor: pointer;
}

.page-home .weekly-demon__name:hover {
    color: #af84ff;
    text-decoration-style: solid;
}

.page-home .weekly-demon__name:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 4px;
    border-radius: 0.25rem;
}

.page-home .weekly-demon__info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-wrap: anywhere;
}

/* The staff */

.page-home .meta {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 1.5rem;
    text-align: center;
    justify-content: center;
}

.page-home .meta .errors {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.page-home .meta .errors .error {
    padding: 1rem;
    background-color: var(--color-error);
    color: var(--color-on-error);
    border-radius: 0.5rem;
}

.page-home .meta h2 {
    text-align: center;
}

.page-home .meta .editors {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
    gap: 1.25rem 1rem;
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
}

.page-home .meta .editors li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    min-width: 0;
    overflow-wrap: anywhere;
}

.page-home .meta .editors li img {
    flex: none;
    height: 1.5rem;
    cursor: help;
}

.page-home .meta .editors li a:hover {
    text-decoration: underline;
    text-decoration-thickness: calc(14%);
    color: #af84ff;
}

.og {
    display: flex;
    justify-content: flex-end;
}

/* (>= 1025px) */

@media (min-width: 1025px) {
    main.page-home {
        grid-template-columns: minmax(16rem, 2fr) minmax(16rem, 1fr);
        grid-template-rows: auto;
        gap: 0 2rem;
        height: auto;
        flex: 1 0 auto;
        padding-inline: 1rem;
    }

    .page-home .home-container {
        grid-column: 1;
        gap: 0;
    }

    .text-container {
        margin-block: 1rem;
        padding: clamp(1rem, 3vw, 1.5rem) clamp(1rem, 4vw, 2rem);
    }

    .changelog-container {
        margin-block: 0.75rem;
        padding: 1.5rem 2rem;
    }

    .page-home .side-container {
        grid-column: 2;
        align-self: start;
        gap: 2rem;
        min-height: calc(100vh - 6rem);
        margin-block: 1rem;
    }

    .page-home .weekly-container,
    .page-home .meta-container {
        padding: 2rem 1.5rem;
    }

    .page-home .meta-container {
        display: flex;
        flex-direction: column;
        flex: 1;
    }

    .page-home .meta {
        gap: 2rem;
    }

    .page-home .meta .editors {
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
    }

    .pagination {
        margin-top: 2.5rem;
    }

    .pagination button.btn {
        padding: 1rem;
    }
}

/* :3 */
