/* public/assets/css/order-form.css */

/* ======================================= */
/* 1. KÖK DEĞİŞKENLER VE GENEL STİL          */
/* ======================================= */

:root {
    --color-primary: #48BB78; /* Ana Vurgu Rengi (Yeşil) */
    --color-primary-dark: #38a169;
    --color-primary-light: #e6f7ef;
    --color-text: #334155;    /* Slate Gri */
    --color-text-light: #64748b;
    --color-secondary: #dc2626; /* Kırmızı Vurgu */
    --color-border: #e2e8f0;
    --color-background: #ffffff;
    --color-background-light: #f8fafc;
    --color-background-selected: #e6f7ef;
    --color-success: #48BB78;
    --font-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

.kis-form-wrapper {
    max-width: 900px;
    margin: 20px auto;
    padding: 0;
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    font-family: var(--font-base);
    color: var(--color-text);
}

.kis-form-wrapper h2 {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    padding: 28px 30px;
    margin-top: 0;
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
    font-size: 1.75em;
    font-family: var(--font-heading);
    font-weight: 600;
    text-align: center;
    letter-spacing: -0.02em;
}

/* Form Adımları */
.form-step {
    padding: 35px 30px;
    animation: fadeIn 0.3s ease-out;
    display: none;
}
.form-step.active {
    display: block;
}

.form-step h3 {
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 12px;
    margin-bottom: 28px;
    color: var(--color-text);
    font-size: 1.35em;
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: -0.01em;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ======================================= */
/* 2. PROGRESS BAR (İLERLEME ÇUBUĞU)       */
/* ======================================= */

#progress-bar-wrapper {
    display: flex;
    justify-content: space-between;
    padding: 24px 30px;
    background: var(--color-background-light);
    border-bottom: 1px solid var(--color-border);
}
.progress-step {
    text-align: center;
    flex-grow: 1;
    position: relative;
    font-size: 0.875em;
    color: var(--color-text-light);
    font-weight: 500;
}
.progress-step.active, .progress-step.completed {
    color: var(--color-primary);
    font-weight: 600;
}
.progress-step .circle {
    width: 32px;
    height: 32px;
    line-height: 32px;
    border-radius: 50%;
    background: white;
    border: 2px solid #cbd5e1;
    margin: 0 auto 10px;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.875em;
}
.progress-step.active .circle {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: white;
    box-shadow: 0 0 0 4px var(--color-primary-light);
}
.progress-step.completed .circle {
    border-color: var(--color-success);
    background: var(--color-success);
    color: white;
    font-size: 1.1em;
}
.progress-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 15px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #e2e8f0;
    transform: translateX(10px);
    z-index: 0;
}
.progress-step.completed:not(:last-child)::after {
    background: var(--color-success);
}


/* ======================================= */
/* 3. FORMLAR VE BUTONLAR                  */
/* ======================================= */

.kis-field { 
    margin-bottom: 22px; 
}
.kis-field label { 
    display: block; 
    font-weight: 500; 
    margin-bottom: 8px; 
    color: var(--color-text);
    font-size: 0.9375em;
}
.kis-field input[type="text"], 
.kis-field input[type="tel"], 
.kis-field select {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.9375em;
    transition: all 0.2s ease;
    color: var(--color-text);
    background: var(--color-background);
    font-family: var(--font-base);
}
.kis-field input:focus, .kis-field select:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 3px var(--color-primary-light);
}
.kis-field input::placeholder {
    color: #94a3b8;
}

/* --- Butonlar --- */
.kis-btn {
    padding: 11px 24px;
    /* DİKKAT: Burada gradyan kullandık */
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%); 
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    /* transition: all 0.2s ease; yerine sadece geçiş yapabileceğimiz özellikleri belirtelim */
    transition: background 0.3s ease, transform 0.1s ease, box-shadow 0.2s ease; 
    font-weight: 600;
    font-family: var(--font-heading);
    font-size: 0.9375em;
    box-shadow: var(--shadow-sm);
}

