﻿.kttnn-sijesyon {
    max-height: 280px;
    opacity: 0;
    pointer-events: none;
    padding: 0;
    overflow-y: auto;
}
.search-input-box.active .kttnn-sijesyon {
    opacity: 1;
    pointer-events: auto;
    padding: 10px 8px;
}
.search-input-box.active .kttnn-sijesyon li {
    display: block;
}
.kttnn-sijesyon li {
    list-style: none;
    width: 100%;
    padding: 8px 12px;
    border-radius: 5px;
    display: none;
}
.kttnn-sijesyon li:hover {
    background-color: #414b57;
}
.chache-kontainer {
    display: flex;
    align-items: center;
    margin: 0 10px;
}
.search-icon-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #fff;
    transition: all 0.2s ease;
}
.search-icon-btn:hover {
    opacity: 0.8;
}
/*chèche estil subnavigasyon */
.search-subnav {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    padding: 15px 0;
    transform: translateY(-100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    max-height: calc(100vh - 50px);
    /*overflow-y: auto;*/
    opacity: 0;
    visibility: hidden;
    background-color: #6d28d6;
}
.search-subnav.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}
.chache-fom-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 15px;
    position: relative;
}
/* Anviwònman reponsif yo */
@media (max-width: 768px) {
    .chache-fom-container {
        padding: 0 10px;
    }
    #search-input {
        font-size: 13px;
    }
}
.subnav {
    background-color: #f8f8f8;
    border-bottom: 1px solid #e7e7e7;
    padding: 10px 0;
    margin-bottom: 20px;
    position: fixed;
    width: 100%;
    top: 50px;
    z-index: 1000;
}
/* Stil motè chèche */
.chache-kontainer {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}
.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
#search-input {
    width: 100%;
    padding: 8px 40px 8px 15px;
    border: 1px solid #ddd;
    outline: none;
    background: white;
    transition: all 0.3s ease;
    font-size: 14px;
}
#search-input:focus {
    border-color: #6d28d6;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}
.search-icon-btn {
    background: none;
    border: none;
    padding: 18px;
    cursor: pointer;
    right: 0;
    top: 50%;
    transition: all 0.2s ease;
}
#search-close {
    right: 9px;
    color: #ff0000;
    display: none;
    transform: translateY(-50%);
    padding-inline-end: 1px;
    position: absolute;
}
#search-btn {
    color: #ffffff;
}
/* Estilos responsive */
@media (max-width: 768px) {
    .navbar-header {
        float: none;
    }
    .navbar-toggle {
        display: block;
        margin-right: 1px;
    }
    .navbar-collapse {
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: none;
    }
    .navbar-collapse.collapse {
        display: none !important;
    }
    .navbar-collapse.collapse.in {
        display: block !important;
    }
    .navbar-nav {
        float: none !important;
        margin: 7.5px 0;
    }
    .navbar-nav>li {
        float: none;
    }
    .navbar-nav>li>a {
        padding: 10px 15px;
    }
    /* Ajustes de la subnav en móvil */
    .subnav {
        padding: 5px 10px;
    }
    .chache-kontainer {
        margin: 0 10px;
    }
    #search-input {
        font-size: 13px;
    }
}
/* Hover effects */
.nav-item a:hover,
.nav-item a:focus {
    background-color: rgba(255, 255, 255, 0.1);
}
.search-icon-btn:hover {
    opacity: 0.8;
}
@media (max-width: 768px) {
    #search-btn {
        display: none !important;
    }
}
@media (min-width: 769px) {
    #search-btn-mobile {
        display: none !important;
    }
}
#search-btn-mobile {
    margin-left: 1px;
}
.autocomplete-sijesyon {
    position: absolute;
    background: white;
    border: 1px solid #ccc;
    max-height: 200px;
    overflow-y: auto;
    width: 100%;
    z-index: 999;
}
.autocomplete-suggestion {
    padding: 8px 12px;
    cursor: pointer;
}
.autocomplete-suggestion:hover {
    background-color: #f0f0f0;
}
/* Hide language names by default on desktop */
#selected-lang {
    display: none;
}

/* Show language names only on mobile */
@media (max-width: 768px) {
    #selected-lang {
        display: inline;
    }
}



/* Contenedor del input + resultados */
.dropdown {
    position: relative;         /* clave para posicionar el dropdown */
    min-height: 0;              /* por si el padre es flex: permite que el hijo haga scroll */
}

/* Panel de resultados */
.search-results {
    position: absolute;
    top: 100%;
    /* sin translateX para evitar bugs en WebKit/Brave*/
    left: 0;
    right: 0;
    margin-top: 4px;
    background: #fff;
    max-width: 600px;
    width: 100%;
    border-radius: 6px;
    box-shadow: 0px 13px 10px 0px rgb(91 1 242 / 73%);
    z-index: 1000;

    /* Claves para scroll estable */
    height: 400px;              /* usa height en vez de solo max-height */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;  /* iOS */
    overscroll-behavior: contain;
    scrollbar-gutter: stable both-edges;
    pointer-events: auto;
}

/* Scrollbars (no se verán personalizados en iOS por limitación del navegador) */
.search-results::-webkit-scrollbar { width: 8px; }
.search-results::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 8px; }
.search-results::-webkit-scrollbar-thumb { background: #6d28d2; border-radius: 8px; }
.search-results::-webkit-scrollbar-thumb:hover { background: #5b20b7; }

/* Firefox */
.search-results { scrollbar-width: thin; scrollbar-color: #6d28d2 #f1f1f1; }

/* Item */
.search-result-item {
    padding: 8px 10px;
    border-bottom: 1px solid #dbeafe;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}
.search-result-item:last-child {
    border-bottom: 1px solid blue;
}
.search-result-item:hover {
    background: rgba(109, 40, 210, 0.12);
    color: #111827;
}

/* Móvil */
@media (max-width: 768px) {
    .search-results {
        width: 95%;
        left: 50%;
        right: auto;
        transform: translateX(-50%);  /* en móviles suele ir bien */
        height: 50vh;                 /* más flexible en pantallas pequeñas */
    }
}
