/* Car Selection Modal Styles */
#car-selection-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

button.car-button-click img {
    margin-right: 10px;
    width: 25px;
}

button.car-button-click {
    margin: 0;
}

.modal-header {
    text-align: center;
}

.modal-header h3 {
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #333;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    position: absolute;
    top: 0;
    right: 0;
    margin: 0;
}

.modal-close:hover {
    background: #f5f5f5;
    border-radius: 4px;
}

/* Modal content positioning */
#car-selection-modal .vehicle-selection-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    margin: 0 auto;
    transform: translateY(0);
}

.vehicle-selection-container {
    padding: 30px;
}

.vehicle-options .title {
    font-weight: 600;
    color: #333;
    margin: 0;
    border-bottom: 2px solid #e74c3c;
    display: inline-block;
}

.select-options>div:nth-child(2) {
    margin: 0 20px;
}

.select-options>div {
    width: 33.3333%;
}

.select-options {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 25px;
    display: flex;
}

.year-option label,
.make-option label,
.model-option label,
.brand-option label {
    display: block;
    font-weight: 500;
    color: #666;
    margin-bottom: 8px;
}

.vehicle-select {
    width: 100%;
    height: 45px;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    color: #333;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    margin: 0;
}

.vehicle-select:focus {
    outline: none;
    border-color: #e74c3c;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2);
}

.vehicle-select:hover {
    border-color: #bbb;
}

.vehicle-select option {
    padding: 10px;
}

.vehicle-select option:first-child {
    color: #999;
}

/* Selected Vehicle Info */
.selected-vehicle-info {
    background: #fff;
    border: 1px solid #ddd;
    border-left: 4px solid #e74c3c;
    border-radius: 4px;
    padding: 20px;
}

.selected-vehicle-info .title {
    font-weight: 700;
    color: #333;
    margin: 0 0 15px 0;
    text-transform: uppercase;
    border: none;
    padding: 0;
}

.selected-vehicle-info .detail {
    display: flex;
    align-items: center;
    gap: 10px;
}

.selected-vehicle-info .icon {
    position: relative;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.selected-vehicle-info .icon img:first-child {
    width: 30px;
    height: 100%;
    object-fit: contain;
}

.selected-vehicle-info .icon .check-icon {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.selected-vehicle-info .detail.has-selection .check-icon {
    opacity: 1;
}

.selected-vehicle-info .car-name {
    color: #666;
    flex: 1;
}

.selected-vehicle-info .detail.has-selection .car-name {
    color: #333;
    font-weight: 500;
}

/* Modal Actions */
.modal-actions {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.modal-actions>button {
    margin: 0 5px 10px;
}

.clear-vehicle-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    margin: 0;
    line-height: 0;
}

.clear-vehicle-btn:hover:not(:disabled) {
    background: #5a6268;
    transform: translateY(-1px);
}

.clear-vehicle-btn:active:not(:disabled) {
    transform: translateY(0);
}

.save-vehicle-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    margin: 0;
    line-height: 0;
}

.save-vehicle-btn:hover:not(:disabled) {
    background: #c0392b;
    transform: translateY(-1px);
}

.save-vehicle-btn:active:not(:disabled) {
    transform: translateY(0);
}

.save-vehicle-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Modal Size */
#car-selection-modal .vehicle-selection-container {
    max-width: 600px;
    width: 90%;
}

/* Animation for modal */
#car-selection-modal {
    animation: modalFadeIn 0.3s ease-out;
}

/* Body scroll lock when modal is open */
body.modal-open {
    overflow: hidden;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Ensure modal is above other elements */
#car-selection-modal {
    z-index: 10000 !important;
}

/* Vehicle Filter Indicator */
.vehicle-filter-indicator {
    background: #f8f8f8;
    color: #000;
    padding: 10px 20px;
    margin: 0 0 40px;
    border-radius: 6px;
}

.vehicle-filter-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.vehicle-filter-text {
    flex: 1;
    min-width: 200px;
}

.clear-vehicle-filter {
    background: #e74c3c;
    border: 1px solid white;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    margin: 0;
}

.clear-vehicle-filter:hover {
    background: white;
    color: #e74c3c;
}

/* Responsive for vehicle filter */
@media (max-width: 768px) {
    .vehicle-filter-content {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .vehicle-filter-text {
        min-width: auto;
        margin-bottom: 10px;
    }

    .clear-vehicle-filter {
        align-self: center;
        max-width: 150px;
    }
}

@media only screen and (max-width: 550px) {
    .select-options {
        flex-wrap: wrap;
    }

    .select-options>div:nth-child(2) {
        margin: 0 0 15px;
    }

    .select-options>div {
        width: 100%;
        margin-bottom: 15px;
    }

}
