/* Desktop Styles Start */

.dropdown-container {
    position: relative;
}

.dropdown-header {
    background: white;
    border-radius: 8px;
    padding: 16px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    transition: all 0.2s ease;
    position: relative;
    z-index: 1001;
}

.dropdown-header.open {
    border-radius: 12px 12px 0 0;
    border-bottom: none;
    border: 1px solid #1b43a0;
    border-bottom: 0px;
}

.dropdown-header:hover {
    border-color: #1a73e8;
}

.dropdown-label {
    color: #666;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.dropdown-value {
    color: #1a73e8;
    font-weight: 600;
    font-size: 16px;
}

.dropdown-arrow {
    margin-top: 18px;
    font-size: 20px;
    color: #1b43a0;
}

.dropdown-arrow i {
    transition: all 0.3s ease;
}

.search-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #1b43a0;
    border-radius: 0 0 16px 16px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(30px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1050;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-top: 1px solid #1b43a029;
}

.search-dropdown-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-top {
    padding: 8px 15px 15px 15px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.reset-button {
    background: none;
    border: none;
    color: #1b43a087;
    font-size: 14px;
    padding: 0;
    position: absolute;
    right: 20px;
    top: 16px;
    letter-spacing: 0.5px;
    transition: fade 0.2s ease;
}

.reset-button:hover {
    color: #ef4136;
}

.search-container {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    border: 1px solid #e8eaed;
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: #4285f4;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 16px;
}

.dropdown-content {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0 16px 0;
    max-height: 300px;
}

#makes_modal .dropdown-content {
    height: 300px;
}

.dropdown-content::-webkit-scrollbar {
    width: 6px;
}

.dropdown-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.dropdown-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.dropdown-content::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

.dropdown-option,
.dropdown-submenu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 15px;
    color: #333;
    border-radius: 8px;
    margin: 0 8px;
}

.option-left {
    display: flex;
    align-items: center;
    flex: 1;
}

.option-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dropdown-option .form-check{
    margin-bottom: 0px;
}

.checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-right: 12px;
    position: relative;
    transition: all 0.2s ease;
    background-color: white;
    flex-shrink: 0;
}

.checkbox.selected {
    border-color: #1b43a014;
    background-color: #1b43a014;
}

.checkbox.selected::after {
    content: "✔";
    position: absolute;
    top: 50%;
    left: 50%;
    color: #1b43a0;
    font-size: 12px;
    font-weight: bold;
    transform: translate(-50%, -50%);
    line-height: 1;
}

.option-count {
    color: #3a393b;
    font-size: 12px;
    text-align: right;
    background: #f7f7f7;
    padding: 3px 5px;
    border-radius: 40px;
    font-weight: 600;
}

.model-link {
    color: #1b43a0;
    font-size: 13px;
    text-decoration: none;
    font-weight: 600;
    background: #1b43a014;
    padding: 5px 4px 5px 10px;
    border-radius: 40px;
}

.model-link:hover,
.model-link.selected {
    color: white;
    background: #fc7c73;
}

.save-button-container {
    border-top: 1px solid #e8eaed;
    padding: 15px 10px 5px 10px;
    background: white;
    border-radius: 0 0 16px 16px;
}

