/* BANNER */

.banner-wrapper {
    display: flex;
    justify-content: center;
    position: relative;
    font-size: clamp(0.5rem, 3vw, 0.75rem);
    /* aspect-ratio: 9 / 16; */
    margin-bottom: 5em;
}

@media (width<768px) {
    .banner-wrapper {
        margin-bottom: 0;
    }
}

.banner-wrapper:has(img) {
    font-size: clamp(0.5rem, 2.5vw, 0.75rem);
}

.banner-title {
    width: 90%;
    position: absolute;
    left: 45%;
    /* top: 55%; */
    transform-origin: top;
    transform: translate(-50%);
    transform: translate(-50%, 100vw);
    padding: 1em;
    z-index: 1;
}

.banner-title.left-line {
    border-left: 0.8em solid var(--secondary-background-color);
}

/* 
.banner-title.bottom {
    top: 80%;
} */

.banner-title>h1 {
    font-size: 1.7em;
    line-height: 1.25em;
    text-wrap: nowrap;
    font-weight: 500;
    margin: 0;
}

.banner-title>h1>span.bold {
    font-size: 1.8em;
    line-height: 1.5em;
    text-wrap: inherit;
}

.banner-wrapper:has(.gray) {
    overflow-x: clip;
}

.banner-title .gray {
    position: relative;
}

.banner-title .gray:not(.bold) {
    font-size: inherit;
}

.banner-title .gray::before {
    content: "";
    background-color: var(--secondary-background-color);
    position: absolute;
    top: -0.1ch;
    bottom: -0.1ch;
    left: -100vw;
    right: -100vw;
    z-index: -1;
}

.banner-media {
    width: 100%;
    height: 100%;
    position: relative;
}

.banner-media>video,
.banner-media>img {
    width: 100%;
    height: 80%;
    object-fit: cover;
}

.banner-media.long+.banner-title {
    background-color: red;
}

.banner-media.long {
    overflow: hidden;
}

.banner-media.long>img {
    width: 180%;
}

.banner-media::before {
    content: "";
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.1s ease-out;

    position: absolute;
    width: 100%;
    height: 100%;
}

.banner-wrapper:has(img):is(:hover)>.banner-media::before {
    opacity: 1;
    visibility: visible;
}

.banner-wrapper:has(img):is(:hover)>.banner-media.long::before {
    width: 180%;
}

.banner-title .fade {
    opacity: 1;
    transition: opacity 0.75s ease-in-out;
}

.banner-media .fade {
    opacity: 1;
    transition: opacity 0.25s ease-in-out;
}

.banner-title .hidden,
.banner-media .hidden {
    opacity: 0;
}

.banner-media>.mb {
    display: block;
}

.banner-media>.pc {
    display: none;
}

/* SEARCHBAR */

.searchbar-wrapper {
    width: 34ch;
    position: absolute;
    bottom: -1.75rem;
    left: 3.5em;
    min-width: 33ch;
}

.searchbar-wrapper::before {
    --_icon-size: 1em;
    content: "";
    background-image: url(../svg/icon_lupita_navegador.svg);
    background-repeat: no-repeat;
    width: var(--_icon-size);
    height: var(--_icon-size);
    position: absolute;
    left: 0.5em;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

#searchbar-input {
    width: 100%;
    font-size: 1rem;
    padding: 0.5em 2em;
    padding-left: 2.75em;
    border: none;
    border-bottom: 2px solid var(--company-color1);
    text-overflow: ellipsis;
}

#searchbar-input:hover {
    border-color: var(--company-color3);
}

#chemical-list {
    margin: 0;
    padding: 0;
    font-size: 0.9rem;

    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.1s;

    overflow-y: auto;
    overflow-x: hidden;
    max-height: 13.5ch;
    position: absolute;
    left: 0;
    right: 0;
    z-index: 1;

    background-color: #f2f2f2;
    color: #a7a9ac;
}

#results-loading>span::after {
    content: " ";
    animation: dots 1.5s steps(3) infinite;
}

@keyframes dots {
    0% {
        content: "";
    }

    33% {
        content: ".";
    }

    66% {
        content: "..";
    }

    100% {
        content: "...";
    }
}

#chemical-list>li>* {
    display: block;
    width: 100%;
    color: inherit;
    text-align: start;
    font-weight: 400;
    font-size: 0.9em;
    padding: 0.35em 2.5em;
}

#searchbar-input:focus+#chemical-list,
#chemical-list:hover,
#chemical-list:focus-within {
    opacity: 1;
    visibility: visible;
}

@media (width>=425px) {
    .banner-wrapper {
        font-size: clamp(0.75rem, 3vw, 1.2rem);
    }

    .banner-wrapper:has(img) {
        font-size: clamp(0.75rem, 2.5vw, 1.2rem);
    }
}

@media (width>=768px) {
    .banner-wrapper {
        justify-content: end;
        aspect-ratio: unset;
        font-size: 0.75rem;
    }

    .banner-wrapper:has(img) {
        font-size: 0.55rem;
    }

    .banner-title {
        transform-origin: unset;
        width: auto;
        left: 1em;
        top: 50%;
        transform: translateY(-50%);
    }

    .banner-title.bottom {
        top: 80%;
    }

    .banner-title .gray::before {
        content: unset;
    }

    .banner-media>video,
    .banner-media>img {
        height: 100% !important;
    }

    .banner-media::before {
        height: 100% !important;
    }

    .banner-media.long>img {
        width: 100% !important;
    }

    .banner-media.long::before {
        width: 100% !important;
    }

    .banner-media>.mb {
        display: none;
    }

    .banner-media>.pc {
        display: block;
    }

    .searchbar-wrapper {
        bottom: -3rem;
        left: 0em;
    }
}

@media (width>=1024px) {
    .banner-wrapper {
        font-size: clamp(0.9rem, 3vw, 1rem);
    }

    .banner-wrapper:has(img) {
        font-size: clamp(0.8rem, 1vw, 1rem);
    }

    .banner-title {
        top: 50%;
    }

    .banner-title.bottom {
        top: 80%;
    }
}

@media (width>=1440px) {
    .banner-wrapper {
        font-size: 1.25rem;
    }

    .banner-wrapper:has(img) {
        font-size: 1rem;
    }
}

@media (width>=1920px) {
    .banner-wrapper {
        font-size: 1.5rem;
        max-height: 750px;
    }

    .banner-wrapper:has(img) {
        font-size: 1.25rem;
    }

    .banner-title {
        left: 5%;
    }

    .banner-title.bottom {
        top: 80%;
    }

    .banner-media {
        width: 100%;
    }
}