.kis-btn:hover:not(:disabled) {
    /* KRİTİK DÜZELTME: Sadece background-color yerine, HOVER için DÜZ bir arka plan tanımlıyoruz */
    background: var(--color-primary-dark); /* Düz, koyu rengi kullan */
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.kis-btn:active:not(:disabled) {
    transform: translateY(0);
    background: var(--color-primary); /* Tıklandığında ana renge dön */
}
.kis-btn:disabled {
    background: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 32px;
}

/* ======================================= */
/* 4. İZİN GÜNLERİ VE MENÜ SEÇİM KARTLARI  */
/* ======================================= */

/* İzin Günleri Kutuları */
.izin-gunu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); 
    gap: 12px;
}
.izin-gunu-checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.izin-gunu-label {
    display: block;
    padding: 14px 12px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    text-align: center;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    background: var(--color-background);
    font-size: 0.9375em;
}
.izin-gunu-label:hover {
    border-color: var(--color-primary);
    background: var(--color-background-light);
}
.izin-gunu-checkbox:checked + .izin-gunu-label {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

/* Menü Kartları (Mobil Uyumlu Grid) */
.menu-grid-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 14px;
}

.menu-card {
    position: relative; 
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: all 0.2s ease;
    cursor: pointer;
    height: 100%;
    background: var(--color-background);
}
.menu-card:hover {
    border-color: #c8e6d4;
    box-shadow: 0 2px 8px rgba(72, 187, 120, 0.08);
}

/* Kapsayıcı Label: Tüm kartı kaplar */
.menu-select-label {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    cursor: pointer;
    position: relative;
}

/* --- Set Menü Checkbox Görünümü --- */
.menu-checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* CHECKBOX SEÇİLDİĞİNDE KARTIN GÖRÜNÜMÜ */
.menu-checkbox:checked + .menu-select-label {
    background-color: var(--color-background-selected);
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 12px rgba(72, 187, 120, 0.15);
}
.menu-checkbox:checked + .menu-select-label .card-header {
    background: var(--color-background-selected);
    color: var(--color-primary);
    border-bottom-color: rgba(72, 187, 120, 0.2);
}

/* Onay İkonu - KALDIRILDI */
.checkmark-icon {
    display: none;
}

/* --- Kart Başlığı --- */
.card-header {
    background: var(--color-background-light);
    padding: 12px 14px;
    border-bottom: 1px solid var(--color-border);
    font-weight: 600;
    font-size: 0.95em;
    color: var(--color-text);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    min-height: 44px;
    text-align: center;
}

/* --- Menü İçeriği --- */
.menu-content {
    flex-grow: 1; 
    padding: 14px;
    margin: 0;
    list-style: none;
    font-size: 0.85em;
    color: var(--color-text-light);
    background: var(--color-background);
    line-height: 1.6;
}
.menu-checkbox:checked + .menu-select-label .menu-content {
    background-color: var(--color-background-selected);
}
.menu-content li {
    padding: 4px 0;
    border-bottom: 1px solid #f1f5f9;
}
.menu-content li:last-child {
    border-bottom: none;
}
.menu-content strong {
    color: var(--color-text);
    font-weight: 600;
}

/* --- Mobil Uyum --- */
@media (max-width: 600px) {
    .menu-grid-wrapper {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .izin-gunu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .kis-form-wrapper {
        margin: 10px;
        border-radius: var(--radius-md);
    }
    .kis-form-wrapper h2 {
        font-size: 1.5em;
        padding: 22px 20px;
    }
    .form-step {
        padding: 24px 20px;
    }
    #progress-bar-wrapper {
        padding: 18px 15px;
    }
    .progress-step {
        font-size: 0.8em;
    }
    .menu-content {
        font-size: 0.8em;
        padding: 10px;
    }
    .card-header {
        font-size: 0.9em;
        padding: 10px 8px;
    }
}

/* ======================================= */
/* 5. EK KURUMSAL DETAYLAR                 */
/* ======================================= */

/* Hata Mesajları */
.error-message {
    color: var(--color-secondary);
    font-size: 0.875em;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Başarı Mesajları */
.success-message {
    color: var(--color-success);
    font-size: 0.875em;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Bilgi Kutuları */
.info-box {
    background: var(--color-background-light);
    border-left: 3px solid var(--color-primary);
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    margin: 16px 0;
    font-size: 0.9em;
    color: var(--color-text-light);
}

/* Loading State */
.kis-btn.loading {
    position: relative;
    color: transparent;
}
.kis-btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid white;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}
@keyframes spinner {
    to { transform: rotate(360deg); }
}

#final-success-card {
    text-align: center;
    padding: 40px 20px;
    background: var(--color-background);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
}