.save-button {
    width: 298px;
    height: 40px;
    border-radius: 40px;
    background-color: #1b43a0;
    color: white;
    border: none;
    margin: 0 auto;
    display: block;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-button-main {
    display: flex;
    align-items: center;
    padding: 6px 20px 12px 20px;
    border-bottom: 1px solid #eee;
}

.back-button-main .back-button {
    cursor: pointer;
    color: #4285f4;
    font-size: 15px;
    text-decoration: none;
    font-weight: 600;
    background: #1b43a014;
    padding: 5px 19px 5px 13px;
    border-radius: 40px;
}

.back-button-make {
    position: absolute;
    right: 60px;
}

.back-button-make .back-button {
    cursor: pointer;
    color: #4285f4;
    font-size: 15px;
    text-decoration: none;
    font-weight: 600;
    background: #1b43a014;
    padding: 5px 19px 5px 13px;
    border-radius: 40px;
}

.back-button:hover {
    color: white;
    background: #fc7c73;
}

.back-arrow {
    margin-right: 8px;
    font-size: 18px;
}

.section-title {
    padding: 16px 20px 8px;
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

/* Price Range Styles */

.price-slider-container,
.kms-slider-container {
    position: relative;
}

.slider-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e5e5e5;
    cursor: pointer;
}

.filter-content {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #1b43a0;
    border-radius: 0 0 16px 16px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1050;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-top: 1px solid #1b43a029;
    padding: 8px 5px;
}

.filter-content.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.price-range {
    display: flex;
    align-items: center;
    color: #1a73e8;
    font-weight: 600;
    font-size: 16px;
}

.collapse-btn {
    margin-left: 10px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 6px solid #1b43a0;
    cursor: pointer;
}

.chart-container {
    height: 140px;
    margin: 40px 0 5px 0;
    position: relative;
    border-radius: 4px;
    overflow: visible;
}

.chart {
    height: calc(100% - 10px);
    display: flex;
    align-items: end;
    padding: 10px;
    gap: 2px;
}

.bar {
    flex: 1;
    background: #dbe1f0;
    border-radius: 1px 1px 0 0;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.bar:hover {
    background: #8ab4ff;
    transform: scaleY(1.05);
}

.bar.active {
    background: #1b43a0;
    opacity: 0.8;
}

.bar.active:hover {
    background: #2654cc;
}

.slider-container {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    height: 20px;
}

.slider-range {
    position: absolute;
    top: 50%;
    height: 4px;
    background: #1b43a0;
    border-radius: 2px;
    transform: translateY(-50%);
}

.slider-handle {
    margin: 0 !important;
    position: absolute;
    top: 50%;
    width: 28px;
    height: 28px;
    background: white;
    border: 3px solid #1b43a0;
    border-radius: 50%;
    cursor: pointer;
    transform: translate(-50%, -50%);
    transition: all 0.2s ease;
}

.slider-handle:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.slider-handle.dragging {
    transform: translate(-50%, -50%) scale(1.2);
    box-shadow: 0 2px 8px rgba(27, 67, 160, 0.3);
}

.input-group {
    display: flex;
    gap: 15px;
    padding-bottom: 20px;
}

.input-container {
    flex: 1;
    position: relative;
}

.input-container input {
    width: 100%;
    padding: 7px 15px 7px 40px;
    border: 2px solid #1b43a029;
    border-radius: 8px;
    font-size: 16px;
    color: #1b43a0;
    font-weight: 500;
}

.input-container input:focus {
    outline: none;
    border-color: #1b43a0;
    background: white;
}

.dollar-sign,
.km-sign {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #1b43a0;
    font-size: 16px;
    opacity: 0.5;
}

.km-sign {
    left: auto;
    right: 12px;
}

.input-container #kmMinInput {
    padding: 7px 40px 7px 10px;
}

/* Desktop Styles End */

/* Mobile Styles Start */
.glass-container {
    background: #f1f1f1;
    border-radius: 40px;
    padding: 3px 3px;
    display: inline-flex;
    gap: 2px;
}

.glass-tab {
    border-radius: 40px;
    background: transparent;
    border: none;
    padding: 10px 10px;
    color: #1b43a0;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
    white-space: nowrap;
    user-select: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(0);
}

.glass-tab:hover {
    background: rgba(99, 102, 241, 0.1);
    transform: translateX(2px);
}

.glass-tab.active {
    background: #ffffff !important;
    color: #1b43a0 !important;
    box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.04);
    transform: translateX(4px);
}

/* Mobile Styles End */

/* Histogram Slider Start */
.histogram-wrapper {
    width: 100%;
    display: inline-block;
    position: relative;
    padding: 0 15px;
}

.slider.slider-horizontal .slider-tick-container {
    display: none;
}

.bin {
    position: relative;
    margin-right: 3px;
    -webkit-transition: all 0.3s linear;
    -moz-transition: all 0.3s linear;
    -ms-transition: all 0.3s linear;
    -o-transition: all 0.3s linear;
    transition: all 0.3s linear;
}

.bin-color-selected {
    background-color: #1b43a0;
    opacity: 0.8;
}

.histogram_slider .selected-range {
    display: none;
}

.ui-slider-horizontal {
    height: 0.2em;
}

.ui-slider .ui-slider-handle {
    width: 0.8em;
    height: 0.8em;
    border-radius: 50%;
}

.ui-corner-all {
    border-radius: 0;
}

.slider-track .slider-selection {
    background: #1b43a0;
}

.bin.out-of-range {
    background: #ccc;
    opacity: 0.3;
}

.bin.in-range {
    background: #3366cc;
    opacity: 0.8;
}

.histogram-tooltip-box .tooltip-slider {
    background: white;
    color: #333;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 400;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 1px solid #e5e5e5;
    min-width: 100px;
    text-align: center;
    margin-bottom: -1px;
}
.histogram-tooltip-box .tooltip-price {
    color: #1b43a0;
    font-weight: 600;
    font-size: 12px;
    margin-bottom: 2px;
}
.histogram-tooltip-box .tooltip-count {
    color: #666;
    font-size: 11px;
}

.histogram-tooltip-box .tooltip-slider::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid white;
}

.histogram-tooltip-box .tooltip-slider::before {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 7px solid #e5e5e5;
    z-index: -1;
}

/* Histogram Slider End */


