/* Busca global: gatilho e folha no mobile (viewport drawer) */

.mobileSearchTrigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    font-size: 18px;
}

.backdrop {
    position: fixed;
    inset: 0;
    z-index: 1055;
    background: rgba(0, 0, 0, 0.45);
    animation: globalSearchFadeIn 0.2s ease;
}

@keyframes globalSearchFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.sheet {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1056;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: calc(8px + env(safe-area-inset-top, 0px)) 12px 12px;
    background: var(--surface, #fff);
    border-bottom: 1px solid var(--border-light, #f0f0f0);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
    animation: globalSearchSlideDown 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes globalSearchSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sheetCloseBtn {
    flex-shrink: 0;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 44px !important;
    min-height: 44px !important;
}

.sheetInput {
    flex: 1;
    min-width: 0;

    :global(.ant-select),
    :global(.ant-select-auto-complete),
    :global(.global-search-autocomplete) {
        width: 100% !important;
        max-width: none !important;
    }
}

:global(.dark) .sheet {
    background: #141414;
    border-bottom-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

@media (prefers-reduced-motion: reduce) {
    .backdrop,
    .sheet {
        animation: none;
    }
}

.desktopSearch {
    width: 100%;
    min-width: 0;
    max-width: 300px;
}

/*
 * Saídas do modo escopado a um projeto (ir à página de resultados, ampliar para o
 * sistema). São opções da lista, e não botões próprios, porque handlers de clique
 * dentro do popup do antd não recebem o evento nesta stack.
 */
.acaoEscopo,
.acaoEscopoSecundaria {
    padding: 4px 0;
}

.acaoEscopo {
    font-weight: 500;
    color: var(--primary-color, #1677ff);
}

.acaoEscopoSecundaria {
    color: var(--text-secondary, rgba(0, 0, 0, 0.45));
}
