/* ==========================================================================
   GENEL MODAL VE OVERLAY STİLLERİ
   ========================================================================== */

#basit-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
    animation: fadeIn 0.3s ease-out;
}

#basit-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 850px;
    z-index: 9999;
    animation: slideIn 0.4s ease-out;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translate(-50%, -45%); opacity: 0; }
    to { transform: translate(-50%, -50%); opacity: 1; }
}

#basit-modal .modal-content {
    background: #f8f9fa;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* ==========================================================================
   MODAL HEADER VE İLERLEME ÇUBUĞU
   ========================================================================== */

#basit-modal .modal-header {
    background-color: #fff;
    padding: 20px 25px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#basit-modal .modal-title {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: #212529;
}

#wizard-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-step {
    display: flex;
    align-items: center;
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.progress-step span {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    font-weight: bold;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.progress-step.active span {
    background-color: #fff;
    border-color: #0d6efd;
    color: #0d6efd;
}

.progress-step.completed span {
    background-color: #198754;
    border-color: #198754;
    color: #fff;
}

.progress-step.active {
    color: #212529;
    font-weight: 700;
}

#basit-modal .btn-close {
    background: transparent;
    border: none;
    font-size: 24px;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    opacity: 0.7;
    transition: all 0.2s;
}

#basit-modal .btn-close:hover {
    opacity: 1;
    transform: scale(1.1);
}
#basit-modal .btn-close::before { content: '\00d7'; }


/* ==========================================================================
   MODAL BODY VE SİHİRBAZ ADIMLARI
   ========================================================================== */

#basit-modal .modal-body {
    padding: 30px 40px;
    overflow-y: auto;
    flex-grow: 1;
}

.wizard-step {
    display: none;
}

.wizard-step.active {
    display: block;
    animation: fadeIn 0.5s;
}

.step-title {
    font-size: 20px;
    font-weight: 600;
    color: #343a40;
    margin-bottom: 25px;
    text-align: center;
}

/* ==========================================================================
   ADIM 1: MÜŞTERİ TİPİ SEÇİMİ
   ========================================================================== */

.customer-type-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.customer-type-option {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.customer-type-option:hover {
    border-color: #0d6efd;
    background-color: #f8f9fa;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.customer-type-option.selected {
    border-color: #0d6efd;
    background-color: #e7f1ff;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
}

.customer-type-option i {
    font-size: 36px;
    color: #0d6efd;
    margin-bottom: 15px;
    display: block;
}

.customer-type-option span {
    font-size: 18px;
    font-weight: 600;
    color: #343a40;
}

/* ==========================================================================
   ADIM 2 & 3: FORM ELEMANLARI
   ========================================================================== */

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

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

.required-field::after {
    content: " *";
    color: #dc3545;
}

.form-control {
    display: block;
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 6px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-control::placeholder {
    color: #6c757d;
    opacity: 1;
}

select.form-control:disabled {
    background-color: #e9ecef;
    opacity: 1;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 10px;
}

/* ==========================================================================
   ADIM 3: BAYİ SEÇİMİ
   ========================================================================== */

.bayi-secim-container {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #343a40;
    margin-bottom: 15px;
}

.bayi-counter {
    margin-bottom: 15px;
    font-weight: bold;
    color: #0d6efd;
}

.bayi-list-container {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 10px;
}

.bayi-ilce-group h6 {
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    margin: 20px 0 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #e9ecef;
}

.bayi-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background-color: #fff;
    margin-bottom: 10px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.bayi-item:hover {
    border-color: #86b7fe;
    background-color: #f8f9fa;
}

.bayi-item.selected {
    border-color: #0d6efd;
    background-color: #e7f1ff;
}

.bayi-item.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #f8f9fa;
}

.bayi-checkbox {
    margin-right: 15px;
    font-size: 22px;
    color: #ced4da;
}

.bayi-item.selected .bayi-checkbox {
    color: #0d6efd;
}

.bayi-info {
    flex-grow: 1;
}

.bayi-name {
    font-weight: 600;
    font-size: 16px;
    color: #343a40;
    margin-bottom: 3px;
}

.bayi-address {
    font-size: 14px;
    color: #6c757d;
    line-height: 1.4;
}

.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: .25rem;
}
.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}
.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}

