
/* Container with fixed dimensions to prevent layout shift */
.search-container {
    position: relative;
    /* Fixed height container */
}

.search-input-box {
    position: relative;
}

.search-input {
    width: 100%;
    height: 100%;
    padding: 12px 40px 12px 20px;
  
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.search-input:focus {
    border:none;
    outline: none;
}

/* .header_1_search_icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
} */

/* Typed search box with fixed dimensions */
.typed-search-box {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    height: 0;
    /* Start collapsed */
    overflow: scroll;
    background: white;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    transition:
        height 0.3s ease,
        opacity 0.3s ease;
}

.typed-search-box.visible {
    height: 200px;
    /* Fixed initial height */
    opacity: 1;
    overflow-y: auto;
}

/* Content containers - all initially hidden */
.search-preloader,
.search-nothing,
.search-content {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 10px 0px;
    box-sizing: border-box;
    overflow-x: hidden !important;
}

.search-preloader.visible,
.search-nothing.visible,
.search-content.visible {
    display: block;
}

/* Preloader positioned in center */
.search-preloader {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: auto;
    /* Auto height for proper centering */
}


.dot-loader {
    display: flex;
    justify-content: center;
    align-items: center;
}

.dot-loader div {
    width: 10px;
    height: 10px;
    margin: 0 5px;
    background-color: var(--primary);
    border-radius: 50%;
    animation: dot-loader 0.6s infinite alternate;
}

.dot-loader div:nth-child(2) {
    animation-delay: 0.2s;
}

.dot-loader div:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dot-loader {
    to {
        opacity: 0.3;
        transform: translateY(-10px);
    }
}

/* No results message */
.search-nothing {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #666;
}


.search-result-item {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-result-item:hover {
    background-color: #f9f9f9;
}

.search-result-item h4 {
    margin: 0 0 5px 0;
    color: #333;
}

.search-result-item p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.error-message {
    color: #d9534f;
    text-align: center;
    padding: 10px;
}
