.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
}

.modal.show .modal-dialog {
    transform: none;
}

.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-bottom: 1px solid #f0f0f0;
    padding: 24px;
}

.modal-header .modal-title {
    font-size: 24px;
    color: #333;
    font-weight: 600;
    margin: 0;
}

.modal-header .btn-close {
    padding: 0.5rem;
    margin: -0.5rem -0.5rem -0.5rem auto;
}

.modal-body {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-sm .modal-dialog {
    max-width: 400px;
}

.modal-lg .modal-dialog {
    max-width: 800px;
}

.modal-xl .modal-dialog {
    max-width: 1200px;
}

.modal-fullscreen .modal-dialog {
    max-width: 100%;
    margin: 0;
    height: 100vh;
}

.modal-vehicle .tab-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid #f0f0f0;
}

.modal-vehicle .tab-button {
    background: none;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    font-size: 15px;
    color: #666;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s ease;
}

.modal-vehicle .tab-button:hover {
    color: #333;
}

.modal-vehicle .tab-button.active {
    color: #007bff;
    border-bottom-color: #007bff;
    font-weight: 500;
}

.modal-vehicle .tab-content {
    display: none;
}

.modal-vehicle .tab-content.active {
    display: block;
}

.modal-vehicle .form-group {
    margin-bottom: 20px;
}

.modal-vehicle .form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.modal-vehicle .form-control,
.modal-vehicle input[type="text"],
.modal-vehicle input[type="number"],
.modal-vehicle select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.modal-vehicle .form-control:focus,
.modal-vehicle input:focus,
.modal-vehicle select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.modal-vehicle .input-group {
    display: flex;
    gap: 8px;
}

.modal-vehicle .input-group input {
    flex: 1;
}

.modal-vehicle .form-hint {
    display: block;
    margin-top: 6px;
    color: #666;
    font-size: 12px;
}

.modal-vehicle .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.modal-vehicle .vehicle-search-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.modal-vehicle .vehicle-search-section h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 16px;
}

.modal-vehicle .search-hint {
    margin: 0 0 16px 0;
    color: #666;
    font-size: 13px;
}

.modal-vehicle .vehicle-summary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 15px;
}

.modal-vehicle #lookupResult {
    margin-top: 16px;
    padding: 12px;
    background: white;
    border-radius: 6px;
    border: 2px solid #28a745;
    display: none;
}

.modal-vehicle #lookupResult.show {
    display: block;
}

.modal-vehicle .search-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-vehicle #vinMessage {
    margin-top: 16px;
    padding: 12px;
    border-radius: 6px;
    display: none;
}

.modal-vehicle #vinMessage.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    display: block;
}

.modal-vehicle #vinMessage.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    display: block;
}

.tire-search-tabs {
    border-bottom: 1px solid #dee2e6;
    justify-content: center;
    margin-bottom: 2rem;
}

.tire-search-tabs .nav-link {
    border: none;
    color: #6c757d;
    font-weight: 500;
    padding: 1rem 2rem;
    position: relative;
    background: transparent;
}

.tire-search-tabs .nav-link.active {
    color: #000;
    background: transparent;
    border-bottom: 2px solid #000;
}

.tire-search-tabs .nav-link:hover {
    color: #000;
}

.tire-search-content {
    padding: 1rem;
    min-height: 400px;
}

.vehicle-search-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.vehicle-card {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 0 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.vehicle-card:hover {
    border-color: #000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.vehicle-card.selected {
    border-color: #000;
    background-color: #f8f9fa;
}

.vehicle-card img {
    width: 120px;
    object-fit: contain;
    margin-right: 1rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.vehicle-info {
    flex: 1;
}

.vehicle-info h5 {
    margin: 0;
    font-size: 1rem;
    color: #212529;
    font-weight: 600;
}

.vehicle-info p {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    color: #6c757d;
}

.vehicle-card button {
    margin-left: auto;
}

.size-selector-grid,
.model-selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.size-step,
.model-step {
    display: flex;
    flex-direction: column;
}

.brand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.brand-card {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 2rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.brand-card:hover {
    border-color: #000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.brand-card.selected {
    border-color: #000;
    background-color: #f8f9fa;
}

.brand-name {
    font-weight: 600;
    color: #212529;
    font-size: 1rem;
}

.all-brand-item {
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.all-brand-item:hover {
    border-color: #000;
    background-color: #f8f9fa;
}

@media (max-width: 768px) {
    .modal-vehicle .form-row {
        grid-template-columns: 1fr;
    }

    .modal-vehicle .tab-buttons {
        flex-direction: column;
    }

    .modal-vehicle .tab-button {
        border-bottom: none;
        border-left: 3px solid transparent;
        text-align: left;
    }

    .modal-vehicle .tab-button.active {
        border-left-color: #007bff;
        border-bottom-color: transparent;
    }

    .size-selector-grid,
    .model-selector-grid {
        grid-template-columns: 1fr;
    }

    .brand-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tire-search-tabs .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}