.loader {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

/* ==========================================================================
   ADIM 4: ÖZET
   ========================================================================== */

#summary-container {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.summary-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #ced4da;
}

.summary-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.summary-section h5 {
    font-size: 16px;
    font-weight: 600;
    color: #0d6efd;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-section h6 {
    font-size: 15px;
    font-weight: 600;
    margin-top: 15px;
}

.summary-section p, .summary-section li {
    font-size: 15px;
    color: #495057;
    margin-bottom: 8px;
}

.summary-section ul {
    padding-left: 20px;
    margin-top: 10px;
}

.edit-step {
    font-size: 13px;
    font-weight: 500;
    color: #0d6efd;
    text-decoration: none;
}

.edit-step:hover {
    text-decoration: underline;
}

/* ==========================================================================
   MODAL FOOTER VE BUTONLAR
   ========================================================================== */

#basit-modal .modal-footer {
    background-color: #fff;
    padding: 20px 25px;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    border: 1px solid transparent;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-primary {
    color: #fff;
    background-color: #0d6efd;
    border-color: #0d6efd;
}
.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}
.btn-primary:disabled {
    background-color: #0d6efd;
    border-color: #0d6efd;
    opacity: 0.65;
    cursor: not-allowed;
}

.btn-secondary {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}
.btn-secondary:hover {
    background-color: #5c636a;
    border-color: #565e64;
}

.btn-success {
    color: #fff;
    background-color: #198754;
    border-color: #198754;
}
.btn-success:hover {
    background-color: #157347;
    border-color: #146c43;
}

/* ==========================================================================
   RESPONSIVE TASARIM
   ========================================================================== */

@media (max-width: 768px) {
    #basit-modal {
        width: 95%;
        max-height: 95vh;
    }
    #basit-modal .modal-body {
        padding: 20px;
    }
    .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .customer-type-options {
        grid-template-columns: 1fr;
    }
    #wizard-progress {
        display: none; /* Mobilde ilerleme çubuğunu gizle, yer kaplamasın */
    }
}

/* ==========================================================================
   ORİJİNAL ÜRÜN KARTI STİLLERİ (Mevcut stillerle çakışmayı önlemek için)
   ========================================================================== */

.basit-urun-container {
    max-width: 100%;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.siparis-formu {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    background-color: #fff;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.form-layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.urun-bilgi-alani {
    flex: 1;
    min-width: 200px;
}

.urun-baslik {
    margin: 0;
    padding: 0;
    color: #212529;
    font-size: 22px;
    font-weight: 600;
}

.siparis-alani {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.form-group-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.form-item {
    display: flex;
    align-items: center;
}

.form-item strong {
    margin-right: 8px;
    color: #495057;
    font-weight: 500;
    font-size: 16px;
}

.form-item .urun-fiyat {
    font-size: 18px;
    font-weight: 700;
    color: #0d6efd;
}

.siparis-formu select,
.siparis-formu input[type="number"] {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 15px;
}

.siparis-formu input[type="number"] {
    width: 70px;
    text-align: center;
}

.basit-siparis-btn {
    background-color: #0d6efd !important;
    color: #ffffff !important;
    padding: 10px 20px !important;
    border: 0 !important;
    cursor: pointer !important;
    border-radius: 6px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    transition: background-color 0.2s !important;
}

.basit-siparis-btn:not(.disabled):hover {
    background-color: #0b5ed7 !important;
}

.basit-siparis-btn.disabled {
    background-color: #6c757d !important;
    cursor: not-allowed !important;
    opacity: 0.7;
}

.onay-kutusu-container {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background-color: #f8f9fa;
}

.onay-maddesi {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
    cursor: pointer;
}

.onay-maddesi .onay-checkbox {
    margin-right: 12px;
    margin-top: 4px;
    width: 18px;
    height: 18px;
}

.onay-maddesi .onay-metni {
    font-size: 14px;
    line-height: 1.5;
    color: #495057;
}

@media (max-width: 992px) {
    .form-layout, .siparis-alani {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
    .urun-bilgi-alani {
        margin-bottom: 15px;
    }
}
