/* Input fields and form elements */
input[type="text"], 
select {
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    color: #fff;
    background-color: #333;
    border: 1px solid #6f42c1;
    border-radius: 5px;
    margin: 10px auto;
    box-sizing: border-box;
}

input[type="text"]:focus, 
select:focus {
    outline: none;
    border-color: #5a35a0;
    box-shadow: 0 0 5px rgba(111, 66, 193, 0.5);
}

/* Search and barcode fields */
#search-product, 
#product-barcode {
    max-width: 400px;
    display: block;
}

/* Price field specific styling */
.price-field {
    width: 160px !important;
    height: 30px !important;
    padding: 8px 12px !important;
    margin: 5px 0;
    font-size: 16px !important;
    border: 1px solid #6f42c1;
    border-radius: 5px;
    background-color: #333;
    color: #fff;
    box-sizing: border-box;
}

/* Notes field */
#note {
    width: 100%;
    max-width: 500px;
    height: 40px;
    padding: 8px 12px;
    font-size: 16px;
    border: 1px solid #6f42c1;
    border-radius: 5px;
    background-color: #444;
    color: #fff;
    margin: 10px 0;
}

/* jQuery UI Autocomplete customization */
.ui-autocomplete {
    background-color: #444 !important;
    border: 1px solid #6f42c1 !important;
    border-radius: 5px !important;
    color: #fff !important;
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1001;
}

.ui-autocomplete .ui-menu-item {
    padding: 8px 12px !important;
    border-bottom: 1px solid #555 !important;
}

.ui-autocomplete .ui-menu-item:last-child {
    border-bottom: none !important;
}

.ui-autocomplete .ui-menu-item-wrapper {
    padding: 5px !important;
}

.ui-autocomplete .ui-menu-item-wrapper.ui-state-active {
    background-color: #6f42c1 !important;
    border: none !important;
    margin: 0 !important;
}

.ui-helper-hidden-accessible {
    display: none;
}

/* Clear search button */
.clear-search {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #6f42c1;
    z-index: 2;
}

.clear-search:hover {
    color: #5a35a0;
}

/* Mobile adjustments */
@media (max-width: 600px) {
    #search-product, 
    #product-barcode {
        width: 90%;
        font-size: 14px;
    }

    input[type="text"], 
    select {
        padding: 8px 10px;
        font-size: 14px;
        height: 35px;
    }

    .price-field {
        width: 140px !important;
        height: 33px !important;
        padding: 6px 6px !important;
        font-size: 18px !important;
    }

    .ui-autocomplete {
        max-width: 90%;
    }
}
