/**
 * Public styles for Car Filter Plugin
 */

/* Main filter container */
.car-filter-form {
    border: none;
    border-radius: 4px;
    margin-bottom: 30px;
    background-color: #000000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    padding: 20px;
    color: #fff;
}

/* Filter title */
.car-filter-title {
    background-color: transparent;
    color: #C7994C;
    padding: 0 0 12px 0;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: none; /* Hide the title as per sample image */
}

/* Filter fields container */
.car-filter-fields {
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
}

/* Individual filter field */
.car-filter-field {
    margin-bottom: 0;
    flex: 1;
    min-width: 200px;
}

/* Last field (no margin) */
.car-filter-field:last-child {
    margin-bottom: 0;
}

/* Field labels */
.car-filter-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #C7994C;
    font-size: 14px;
}

/* Select fields */
.car-filter-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #333;
    border-radius: 4px;
    background-color: transparent;
    font-size: 14px;
    color: #fff;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23C7994C" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.car-filter-select:focus {
    border-color: #C7994C;
    outline: none;
    box-shadow: 0 0 0 1px #C7994C;
}

.car-filter-select option {
    background-color: #000;
    color: #fff;
}

.car-filter-select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Price slider */
.car-filter-slider {
    margin: 15px 0;
    height: 4px;
    background-color: #333;
    border-radius: 2px;
}

.noUi-connect {
    background-color: #C7994C;
}

.noUi-handle {
    width: 18px !important;
    height: 18px !important;
    border-radius: 50%;
    background-color: #000;
    border: 2px solid #C7994C;
    box-shadow: none;
    cursor: pointer;
}

.noUi-handle:before,
.noUi-handle:after {
    display: none;
}

/* Price display */
.car-filter-price-values {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 14px;
    color: #C7994C;
}

.car-filter-price-separator {
    color: #999;
}

/* Submit button */
.car-filter-submit {
    display: inline-block;
    background-color: #C7994C;
    color: #000;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
    height: 40px;
    line-height: 20px;
}

.car-filter-submit:hover {
    background-color: #000;
    color: #C7994C;
    border-color: #C7994C;
}

/* Reset link */
.car-filter-reset {
    display: inline-block;
    margin-top: 10px;
    color: #C7994C;
    text-decoration: none;
    font-size: 14px;
    text-align: center;
    width: 100%;
}

.car-filter-reset:hover {
    color: #C7994C;
    text-decoration: underline;
}

/* Horizontal layout */
.car-filter-horizontal .car-filter-fields {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-end;
}

.car-filter-horizontal .car-filter-field {
    flex: 1;
    margin-right: 15px;
    margin-bottom: 0;
}

.car-filter-horizontal .car-filter-submit-field {
    flex: 0 0 auto;
    margin-right: 0;
    align-self: flex-end;
    min-width: 150px;
}

/* Responsive styles */
@media (max-width: 768px) {
    .car-filter-form {
        padding: 15px;
    }
    
    .car-filter-fields {
        flex-direction: column;
    }
    
    .car-filter-field {
        margin-right: 0;
        margin-bottom: 15px;
        width: 100%;
    }
    
    .car-filter-submit-field {
        width: 100%;
    }
    
    .car-filter-submit {
        width: 100%;
    }
}

/* Loading overlay */
.car-filter-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.car-filter-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #333;
    border-top: 4px solid #C7994C;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.car-filter-loading-text {
    margin-top: 15px;
    font-size: 16px;
    color: #fff;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Additional styles to match sample image */
.car-filter-field input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #333;
    border-radius: 4px;
    background-color: transparent;
    font-size: 14px;
    color: #fff;
    height: 40px;
}

.car-filter-field input[type="text"]::placeholder {
    color: #999;
}

.car-filter-field input[type="text"]:focus {
    border-color: #C7994C;
    outline: none;
    box-shadow: 0 0 0 1px #C7994C;
}

/* Price range label styling to match image */
.car-filter-price label {
    text-align: center;
}

/* Adjust the slider handles to match image */
.noUi-handle {
    width: 16px !important;
    height: 16px !important;
    border-radius: 50%;
    background-color: #C7994C !important;
    border: 2px solid #C7994C !important;
    box-shadow: none !important;
    cursor: pointer;
    top: -6px !important;
}

