/* Hesap arayuzu parcasi: talep.css. Sahibi: U18 (sahip istegi 2026-10-15; kb/29 bolum 28). */
/*
| Destek talebi formu (/pages/service-request, isaretleme ServiceRequestPage)
| ve siparis detayindaki pencereler (OrderDetailMarkup: "Siparişimde sorun
| var", betikle "Siparişi iptal et"). Davranis talep.js.
|
| Pencere: masaustunde ortali, en cok 560 px; 720 px ve altinda alttan gelen
| tam ekran sayfa (guvenli alan dolgusu, islem dugmeleri altta sabit).
| Apple HIG: dokunma hedefi en az 44 pt, alan yazisi 16 px (iOS yakinlastirmaz),
| 2 px odak halkasi, rem tabanli yazi, prefers-reduced-motion'da hareket yok.
| Ana islem dugmesi siyah zemin beyaz yazi (koyu temada tersi): hesap
| kabugunun --ae-acc-primary-bg ve --ae-acc-primary-ink degiskenleri, yoksa
| temaya gore yedek. Renkler paketin --customer-* belirteclerinden (iki tema).
*/
.ae-sr,
.ae-sr-done,
.ae-dlg {
    --ae-u18-primary-bg: var(--ae-acc-primary-bg, #fff);
    --ae-u18-primary-ink: var(--ae-acc-primary-ink, #000);
    --ae-u18-error: #ff6b6b;
}

:root[data-theme="light"] :is(.ae-sr, .ae-sr-done, .ae-dlg) {
    --ae-u18-primary-bg: var(--ae-acc-primary-bg, #000);
    --ae-u18-primary-ink: var(--ae-acc-primary-ink, #fff);
    --ae-u18-error: #b42318;
}

/* ==== Destek talebi formu ==== */
.ae-sr-note {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    color: var(--customer-muted);
}

/* Ana dugme: paketin .shop-primary sinifi KULLANILMAZ (site geneli teal dolgu
   !important ile gelir); bicim burada, renk hesap ekranlarinin siyah ve beyazi. */
.customer-page .ae-sr .ae-sr-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
    min-height: 48px;
    padding: 12px 23px;
    border: 1px solid var(--ae-u18-primary-bg);
    border-radius: 28px;
    background: var(--ae-u18-primary-bg);
    color: var(--ae-u18-primary-ink);
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.customer-page .ae-sr .ae-sr-submit:focus-visible {
    outline: 2px solid var(--customer-accent);
    outline-offset: 3px;
}

@media (hover: hover) {
    .customer-page .ae-sr .ae-sr-submit:hover:not(:disabled) {
        opacity: 0.86;
    }
}

.ae-sr-submit[aria-busy="true"],
.ae-sr-submit[disabled] {
    opacity: 0.6;
    cursor: progress;
}

.ae-sr-kvkk {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.ae-sr-kvkk a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Alan hatasi ve durum satiri. */
.ae-sr-error {
    display: block;
    margin: 6px 0 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    color: var(--ae-u18-error);
}

.ae-sr-error:empty {
    display: none;
}

:is(.ae-sr, .ae-dlg) [aria-invalid="true"] {
    border-color: var(--ae-u18-error);
}

.ae-sr-status {
    margin: 0;
    font-size: 15px;
    line-height: 1.45;
    color: var(--customer-muted);
}

.ae-sr-status:empty {
    display: none;
}

.ae-sr-status[data-tone="error"] {
    color: var(--ae-u18-error);
}

/* Bal kupu: gorunmez, odak almaz (aria-hidden ve tabindex -1 isaretlemede). */
.ae-sr-hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Basari: formun yerine. */
.ae-sr-done {
    display: grid;
    justify-items: start;
    gap: 10px;
    align-content: start;
}

.ae-sr-done:focus {
    outline: none;
}

.ae-sr-done:focus-visible {
    outline: 2px solid var(--customer-accent);
    outline-offset: 2px;
}

.ae-sr-done h2,
.ae-dlg-done h2 {
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.3;
}

.ae-sr-done p,
.ae-dlg-done p {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
}

.ae-sr-done-code strong {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.2px;
}

.ae-sr-done-icon {
    display: inline-block;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--customer-soft);
    box-shadow: inset 0 0 0 1px var(--customer-line);
    position: relative;
}

.ae-sr-done-icon::before {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 22px;
    height: 22px;
    background: var(--customer-accent);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.ae-sr-done .customer-actions {
    margin-top: 6px;
}

/* ==== Pencere ==== */
dialog.ae-dlg {
    box-sizing: border-box;
    width: min(560px, calc(100vw - 32px));
    max-width: none;
    max-height: calc(100dvh - 48px);
    margin: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--customer-text);
    overflow: visible;
}

dialog.ae-dlg::backdrop {
    background: rgba(0, 0, 0, 0.55);
}

.ae-dlg-panel {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    max-height: calc(100dvh - 48px);
    overflow: auto;
    overscroll-behavior: contain;
    padding: 24px;
    border: 1px solid var(--customer-line);
    border-radius: 20px;
    background: var(--customer-surface);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}

.ae-dlg-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.ae-dlg-title {
    margin: 0;
    padding-top: 8px;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
}

.ae-dlg-close {
    flex: 0 0 auto;
    position: relative;
    width: 44px;
    height: 44px;
    margin: -6px -10px 0 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--customer-muted);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.ae-dlg-x::before,
.ae-dlg-x::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 1.5px;
    border-radius: 1px;
    background: currentColor;
}

.ae-dlg-x::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.ae-dlg-x::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

@media (hover: hover) {
    .ae-dlg-close:hover {
        background: var(--customer-soft);
        color: var(--customer-text);
    }
}

.ae-dlg-close:focus-visible,
.ae-dlg :is(button, select, textarea, input, a):focus-visible {
    outline: 2px solid var(--customer-accent);
    outline-offset: 2px;
}

.ae-dlg-lead {
    margin: 6px 0 18px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--customer-muted);
}

.ae-dlg-form,
.ae-dlg .ae-od2-form {
    display: grid;
    gap: 14px;
    max-width: none;
    padding: 0;
}

.ae-dlg .ae-od2-field textarea {
    min-height: 112px;
    resize: vertical;
}

.ae-dlg-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 4px;
}

.ae-dlg-done {
    display: grid;
    justify-items: start;
    gap: 10px;
}

.ae-dlg-done h2:focus {
    outline: none;
}

@media (prefers-reduced-motion: no-preference) {
    dialog.ae-dlg[open] .ae-dlg-panel {
        animation: ae-dlg-in 0.18s ease-out;
    }
}

@keyframes ae-dlg-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.99);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* Telefon: alttan gelen tam ekran sayfa; islem dugmeleri altta, guvenli alan dolgulu. */
@media (max-width: 720px) {
    dialog.ae-dlg {
        width: 100%;
        height: 100%;
        max-height: none;
        margin: 0;
        inset: 0;
    }

    .ae-dlg-panel {
        min-height: 100%;
        max-height: 100%;
        padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .ae-dlg-form,
    .ae-dlg .ae-od2-form {
        display: flex;
        flex: 1 0 auto;
        flex-direction: column;
    }

    .ae-dlg-actions {
        position: sticky;
        bottom: 0;
        margin: auto calc(-1 * max(16px, env(safe-area-inset-left))) 0;
        padding: 12px max(16px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
        border-top: 1px solid var(--customer-line);
        background: var(--customer-surface);
    }

    .ae-dlg-actions > * {
        flex: 1 1 0;
    }

    .ae-dlg-done {
        padding-bottom: max(16px, env(safe-area-inset-bottom));
    }

    @media (prefers-reduced-motion: no-preference) {
        dialog.ae-dlg[open] .ae-dlg-panel {
            animation: ae-dlg-up 0.24s ease-out;
        }
    }
}

@keyframes ae-dlg-up {
    from {
        transform: translateY(24%);
        opacity: 0.4;
    }

    to {
        transform: none;
        opacity: 1;
    }
}

/* ==== U19: sayfa formlari (sahip istegi 2026-10-16; kb/29 bolum 34) ====
| Siparis takibi, iletisim, kurumsal proje, AEKE ile Tanisin, K1 bilgi
| penceresi ve cayma formu sunucuya gider (SiteFormPage, POST /talep/{form}).
| Alanlar paketin kendi form siniflariyla cizilir (contact-form,
| discovery-enquiry, legal-form, K1 penceresi, siparis takibinde shop-panel);
| burada yalniz eklenen parcalar: etiket metni, istege bagli notu, alan
| hatasi, durum satiri, onay ve cayma formundaki siparis secimi. Dokunma
| hedefleri en az 44 px; renkler paketin degiskenleriyle iki temada.
*/
form[data-ae-form-key] .ae-sr-label {
    display: block;
}

form[data-ae-form-key] .field-optional {
    font-size: 12px;
    font-weight: 400;
    color: inherit;
    opacity: 0.72;
}

form[data-ae-form-key] .ae-sr-error {
    margin-top: 2px;
    font-size: 13px;
}

form[data-ae-form-key] .ae-sr-status:not(:empty) {
    margin: 0 0 14px;
}

form[data-ae-form-key] .ae-sr-note {
    margin: 0 0 18px;
    font-size: 14px;
    line-height: 1.5;
    opacity: 0.8;
}

form[data-ae-form-key] .ae-sr-kvkk {
    margin: 12px 0 0;
}

/* Siparis takibi: hesap ekranlarinin siyah ve beyaz ana dugmesi (U18 ile ayni). */
.customer-page form.ae-sr-page .ae-sr-submit {
    width: 100%;
}

/* Kurumsal ve deneyim formu: not alani iki sutunu kaplar; uye notu izgaranin ustunde. */
.discovery-enquiry.ae-sr .enquiry-fields .wide {
    grid-column: 1 / -1;
}

/* Cayma formu: paketin legal-form stili yalniz input ve textarea'yi cizer; siparis secimi ayni gorunumde. */
.legal-form select {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: 12px;
    border: 1px solid var(--legal-border);
    border-radius: 6px;
    background: transparent;
    color: var(--legal-ink);
    font: inherit;
    line-height: 1.5;
}

.legal-form select option {
    color: #000;
    background: #fff;
}

.legal-form.ae-sr .legal-form-note {
    margin: 16px 0;
}

.legal-form.ae-sr .ae-sr-submit {
    min-height: 48px;
    padding: 12px 22px;
    border: 0;
    border-radius: 28px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

/* Onay: formun kutusunda (iletisim, kurumsal, deneyim, cayma) ya da K1 penceresinde. */
.contact-form.ae-sr-done,
.discovery-enquiry.ae-sr-done,
.legal-form.ae-sr-done {
    display: grid;
    gap: 10px;
    justify-items: start;
}

:is(.contact-form, .discovery-enquiry, .legal-form).ae-sr-done h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.25;
    text-align: start;
}

:is(.contact-form, .discovery-enquiry, .legal-form).ae-sr-done p {
    margin: 0;
    font-size: 15px;
    line-height: 1.55;
}

:is(.contact-form, .discovery-enquiry, .legal-form).ae-sr-done .customer-actions {
    margin-top: 8px;
}

:is(.contact-form, .discovery-enquiry, .legal-form).ae-sr-done a.shop-secondary {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

dialog .ae-sr-done {
    display: grid;
    gap: 10px;
    justify-items: start;
}

dialog .ae-sr-done .dialog-head {
    width: 100%;
    margin-bottom: 4px;
}

dialog .ae-sr-done h3 {
    margin: 0;
    font-size: 20px;
    line-height: 1.3;
}

dialog .ae-sr-done p {
    margin: 0;
    font-size: 15px;
    line-height: 1.55;
}

.ae-sr-done h3:focus {
    outline: none;
}

/* U19 olcum duzeltmeleri (Apple HIG ve AA kontrast; yerel sahne 390 ve 1440, iki tema):
   - Alanlar her genislikte en az 44 px (paketin iletisim ve K1 penceresi alanlari masaustunde 39 ile 43 px idi).
   - K1 penceresinin kapat dugmesi 44 x 44 (paketin carpi dugmesi 26 x 38 idi).
   - Koyu temada K1 penceresinin giris cumlesi ve KVKK notu AA (paketin grileri koyu zeminde 3,2 ve 4,05:1 idi).
   - Cayma formunda KVKK baglantisi metin renginde (acik temada teal 4,37:1 idi). */
form[data-ae-form-key] :is(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]), select) {
    box-sizing: border-box;
    min-height: 44px;
}

#inquiry-dialog .close-dialog {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
}

#inquiry-dialog :is(form[data-ae-form-key] > p:not(.ae-sr-status), .form-privacy, .form-privacy a) {
    color: #a7abb2;
}

:root[data-theme="light"] #inquiry-dialog :is(form[data-ae-form-key] > p:not(.ae-sr-status), .form-privacy, .form-privacy a) {
    color: #55585e;
}

.legal-page .legal-section .legal-form .ae-sr-kvkk a {
    color: inherit;
}
