html {
    font-size: 14px;
}

body {
    padding-top: 4.5rem;
}

/* iOS hack */

.min-vh-100 {
    @supports (-webkit-touch-callout: none) {
        /* iOS only */
        height: -webkit-fill-available;
    }
}

/* Custom HTMX indicator: */

[data-loading] {
    display: none;
}

.spinner-indicator {
    display: none;
}

.htmx-request .spinner-indicator {
    display: inline-block;
}

.htmx-request.spinner-indicator {
    display: inline-block;
}

.block-indicator {
    display: none;
}

.htmx-request .block-indicator {
    display: block;
}

.htmx-request.block-indicator {
    display: block;
}

.gallery .card .card-title a {
    color: var(--bs-body-color);
    text-decoration: none;
    font-weight: bold;
}

.gallery .card .card-image {
    overflow: hidden;
    height: 12rem;
    flex-shrink: 0;
}

.gallery .card .card-image img {
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}

.gallery .card .card-image img:hover {
    transform: scale(1.1);
}

.gallery .card.unlisted .card-title, .gallery .card.unlisted .card-text {
    text-decoration: line-through;
}

.gallery .card.unlisted .card-img, .gallery .card.unlisted .card-body {
    filter: grayscale(1);
}

.patch-detail-img {
    width: 100%;
    object-fit: cover;
}

/* Hack to maintain aspect ratio from https://stackoverflow.com/a/54924505 */
.youtube_container {
    max-width: 1920px;
    aspect-ratio: 16 / 9;

    box-sizing: border-box;
    border-radius: 7px;
    border: 7px solid $black;
    background: $black;

    margin: 0 auto;

    position: relative; /* So that iframe can be absolute */
}

.youtube_container iframe, .youtube_container video {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
}

.patch-edit div#id_tags {
    display: flex;
    gap: 2em;
    flex-wrap: wrap;
}

.card-image .badge-tl {
    position: absolute;
    top: 1em;
    left: 1em;
}

.card-image .badge-tr {
    position: absolute;
    top: 1em;
    right: 1em;
}

.user-early-bird {
    color: var(--bs-success-text-emphasis);
}
