.cns-frontend-wrapper {
    position: relative;
    width: 100%; /* Added to fix auto-length scaling */
    box-sizing: border-box; /* Added to stop horizontal stretching */
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.cns-search-bar {
    position: relative;
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 9999px;
    padding: 0 8px; /* Adjusted padding to rely on the dynamic height */
    box-sizing: border-box; /* Added to stop horizontal stretching */
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    border: 1px solid #eaeaea;
    transition: box-shadow 0.3s ease;
}
.cns-search-bar:focus-within {
    box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}
.cns-icon {
    width: 20px;
    height: 20px;
    color: #888;
    margin: 0 16px;
    flex-shrink: 0;
}
.cns-arrow-icon {
    color: #000;
    cursor: pointer;
    background: #f4f4f4;
    border-radius: 50%;
    padding: 8px;
    width: 36px;
    height: 36px;
    box-sizing: border-box;
    transition: background 0.2s;
    flex-shrink: 0;
}
.cns-arrow-icon:hover {
    background: #e0e0e0;
}
#cns-search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 18px;
    height: 100%; /* Ensures input fills the new dynamic height */
    padding: 0;
    color: #111;
    outline: none;
    width: 100%;
}
#cns-search-input::placeholder {
    color: #aaa;
}
.cns-results-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
}
.cns-results-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.cns-result-item {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}
.cns-result-item:last-child {
    border-bottom: none;
}
.cns-result-item:hover {
    background: #f9fafb;
}
.cns-result-img {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background-size: cover;
    background-position: center;
    margin-right: 16px;
    flex-shrink: 0;
}
.cns-result-text h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: #111;
}
.cns-result-text p {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}