/* ===== CUSTOM MODAL STYLES ===== */

/* Custom Modal Styles */
.modal-backdrop-custom {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
}

.modal-custom {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1050;
    width: 70vw;
    max-width: 1400px;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-content-custom {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.modal-header-custom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

.modal-title-custom {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
}

.btn-close-custom {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.2s;
}

.btn-close-custom:hover {
    color: #333;
    background-color: #e9ecef;
}

.modal-body-custom {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    min-height: 0;
}

/* Araç Görselleri Galerisi */
.vehicle-images-gallery {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 0.75rem;
    margin-top: 0.5rem;
}

.gallery-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    text-align: center;
}

.images-container {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.image-item {
    flex: 0 0 auto;
}

.vehicle-image {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid #e9ecef;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vehicle-image:hover {
    border-color: #0e947a;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(14, 148, 122, 0.2);
}

/* ===== MODERN CAR SELECTION MODAL - PROJECT THEME INTEGRATION ===== */

/* Mobile First Responsive Design */
@media (max-width: 768px) {
    .modal-xl {
        max-width: 95vw;
        margin: 10px;
    }
    
    .modern-car-selection {
        flex-direction: column;
        max-height: 85vh;
    }
    
    .car-selection-steps {
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        min-height: auto;
        max-height: 35vh;
        overflow-y: auto;
    }
    
    .steps-container {
        padding: 1rem;
    }
    
    .steps-title {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .steps-list {
        gap: 0.5rem;
    }
    
    .step-item {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    .step-number {
        width: 24px;
        height: 24px;
        font-size: 0.8rem;
    }
    
    .car-selection-content {
        max-height: 50vh;
        overflow-y: auto;
    }
    
    .content-header {
        padding: 1rem;
    }
    
    .content-title {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }
    
    .content-subtitle {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }
    
    .options-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .option-card {
        padding: 0.75rem;
        min-height: 100px;
    }
    
    .option-image {
        width: 40px;
        height: 40px;
        margin-bottom: 0.5rem;
    }
    
    .option-name {
        font-size: 0.8rem;
        font-weight: 600;
    }
    
    .year-list {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 0.5rem;
        padding: 1rem;
    }
    
    .year-item {
        padding: 0.5rem;
        font-size: 0.85rem;
    }
    
    .navigation-buttons {
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .btn-secondary {
        padding: 0.75rem 1.25rem;
    }
}

@media (max-width: 480px) {
    .modal-xl {
        max-width: 98vw;
        margin: 5px;
    }
    
    .options-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.5rem;
        padding: 0.75rem;
    }
    
    .option-card {
        padding: 0.5rem;
        min-height: 80px;
    }
    
    .option-image {
        width: 35px;
        height: 35px;
        margin-bottom: 0.25rem;
    }
    
    .option-name {
        font-size: 0.75rem;
    }
    
    .year-list {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 0.25rem;
        padding: 0.75rem;
    }
    
    .year-item {
        padding: 0.4rem;
        font-size: 0.8rem;
    }
    
    .navigation-buttons {
        padding: 0.75rem;
        gap: 0.5rem;
    }
    
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
}

/* Modal Container */
.modern-car-selection {
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.modal-xl {
    max-width: 900px;
}

/* Left Panel - Steps */
.car-selection-steps {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-right: 1px solid #e2e8f0;
    min-height: 400px;
    max-height: 500px;
    overflow-y: auto;
}

.steps-container {
    padding: 1.5rem;
}

.steps-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
    color: #374151;
}

.steps-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.step-item {
    display: flex;
    align-items: center;
    padding: 0.6rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    position: relative;
    margin-bottom: 0.5rem;
}

.step-item:hover {
    background: #f8fafc;
    border-color: #d1d5db;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.step-item.active {
    background: #0e947a;
    border-color: #0e947a;
    color: white;
    box-shadow: 0 4px 12px rgba(14, 148, 122, 0.3);
}

.step-item.completed {
    background: #f0fdf4;
    border-color: #22c55e;
}

.step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    margin-right: 0.75rem;
    background: #e5e7eb;
    color: #6b7280;
    transition: all 0.3s ease;
}

.step-item.active .step-number {
    background: #ffffff;
    color: #0e947a;
}

.step-item.completed .step-number {
    background: #22c55e;
    color: white;
}

.step-content {
    flex: 1;
}

.step-title {
    font-weight: 600;
    font-size: 0.8rem;
    color: #374151;
    margin-bottom: 0.15rem;
}

.step-item.active .step-title {
    color: #0e947a;
}

.step-subtitle {
    font-size: 0.7rem;
    color: #6b7280;
    font-weight: 400;
}

.step-item.active .step-subtitle {
    color: #0e947a;
}

.step-check {
    color: #22c55e;
    font-size: 1.25rem;
    margin-left: 0.5rem;
}

/* Right Panel - Content */
.car-selection-content {
    background: #ffffff;
    min-height: 400px;
    max-height: 500px;
    overflow-y: auto;
}

.selection-container {
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.step-content-wrapper {
    flex: 1;
}

.step-header {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #374151;
    display: flex;
    align-items: center;
}

.step-header i {
    color: #0e947a;
    margin-right: 0.5rem;
}

.step-description {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

/* Search Filter */
.search-filter-container {
    position: relative;
    margin-bottom: 1.5rem;
    display: flex; /* Eklendi */
    align-items: center; /* Eklendi */
    gap: 0.5rem; /* İkon ve input arası boşluk için eklendi */
}

.search-filter-container .search-input {
    padding-right: 1rem; /* İkon için yer aç - azaltıldı */
    flex-grow: 1; /* Mevcut alanı doldur */
    width: 100%; /* Tam genişlik */
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.search-filter-container .search-input:focus {
    border-color: #0e947a;
    box-shadow: 0 0 0 3px rgba(14, 148, 122, 0.1);
    outline: none;
}

.clear-search {
    position: relative; /* Absolute yerine relative kullanıldı */
    right: auto; /* Absolute konumlandırmayı kaldır */
    top: auto; /* Absolute konumlandırmayı kaldır */
    transform: none; /* Absolute konumlandırmayı kaldır */
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 1.2rem; /* Boyut artırıldı */
    padding: 0.2rem;
    transition: color 0.2s ease;
    display: flex; /* İkonu ortala */
    align-items: center; /* İkonu ortala */
    justify-content: center; /* İkonu ortala */
    width: 30px; /* Belirli bir genişlik ver */
    height: 30px; /* Belirli bir yükseklik ver */
    flex-shrink: 0; /* Küçülmesini engelle */
}

.clear-search:hover {
    color: #ef4444;
}

/* Selection Grid */
.selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.selection-card {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 80px;
}

.selection-card:hover {
    border-color: #0e947a;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(14, 148, 122, 0.15);
}

.selection-card.selected {
    background: #0e947a;
    border-color: #0e947a;
    color: white;
    box-shadow: 0 8px 25px rgba(14, 148, 122, 0.3);
}

.card-icon {
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 45px;
}

.card-icon i {
    font-size: 1.25rem;
    color: #0e947a;
    transition: all 0.3s ease;
}

.card-icon img {
    max-width: 60px;
    max-height: 45px;
    object-fit: contain;
    border-radius: 6px;
}

.selection-card.selected .card-icon i {
    color: white;
}

.card-title {
    font-weight: 600;
    font-size: 0.75rem;
    color: #374151;
}

.selection-card.selected .card-title {
    color: white;
}

/* Selection List */
.selection-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.selection-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.selection-item:hover {
    border-color: #0e947a;
    background: #f8fafc;
    transform: translateX(4px);
}

.selection-item.selected {
    background: #0e947a;
    border-color: #0e947a;
    color: white;
}

.item-content {
    flex: 1;
}

.item-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: #374151;
    margin-bottom: 0.25rem;
}

.selection-item.selected .item-title {
    color: white;
}

.item-subtitle {
    font-size: 0.75rem;
    color: #6b7280;
}

.selection-item.selected .item-subtitle {
    color: rgba(255, 255, 255, 0.8);
}

.selection-item i {
    color: #9ca3af;
    transition: all 0.3s ease;
}

.selection-item.selected i {
    color: white;
}

/* Year Grid */
.year-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.year-card {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.8rem;
    color: #374151;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.year-card:hover {
    border-color: #0e947a;
    background: #f8fafc;
    transform: scale(1.05);
}

.year-card.selected {
    background: #0e947a;
    border-color: #0e947a;
    color: white;
    box-shadow: 0 4px 12px rgba(14, 148, 122, 0.3);
}

/* Options List */
.options-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.option-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option-item:hover {
    border-color: #0e947a;
    background: #f8fafc;
}

.option-item.selected {
    background: #0e947a;
    border-color: #0e947a;
    color: white;
}

.option-content {
    flex: 1;
}

.option-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: #374151;
    margin-bottom: 0.25rem;
}

.option-item.selected .option-title {
    color: white;
}

.option-subtitle {
    font-size: 0.75rem;
    color: #6b7280;
}

.option-item.selected .option-subtitle {
    color: rgba(255, 255, 255, 0.8);
}

.option-checkbox {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.option-item.selected .option-checkbox {
    background: #ffffff;
    border-color: #ffffff;
}

.option-checkbox i {
    font-size: 0.75rem;
    color: transparent;
    transition: all 0.3s ease;
}

.option-item.selected .option-checkbox i {
    color: #0e947a;
}

/* Loading States */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
}

.loading-state .spinner-border {
    width: 2rem;
    height: 2rem;
    color: #0e947a;
    margin-bottom: 1rem;
}

.loading-state p {
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0;
}

/* Empty States */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
}

.empty-state i {
    font-size: 3rem;
    color: #d1d5db;
    margin-bottom: 1rem;
}

.empty-state p {
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0;
}

/* Navigation Buttons */
.step-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
    margin-top: auto;
}

.step-navigation .btn {
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.6rem 1.25rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.step-navigation .btn-outline-secondary {
    color: #6b7280;
    border-color: #e5e7eb;
    background: #ffffff;
}

.step-navigation .btn-outline-secondary:hover {
    background: #f8fafc;
    border-color: #d1d5db;
    color: #374151;
}

.step-navigation .btn-primary {
    background: #0e947a;
    border-color: #0e947a;
    color: white;
}

.step-navigation .btn-primary:hover {
    background: #0c816a;
    border-color: #0c816a;
}

.step-navigation .btn-success {
    background: #22c55e;
    border-color: #22c55e;
    color: white;
}

.step-navigation .btn-success:hover {
    background: #16a34a;
    border-color: #16a34a;
}

.step-navigation .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Modal Header */
.modal-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header .btn-close {
    background: none !important;
    color: #6b7280 !important;
    font-size: 1.5rem !important;
    padding: 0.5rem !important;
    cursor: pointer !important;
    opacity: 1 !important;
    transition: opacity 0.3s ease;
    border-radius: 50% !important;
    width: 2.5rem !important;
    height: 2.5rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.modal-header .btn-close:hover {
    opacity: 1 !important;
    background: rgba(239, 68, 68, 0.1) !important;
    color: #dc2626 !important;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
}

.modal-title i {
    color: #0e947a;
    margin-right: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-xl {
        max-width: 95vw;
        margin: 1rem;
    }
    
    .car-selection-steps {
        min-height: auto;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }
    
    .steps-container {
        padding: 1rem;
    }
    
    .selection-container {
        padding: 1rem;
    }
    
    .selection-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.75rem;
    }
    
    .year-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 0.5rem;
    }
    
    .step-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .step-navigation .btn {
        width: 100%;
    }
}

/* Animation Enhancements */
@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.selection-card {
    animation: fadeInScale 0.3s ease-out;
}

.selection-item {
    animation: slideInFromLeft 0.3s ease-out;
}

.step-item {
    animation: slideInFromLeft 0.3s ease-out;
}

/* Araç Görselleri Galerisi */
.vehicle-images-gallery {
    padding: 20px 0;
    max-height: 600px;
    overflow-y: auto;
}

.vehicle-images-gallery .row {
    margin: 0;
}

.vehicle-image-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    background: #fff;
    border: 2px solid #e9ecef;
}

.vehicle-image-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    border-color: #0d6efd;
}