.car-filter-container {
    margin-bottom: 30px;
    padding: 20px;
    background: #f7f7f7;
    border-radius: 5px;
}

.car-filter-section {
    margin-bottom: 20px;
}

.car-filter-section h3 {
    margin: 0 0 15px;
    font-size: 16px;
    font-weight: 600;
}

.popular-makes-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.make-item {
    display: inline-block;
    padding: 8px 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 20px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: all 0.3s ease;
}

.make-item:hover {
    background: #f0f0f0;
    border-color: #bbb;
    text-decoration: none;
}

.make-item.active {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.make-item.active:hover {
    background: #135e96;
    border-color: #135e96;
}

.price-slider-container {
    padding: 20px 10px 10px;
}

#price-range-slider {
    margin: 0 10px 20px;
    height: 4px;
    background: #ddd;
}

.price-inputs {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.price-input {
    position: relative;
    width: calc(50% - 20px);
}

.price-input .currency-symbol {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.price-input input[type="number"] {
    width: 100%;
    padding: 8px 8px 8px 25px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.price-input-separator {
    color: #666;
    font-weight: bold;
}

.apply-price-filter {
    display: block;
    width: 100%;
    padding: 10px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.apply-price-filter:hover {
    background: #135e96;
}

/* noUiSlider custom styles */
.noUi-connect {
    background: #2271b1;
}

.noUi-handle {
    width: 18px !important;
    height: 18px !important;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #2271b1;
    box-shadow: none;
    cursor: pointer;
    right: -9px !important;
}

.noUi-handle:before,
.noUi-handle:after {
    display: none;
}

/* Hide number input spinners */
.price-input input[type="number"]::-webkit-inner-spin-button,
.price-input input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.price-input input[type="number"] {
    -moz-appearance: textfield;
}

.car-filter-pagination {
    text-align: center;
    margin: 30px 0;
}

.car-filter-pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    background: #fff;
    transition: all 0.3s ease;
}

.car-filter-pagination .page-numbers.current {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.car-filter-pagination .page-numbers:hover:not(.current) {
    background: #f0f0f0;
    border-color: #bbb;
}

.car-filter-form-horizontal {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    background: #000;
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
    padding: 32px 24px 24px 24px;
    gap: 24px;
    margin: 0 auto 32px auto;
    max-width: 1200px;
}

.car-filter-field-group {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-width: 180px;
    margin-right: 0;
}

.car-filter-field-group label {
    color: #C7994C;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
}

.car-filter-select,
.car-filter-input {
    background: #181818;
    color: #fff;
    border: 1px solid #C7994C;
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.car-filter-select:focus,
.car-filter-input:focus {
    border-color: #fff;
    outline: none;
}

.car-filter-select option {
    background: #181818;
    color: #fff;
}

.price-group {
    min-width: 260px;
    max-width: 320px;
}

.price-slider-row {
    margin: 0 0 8px 0;
}

#price-range-slider {
    margin: 0 0 8px 0;
    background: #222;
    border-radius: 4px;
    height: 6px;
}

.noUi-connect {
    background: #C7994C;
}

.noUi-handle {
    background: #C7994C !important;
    border: 2px solid #fff !important;
    width: 18px !important;
    height: 18px !important;
    border-radius: 50%;
    top: -7px !important;
}

.price-values-row {
    display: flex;
    justify-content: space-between;
    font-size: 15px;
    color: #C7994C;
    font-weight: 600;
    margin-bottom: 0;
}

.price-value {
    min-width: 90px;
    text-align: center;
}

.car-filter-submit-btn {
    background: #C7994C;
    color: #000;
    border: none;
    border-radius: 6px;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    margin-top: 24px;
    min-width: 180px;
}

.car-filter-submit-btn:hover {
    background: #fff;
    color: #C7994C;
}

.submit-group {
    display: flex;
    align-items: flex-end;
    min-width: 180px;
    flex: 0 0 180px;
}

@media (max-width: 900px) {
    .car-filter-form-horizontal {
        flex-direction: column;
        align-items: stretch;
        gap: 18px;
        padding: 18px 8px 18px 8px;
    }
    .car-filter-field-group,
    .price-group,
    .submit-group {
        min-width: 0;
        max-width: 100%;
    }
    .car-filter-submit-btn {
        width: 100%;
        min-width: 0;
        margin-top: 12px;
    }
}
