﻿/*
 * IntegraciÃ³n PoC del buscador global de la Master Page ANE.
 * Todas las reglas estÃ¡n encapsuladas bajo #searchContainer.
 * No modifica estilos generales de SharePoint, Bootstrap ni de pÃ¡ginas de contenido.
 */
#SearchBox {
    top: 0 !important;
	transform: translate(100%, -10vh) !important;
    }

#searchContainer {
    position: relative;
}

#searchContainer .ane-search-adapter__panel[hidden] {
    display: none !important;
}

#searchContainer .ane-search-adapter__panel {
    position: absolute;
    z-index: 10000;
	/*top: calc(100% + 6px);*/
    right: 0;
    left: 0;
    max-height: min(65vh, 520px);
    overflow-x: hidden;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #c9d4de;
    border-radius: 6px;
    box-shadow: 0 12px 30px rgba(16, 24, 40, 0.18);
    color: #333333;
    text-align: left;
    transform: translate(70%, -10vh);
    }

#searchContainer .ane-search-adapter__status {
    margin: 0;
    padding: 10px 14px;
    color: #5c6670;
    background: #ffffff;
    font-size: 0.8rem;
    line-height: 1.4;
}

#searchContainer .ane-search-adapter__status:empty {
    display: none;
}

#searchContainer .ane-search-adapter__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

#searchContainer .ane-search-adapter__item {
    margin: 0;
    padding: 0;
    border-top: 1px solid #e5eaee;
}

#searchContainer .ane-search-adapter__option {
    display: block;
    width: 100%;
    padding: 11px 14px;
    border-left: 4px solid transparent;
    background: #ffffff;
    color: #333333;
    cursor: pointer;
    text-align: left;
}

#searchContainer .ane-search-adapter__option:hover,
#searchContainer .ane-search-adapter__option[aria-selected="true"] {
    border-left-color: #004884;
    background: #eaf2fb;
}

#searchContainer .ane-search-adapter__type {
    display: block;
    margin-bottom: 3px;
    color: #006b49;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

#searchContainer .ane-search-adapter__title {
    display: block;
    color: #004884;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.35;
}

#searchContainer .ane-search-adapter__summary {
    display: -webkit-box;
    margin-top: 3px;
    overflow: hidden;
    color: #5c6670;
    font-size: 0.76rem;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

#searchContainer .ane-search-adapter__all {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 14px;
    border-top: 1px solid #c9d4de;
    background: #ffffff;
    color: #004884;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
}

#searchContainer .ane-search-adapter__all:hover {
    background: #f5f8fb;
    text-decoration: underline;
    text-underline-offset: 3px;
}

#searchContainer .ane-search-adapter__all:focus-visible,
#searchContainer input[id$="_sbox"]:focus-visible {
    outline: 3px solid #ffbf47;
    outline-offset: 2px;
}

@media only screen and (max-width: 700px) {
    #searchContainer .ane-search-adapter__panel {
        top: calc(100% + 4px);
        max-height: 55vh;
    }

    #searchContainer .ane-search-adapter__summary {
        display: none;
    }
    .header-two #SearchBox {
        position: fixed;
        transform: translate(5vh, 10vh);
        left: 20% !important;
        margin-bottom: 25px;
    }
}

@media (forced-colors: active) {
    #searchContainer .ane-search-adapter__panel,
    #searchContainer .ane-search-adapter__option {
        border: 1px solid CanvasText;
    }

    #searchContainer .ane-search-adapter__option[aria-selected="true"] {
        outline: 2px solid Highlight;
        background: Highlight;
        color: HighlightText;
    }
}

@media (prefers-reduced-motion: reduce) {
    #searchContainer .ane-search-adapter__panel,
    #searchContainer .ane-search-adapter__option {
        scroll-behavior: auto;
    }
}
