/* FLAG ICON copio, per semplicità, il css di -gb con -en */
.flag-icon-en {
    background-image: url(https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/0.8.6/flags/4x3/gb.svg);
}

/* Global small-screen typography */
@media (max-width: 575.98px) {
    html {
        font-size: 15px;
    }

    body {
        font-size: 0.95rem;
    }
}

/* Signup: fields shown only for TBG client */
.extra-fields {
    display: none;
}

/* Circular progress component */
.progress-circle {
    width: var(--progress-circle-size, 120px);
    height: var(--progress-circle-size, 120px);
    border-radius: 50%;
    position: relative;
    display: grid;
    place-items: center;
}

.progress-circle-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.progress-circle-content {
    position: relative;
    z-index: 1;
}

.show-password-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/*
 * Mazer forces Bootstrap icons into a fixed box. That works for plain inline text,
 * but it shifts the glyph when the icon is a flex item or sits inside button content.
 */
.btn .bi,
.d-flex > .bi,
.d-inline-flex > .bi {
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    flex: 0 0 auto;
}

.btn .bi::before,
.d-flex > .bi::before,
.d-inline-flex > .bi::before {
    vertical-align: middle;
}

.ai-json-pre {
    white-space: pre-wrap;
    word-break: break-word;
    font-size: .8125rem;
    margin-bottom: 0;
}

/* Mazer targets input icons rendered as i/svg; project tags render Bootstrap icons as em.bi */
.form-group[class*=has-icon-] .form-control-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.form-group[class*=has-icon-] .form-control ~ .form-control-icon,
.form-group[class*=has-icon-] .form-select ~ .form-control-icon {
    top: 50%;
    transform: translateY(-50%);
}

.form-group[class*=has-icon-] .form-control-icon .bi {
    width: 1.1rem;
    height: 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    font-size: 1.1rem;
    line-height: 1;
}

.form-group[class*=has-icon-] .form-control.form-control-xl ~ .form-control-icon .bi {
    width: 1.2rem;
    height: 1.2rem;
    color: #a6a8aa;
    font-size: 1.2rem;
}

.form-group[class*=has-icon-] .form-control-icon .bi::before {
    vertical-align: middle;
}

.form-group[class*=has-icon-] .form-control:focus ~ .form-control-icon .bi {
    color: #5a8dee;
}

/*
 * Utility to neutralize the fixed Mazer/Bootstrap Icons box only in the few
 * layouts that really need optical centering different from the default inline behavior.
 */
.bi-no-box {
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 0;
    display: inline-block;
    line-height: 1;
    flex: 0 0 auto;
}

.bi-no-box::before {
    vertical-align: middle;
}

/* section for form-submit-guard */
.submit-guard-submitting {
    cursor: progress;
}

.admin-rooms-filter-addon {
    min-width: 2.75rem;
}

.admin-rooms-filter-spinner {
    display: none;
}

.submit-guard-submitting .admin-rooms-filter-icon {
    display: none;
}

.submit-guard-submitting .admin-rooms-filter-spinner {
    display: inline-block !important;
}

.submit-guard-submitting button[type="submit"],
.submit-guard-submitting button:not([type]),
.submit-guard-submitting input[type="submit"],
button[aria-busy="true"],
input[aria-busy="true"] {
    cursor: progress;
}

button[aria-busy="true"] .spinner-border {
    flex: 0 0 auto;
}

[data-best-seller-visible-row] {
    will-change: transform, opacity;
}

[data-best-seller-dots] {
    min-height: .75rem;
}

.best-seller-slider-dot {
    width: .6rem;
    height: .6rem;
    border-radius: 999px;
    background-color: #cfd8e3;
    opacity: .8;
    transition: transform 180ms ease, background-color 180ms ease, opacity 180ms ease, box-shadow 180ms ease;
}

.best-seller-slider-dot.is-active {
    background-color: var(--bs-primary);
    opacity: 1;
    transform: scale(1.18);
    box-shadow: 0 0 0 .2rem rgba(var(--bs-primary-rgb), .16);
}

[data-best-seller-slider].best-seller-slider-is-animating [data-best-seller-prev],
[data-best-seller-slider].best-seller-slider-is-animating [data-best-seller-next],
[data-best-seller-slider].best-seller-slider-is-animating [data-best-seller-dots] {
    opacity: .65;
    pointer-events: none;
}

.best-seller-slider-row-leave-next {
    animation: best-seller-slider-row-out-next 180ms cubic-bezier(.4, 0, .2, 1) both;
}

.best-seller-slider-row-leave-prev {
    animation: best-seller-slider-row-out-prev 180ms cubic-bezier(.4, 0, .2, 1) both;
}

.best-seller-slider-row-enter-next {
    animation: best-seller-slider-row-in-next 320ms cubic-bezier(.22, 1, .36, 1) both;
}

.best-seller-slider-row-enter-prev {
    animation: best-seller-slider-row-in-prev 320ms cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes best-seller-slider-row-out-next {
    from {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }

    to {
        opacity: 0;
        transform: translate3d(-28px, 0, 0) scale(.985);
    }
}

@keyframes best-seller-slider-row-out-prev {
    from {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }

    to {
        opacity: 0;
        transform: translate3d(28px, 0, 0) scale(.985);
    }
}

@keyframes best-seller-slider-row-in-next {
    from {
        opacity: 0;
        transform: translate3d(28px, 0, 0) scale(.985);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

@keyframes best-seller-slider-row-in-prev {
    from {
        opacity: 0;
        transform: translate3d(-28px, 0, 0) scale(.985);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    [data-best-seller-visible-row] {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }

    .best-seller-slider-dot {
        transition: none !important;
    }
}
