/* TomSelect customization for catalog search */
#catalog-search-form .ts-wrapper {
    width: 100%;
    position: relative;
    padding: 0;
}

#catalog-search-form .ts-control {
    min-height: 38px;
    padding: 8px 35px 8px 12px;
    border: none;
    border-radius: 4px;
    background-color: var(--white, #fff);
    font-size: 14px;
}

#catalog-search-form .ts-control:focus,
#catalog-search-form .ts-wrapper.focus .ts-control {
    outline: 2px solid var(--primary-color, #ffc107);
    outline-offset: -2px;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.1);
}

/* Strzałka rozwijania */
#catalog-search-form .ts-wrapper::after {
    content: '\25BC';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 10px;
    color: var(--text-gray, #666);
    transition: transform 0.2s ease;
    z-index: 99;
}

#catalog-search-form .ts-wrapper.dropdown-active::after {
    transform: translateY(-50%) rotate(180deg);
}

#catalog-search-form .ts-dropdown {
    border: 1px solid var(--primary-color, #ffc107);
    border-top: none;
    border-radius: 0 0 4px 4px;
    margin-top: -1px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#catalog-search-form .ts-dropdown .no-results {
    padding: 10px 15px;
    color: var(--text-light, #999);
    font-size: 14px;
}

#catalog-search-form .ts-dropdown-content {
    max-height: 300px;
}

#catalog-search-form .ts-dropdown .option {
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#catalog-search-form .ts-dropdown .option:hover,
#catalog-search-form .ts-dropdown .option.active {
    background-color: rgba(255, 193, 7, 0.1);
    color: var(--text-dark, #333);
}

#catalog-search-form .ts-dropdown .ts-option-item {
    font-size: 14px;
    line-height: 1.5;
}

#catalog-search-form .ts-control {
    display: flex;
    flex-direction: column;
}

#catalog-search-form .ts-control input {
    font-size: 14px !important;
    color: var(--text-dark, #333);
    margin: 5px 0 0 !important;
    max-width: 90% !important;
    border-radius: 4px !important;
    border: 1px solid var(--text-light, #999) !important;
    padding: 5px !important;
}

#catalog-search-form .ts-control input::placeholder {
    color: var(--text-light, #999);
}

/* Adjust form groups spacing */
#catalog-search-form .form-group {
    margin-bottom: 1.25rem;
}

/* Make sure dropdown appears above other content */
#catalog-search-form .ts-wrapper.dropdown-active {
    z-index: 100;
}