.vehicle-image {
    width: 100%;
    height: 220px;
    object-fit: contain;
    display: block;
    padding: 15px;
    background: #fff;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.vehicle-image-card:hover .image-overlay {
    opacity: 1;
}

.image-overlay .btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 10px 20px;
    background: #fff;
    color: #0d6efd;
    border: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.image-overlay .btn:hover {
    transform: scale(1.1);
    background: #0d6efd;
    color: #fff;
}

/* Make the whole modal taller and scrollable inside */
.modal-content-custom{ max-height: 85vh; }
.modal-body-custom{ max-height: calc(85vh - 70px); overflow-y: auto; }
.car-selection-content .step-content-wrapper{ padding-bottom: 16px; }

/* Fix modal row height and flex issues */
.modal-body-custom .row.g-0.h-100 {
    height: 100% !important;
    min-height: 0;
}

.modal-body-custom .car-selection-steps {
    height: 100%;
    overflow-y: auto;
}

.modal-body-custom .col-md-8 {
    height: 100%;
    overflow-y: auto;
}

/* Responsive modal sizes */
@media (max-width: 1200px) {
    .modal-custom {
        width: 85vw;
        height: 80vh;
        max-height: 80vh;
    }
}

@media (max-width: 768px) {
    .modal-custom {
        width: 95vw;
        height: 90vh;
        max-height: 90vh;
    }
}

/* Empty state for images */
.empty-state-small {
    text-align: center;
    padding: 30px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

.empty-state-small i {
    font-size: 48px;
    margin-bottom: 10px;
    opacity: 0.5;
}

.empty-state-small p {
    font-size: 14px;
    margin: 0;
}