dialog {
    border: thin solid var(--bs-border-color);
    width: clamp(350px, 50%, 100%);
    border-radius: var(--bs-border-radius-xl);
    padding: var(--bs-border-radius-xl);
    -webkit-box-shadow: var(--bs-box-shadow);
    box-shadow: var(--bs-box-shadow);
    -webkit-transition: 500ms;
    transition: 500ms;

    &::-ms-backdrop {
        background-color: #00000059;
        backdrop-filter: blur(3px);
    }

    &::backdrop {
        background-color: #00000059;
        backdrop-filter: blur(3px);
    }

    @starting-style {
        translate: 0 50%;
        opacity: .3;
    }
}

select {
    -webkit-transition: 300ms;
    transition: 300ms;

    &:has(option[value='']:checked) {
        color: var(--bs-secondary);

        option:not([value='']) {
            color: var(--bs-body-color);
        }
    }

    option[value=''] {
        color: var(--bs-secondary);
    }
}

/*noinspection ALL*/
#images-gallery {
    display: -ms-grid;
    display: grid;
    -ms-grid-columns: 1fr .5rem 1fr .5rem 1fr .5rem 1fr .5rem 1fr .5rem 1fr;
    grid-template-columns: repeat(6, 1fr);
    -ms-grid-rows: 1fr .5rem 1fr .5rem 1fr .5rem 1fr .5rem 1fr;
    grid-template-rows: repeat(5, 1fr);
    grid-gap: .5rem;

    #galleryCarousel {
        -ms-grid-column: 2;
        -ms-grid-column-span: 5;
        grid-column: 2/7;
        -ms-grid-row: 1;
        -ms-grid-row-span: 5;
        grid-row: 1/6;
        border: thin solid var(--secondary-color);
        border-radius: var(--bs-border-radius);

        .carousel-item {
            position: relative;
            aspect-ratio: 1/1;

            img {
                position: absolute;
                left: 0;
                top: 0;
                width: 100%;
                height: 100%;
                max-width: unset;
                max-height: unset;
                -o-object-position: center;
                object-position: center;
                -o-object-fit: contain;
                object-fit: contain;
                pointer-events: none;
            }

            &:hover {
                img {
                    width: 200%;
                    height: 200%;
                }
            }
        }
    }

    .vertical-slides {
        -ms-grid-column: 1;
        grid-column: 1;
        -ms-grid-row: 1;
        -ms-grid-row-span: 5;
        grid-row: 1/6;
        position: relative;

        .action {
            position: absolute;
            inset-inline: 0;
            background: none;
            border: none;
            padding: .3em;
            background: #f0efe9ef;
            opacity: .2;
            -webkit-transition: 500ms;
            transition: 500ms;

            &.forward {
                bottom: 0;
            }

            &.backward {
                top: 0;
            }
        }

        &:hover {
            .action {
                opacity: 1;
            }
        }
    }

    /*noinspection ALL*/

    .thumbnails {
        height: 100%;
        width: 100%;
        overflow: auto;
        scroll-behavior: smooth;
        -ms-scroll-snap-type: y mandatory;
        scroll-snap-type: y mandatory;
        scroll-snap-stop: always;
        aspect-ratio: 1/5;

        img {
            opacity: .5;
            scroll-snap-align: start;
            width: 100%;
            aspect-ratio: 1/1;
            -o-object-fit: contain;
            object-fit: contain;
            -o-object-position: center;
            object-position: center;
            border-radius: 5px;
            cursor: pointer;
            border: thin solid var(--secondary-color);
            -webkit-transition: 300ms;
            transition: 300ms;
            margin-bottom: .5rem;

            &.active {
                opacity: 1;
            }
        }
    }
}

#action-bar {
    button:not(.btn) {
        border: none;
        background: none;
        padding: .3em .5em;
        -webkit-margin-end: .5rem;
        margin-inline-end: .5rem;
        -webkit-transition: 500ms;
        transition: 500ms;

        i {
            font-size: 1.2em;
        }

        &:hover {
            background: var(--bs-gray-400);
        }
    }
}

#tabs-container {
    .nav-link {
        color: inherit;
        opacity: .6;
        border: none !important;
        border-bottom: 2px solid transparent !important;

        &.active {
            background: none !important;
            font-weight: bold;
            opacity: 1;
            border-bottom-color: var(--secondary-color) !important;
        }
    }

    .tab-pane {
        background: #ffffff;
        padding: 1rem .5rem;
    }
}

#specifications {
    /*noinspection ALL*/

    .grid-table {
        display: -ms-grid;
        display: grid;
        -ms-grid-columns: -webkit-max-content auto;
        -ms-grid-columns: max-content auto;
        grid-template-columns: -webkit-max-content auto;
        grid-template-columns: max-content auto;

        > div {
            padding: .3rem .5rem;
            border-bottom: thin solid var(--bs-light);

            &:nth-child(2n+1) {
                font-weight: bolder;
            }

            &:nth-child(4n+1),
            &:nth-child(4n+2) {
                background: #ece8dc;
            }
        }
    }
}

.counter-container {
    background: #f5f3ed;

    > * {
        border-color: transparent;
        background: none !important;
        border-radius: unset;
    }
}

.rank-control {
    color: #FFD700;
    font-size: 1.2em;

    i {
        cursor: pointer;
    }
}
