/**
 * KltSearch Styles - Search and Autocomplete styling for orgnr.se
 *
 * Styles for the navbar search functionality including:
 * - Navbar brand transitions on mobile
 * - Search form expansion animations
 * - Autocomplete dropdown styling
 *
 * @author K L Torvanger
 * @version 1.0.0
 */

/* Navbar brand transition */
.navbar-brand {
    transition: opacity 0.3s ease, width 0.3s ease, margin 0.3s ease;
    overflow: hidden;
}

/* Search form transition */
.navbar form {
    transition: flex-grow 0.3s ease;
}

/* Expanded search state - hide brand on screens smaller than 992px (Bootstrap lg breakpoint) */
@media (max-width: 991.98px) {
    .container.search-expanded .navbar-brand {
        opacity: 0;
        width: 0;
        margin: 0;
        pointer-events: none;
    }

    .container.search-expanded form {
        flex-grow: 999;
    }
}

/* Autocomplete dropdown container */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Show dropdown when active */
.autocomplete-dropdown.show {
    display: block;
}

/* Individual autocomplete result item */
.autocomplete-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

/* Hover and active states for autocomplete items */
.autocomplete-item:hover,
.autocomplete-item.active {
    background-color: #f8f9fa;
}

/* Company/organization name in autocomplete */
.autocomplete-item-name {
    font-weight: 500;
    color: #212529;
}

/* Organization number and type in autocomplete */
.autocomplete-item-orgnr {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 2px;
}