.success-icon-container {
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
}

.final-heading {
    font-size: 2.2em;
    font-family: var(--font-heading);
    color: var(--color-primary);
    margin: 0 0 10px;
}

.final-subheading {
    font-size: 1.1em;
    color: var(--color-text);
    margin-bottom: 30px;
}

.order-details-box {
    background: var(--color-background-light);
    border-radius: var(--radius-sm);
    padding: 15px;
    border: 1px solid #c8e6d4;
    max-width: 350px;
    margin: 0 auto 30px;
    font-size: 0.95em;
    color: var(--color-text);
    text-align: left;
}
.order-details-box p {
    margin: 5px 0;
}
.final-footer {
    font-size: 0.85em;
    color: var(--color-text-light);
}
.menu-kalori-badge {
    position: absolute;
    right: 5px; /* Sağa hizala */
    bottom: 5px; /* Alta hizala */
    padding: 5px 8px;
    background: #f4f4f4; /* Hafif bir arka plan */
    color: #333;
    font-size: 0.85em;
    border-radius: 4px;
    font-weight: normal;
    z-index: 10;
    border: 1px solid #ddd;
}
.menu-kalori-badge strong {
    font-weight: bold;
    color: #e65100; /* Enerjiyi vurgula */
}
.menu-kalori-badge {
        font-size: 0.75em;
        padding: 3px 5px;
        right: 3px;
        bottom: 3px;
    }
/* --- SVG Animasyonu (İkonik Onay İşareti) --- */

.checkmark {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: block;
    stroke-width: 3;
    stroke: var(--color-primary);
    stroke-miterlimit: 10;
    margin: 10% auto;
    box-shadow: inset 0px 0px 0px var(--color-primary-light);
    animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}

.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 3;
    stroke-miterlimit: 10;
    stroke: var(--color-primary);
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}
@keyframes scale {
    0%, 100% {
        transform: none;
    }
    50% {
        transform: scale3d(1.1, 1.1, 1);
    }
}
@keyframes fill {
    100% {
        box-shadow: inset 0px 0px 0px 100px var(--color-primary-light);
    }
}

/* --- Mobil Uyum (Final Kart) --- */
@media (max-width: 480px) {
    #final-success-card {
        padding: 30px 15px;
    }
    .final-heading {
        font-size: 1.8em;
    }
    .success-icon-container {
        width: 80px;
        height: 80px;
    }
}
.welcome-box {
    background: var(--color-background-light);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid var(--color-border);
}
.welcome-heading {
    font-size: 1.5em;
    color: var(--color-primary-dark);
    font-family: var(--font-heading);
    margin: 0 0 10px;
}
.welcome-box p {
    margin: 5px 0;
    line-height: 1.5;
    color: var(--color-text);
}
.edit-link {
    color: var(--color-primary);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    margin-top: 15px !important;
}

.info-box-summary {
    display: flex;
    justify-content: space-around;
    padding: 15px;
    background: var(--color-background-selected);
    border-radius: var(--radius-sm);
    margin-bottom: 25px;
}
.info-box-summary p {
    margin: 0;
    font-weight: 500;
    color: var(--color-primary-dark);
}

.summary-details-container {
    box-shadow: var(--shadow-sm);
    padding: 20px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: white;
}

.summary-table-heading {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--color-text);
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--color-border);
}

.summary-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
}
.summary-table th, .summary-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    text-align: left;
    font-size: 0.9em;
}
.summary-table th {
    background: var(--color-background-light);
    color: var(--color-text);
    font-weight: 600;
    width: 30%;
}
.summary-table tbody tr:last-child td {
    border-bottom: none;
}
.summary-table .no-selection {
    color: var(--color-secondary);
    font-style: italic;
    text-align: center;
}

.final-commitment-box {
    margin-top: 30px;
    padding: 20px;
    border-top: 2px solid var(--color-primary-light);
    text-align: center;
    font-size: 1.05em;
    line-height: 1.6;
}
.final-commitment-box strong {
    color: var(--color-primary-dark);
}
.team-signature {
    margin-top: 15px;
    font-style: italic;
    color: var(--color-text-light);
}

/* Mobil Uyumluluk */
@media (max-width: 500px) {
    .info-box-summary {
        flex-direction: column;
        gap: 10px;
    }
    .info-box-summary p {
        text-align: center;
    }
}