/**
 * Live Search Dropdown Styles
 * Bootstrap 3 kompatibilní
 */

.live-search-container {
    position: relative;
}

/* změněný dropdown */
#live-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;      /* drž se pravého okraje inputu */
    right: auto;    /* zrušíme omezení zleva */

    /* "rozumně dynamicky široké" */
    min-width: 320px;          /* aby nebyl úplně úzký */
    width: min(450px, 80vw);   /* max 450px, ale max 80 % viewportu */

    z-index: 1050;
    margin-top: 2px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
    max-height: 500px;
    overflow-y: auto;
}

.live-search-section {
    border-bottom: 1px solid #e7e7e7;
}

.live-search-section:last-child {
    border-bottom: none;
}

.live-search-section-title {
    padding: 10px 15px 5px;
    font-size: 12px;
    font-weight: bold;
    color: #777;
    text-transform: uppercase;
}

.live-search-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.live-search-item {
    border-top: 1px solid #f5f5f5;
}

.live-search-item:first-child {
    border-top: none;
}

.live-search-item a {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s;
}

.live-search-item a:hover {
    background-color: #f5f5f5;
    color: #333;
    text-decoration: none;
}

.live-search-category a i {
    margin-right: 8px;
    color: #777;
}

.live-search-product a {
    padding: 8px 15px;
}

.live-search-product-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    margin-right: 12px;
    border-radius: 4px;
    flex-shrink: 0;
}

.live-search-product-no-image {
    width: 50px;
    height: 50px;
    background-color: #f5f5f5;
    margin-right: 12px;
    border-radius: 4px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.live-search-product-no-image::before {
    content: '\e060';
    font-family: 'Glyphicons Halflings';
    font-size: 20px;
    color: #ccc;
}

.live-search-product-title {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
}

.live-search-footer {
    padding: 10px 15px;
    background-color: #f9f9f9;
    border-top: 1px solid #e7e7e7;
    text-align: center;
}

.live-search-show-all {
    display: inline-block;
    font-weight: bold;
    color: #337ab7;
    text-decoration: none;
}

.live-search-show-all:hover {
    color: #23527c;
    text-decoration: underline;
}

.live-search-loading {
    padding: 20px;
    text-align: center;
    color: #777;
}

.live-search-no-results {
    padding: 20px;
    text-align: center;
    color: #999;
    font-style: italic;
}

@media (max-width: 767px) {
    #live-search-dropdown {
        max-height: 400px;
    }

    .live-search-product-image,
    .live-search-product-no-image {
        width: 40px;
        height: 40px;
        margin-right: 8px;
    }

    .live-search-product-title {
        font-size: 13px;
    }
}
