@use '../../design-system' as *;

.backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 10;

    #{$selector-darkmode} & {
        background: rgba(12, 17, 26, 0.4);
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
    }
}

.backdropEnter {
    animation: fadeIn 0.3s ease-in;
    opacity: 1;
}

.backdropExit {
    animation: fadeOut 0.3s ease-out;
    opacity: 0;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes fadeOut {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

.container {
    --input-height: 76px;
    --controls-height: 66px;
    --container-height: calc(100vh - 180px);

    position: fixed;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 850px;
    max-width: calc(100vw - #{$spacing-size-8});
    max-height: var(--container-height);
    background: var(--color-bg-primary);
    border-radius: 12px;
    box-shadow: 0px 25px 50px -12px rgba(16, 24, 40, 0.25);
    overflow: hidden;

    @media screen and (min-width: $breakpoint-docs-search-small) {
        --container-height: calc(100vh - 100px);
    }

    #{$selector-darkmode} & {
        background: color-mix(in srgb, var(--color-bg-primary), var(--color-fg-primary) 6%);
    }
}
