/*========== Пошук по навігації ==========*/
.navi-search-wrapper {
    position: relative;
    width: 100%;
    padding: 8px 8px;
    border-bottom: 1px solid #ec9f0d;
    box-sizing: border-box;
}

.navi-search-input {
    width: 100%;
    padding: 6px 6px 6px 6px;
    font-size: 14px;
    border-radius: 4px;
    border: none;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    box-shadow:
            0 2px 1px rgba(17, 124, 189, 0.34),
            inset 0 0 0 1px rgba(17, 124, 189, 0.43);
    transition: all 0.3s ease;
    color: #1a365d;
}



.navi-search-input:focus {
    outline: none;
    box-shadow:
            0 2px 3px rgba(236, 159, 13, 0.6),
            inset 0 0 0 1px rgba(236, 159, 13, 0.6);
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
}


.navi-search-clear {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    background: none;
    border: none;
    width: 24px;
    height: 24px;
    font-size: 16px;
    color: #999;
    cursor: pointer;
    z-index: 1;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.navi-search-clear:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
    color: #222;
}


/* Анімація появи результату */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.navi-search-results {
    position: absolute;
    top: 42px;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #fff;
    border: 1px solid #ccc;
    overflow-y: auto;
    overflow-x: hidden;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 6px;
    backdrop-filter: blur(12px);
    box-shadow:
            0 8px 32px rgba(0, 0, 0, 0.1),
            0 2px 8px rgba(0, 0, 0, 0.06);
    max-height: 400px;

    animation: slideIn 0.25s ease-out;
    display: none;
}



.navi-search-result {
    display: flex;
    align-items: center;
    position: relative;
    padding: 6px 6px 6px 36px;
    border-bottom: 2px dashed rgb(51 51 51 / 23%);
    font-size: 14px;
    min-height: 18px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.navi-level-box {
    position: absolute;
    top: 0;
    left: 0;
    width: 28px;
    height: 100% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e0e0e0;
    border-radius: 4px 0 0 4px;
    opacity: 0.9;
    pointer-events: none;
    box-sizing: border-box;
}


.navi-level-box-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2px;
}

.navi-level-text {
    font-size: 10px;
    color: #333;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    line-height: 1;
}

.navi-level-number {
    font-size: 12px;
    font-weight: bold;
    color: #000;
}


/* Фарбування за рівнями */
.navi-search-result.depth-1 .navi-level-box { background-color: #d0e7ff; }
.navi-search-result.depth-2 .navi-level-box { background-color: #d9f6dd; }
.navi-search-result.depth-3 .navi-level-box { background-color: #fff3cd; }

.navi-search-result.depth-1 .navi-level-text,
.navi-search-result.depth-1 .navi-level-number {
    color: #003366; /* темно-синій */
}

.navi-search-result.depth-2 .navi-level-text,
.navi-search-result.depth-2 .navi-level-number {
    color: #1b5e20; /* темно-зелений */
}

.navi-search-result.depth-3 .navi-level-text,
.navi-search-result.depth-3 .navi-level-number {
    color: #7a5200; /* темно-коричневий/гірчичний */
}


.navi-search-result:last-child {
    border-bottom: none;
}

.navi-search-result:hover {
    background: #f1f5ff;
    transform: scale(1.02);
}

.navi-search-result-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    flex-shrink: 0;
}

.navi-search-result.inactive {
    color: #aaa;
    cursor: default;
}

.navi-search-result.inactive span {
    pointer-events: none;
}

.navi-search-result.inactive:hover {
    background: none;
}


.navi-search-result.active {
    background-color: #dceeff !important;
    transform: scale(0.98);
}


.path-part:last-of-type {
    font-weight: bold !important;
    color: #0f2fa9 !important;
}

.path-part.path-not-last {
    color: #03131c;
    font-weight: 400;
}

.navi-search-result mark {
    background-color: #ffe066;
    color: #000;    
    border-radius: 2px;
    font-weight: bold;
}

/* Стилізація скролбару в результатах пошуку */
#naviSearchResults::-webkit-scrollbar {
    width: 8px;
}

#naviSearchResults::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#naviSearchResults::-webkit-scrollbar-thumb {
    background: rgba(17, 124, 189, 0.91) !important;
    border-radius: 4px;
}

#naviSearchResults::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Firefox */
#naviSearchResults {
    scrollbar-width: thin;
    scrollbar-color: rgba(17, 124, 189, 0.91) #f1f1f1;
}




