/*
 * EAE — veli başvuru sayfası (/basvuru) için iofrm eklentileri.
 *
 * iofrm iskeleti (public/vendor/iofrm/css/iofrm-style.css) login/register gibi
 * KISA formlar için tasarlanmıştır; bu dosya aynı görsel dili bozmadan uzun
 * başvuru formunun ihtiyaç duyduğu parçaları ekler: geniş form sütunu,
 * fieldset/legend, native select/textarea/dosya alanı, bölüm başlıkları,
 * ücret özeti ve WCAG 2.2 AA odak halkaları. Renkler iofrm-eae-theme.css ile
 * aynı kurumsal paletten gelir (lacivert #003A70 / bordo #9E2A2B).
 *
 * Yalnızca layouts/public.blade.php yükler — auth ekranlarını ETKİLEMEZ.
 */

/* Author display kuralları tarayıcının [hidden] varsayılanını ezebilir;
   hidden HER ZAMAN gizler (ör. #fee-amount-box, #otp-code-field). */
[hidden] { display: none !important; }

/* --- Erişilebilirlik: skip link + odak halkaları --- */
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus {
    position: fixed; top: 12px; left: 12px; z-index: 2000;
    padding: 10px 18px; background: #fff; color: #003A70;
    font-weight: 700; border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .2);
}

a:focus-visible, button:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid #003A70;
    outline-offset: 2px;
}
.img-holder a:focus-visible { outline-color: #fff; }
/* iofrm onay kutusunu ekran dışına taşır; odak halkası etikete çizilir. */
.form-content input[type=checkbox]:focus-visible + label:before {
    outline: 3px solid #003A70;
    outline-offset: 2px;
}

/* --- Uzun form için geniş sütun --- */
.form-content .form-items { max-width: 720px; }

/* --- Sol panel: bölüm listesi --- */
.apply-steps {
    display: inline-block;
    width: 100%;
    max-width: 378px;
    margin: 0;
    padding: 0;
    list-style: none;
    text-align: left;
}
.apply-steps li {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 7px 0;
    color: rgba(255, 255, 255, .88);
    font-size: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, .14);
}
.apply-steps li:last-child { border-bottom: 0; }
.apply-steps .n {
    flex: none;
    font-size: 12px;
    font-weight: 700;
    color: #E8B9AE;
}

/* Dar ekranda (iofrm on-top-mobile bandı) yerleşim düzeltmeleri.
   iofrm iskeletinde .iofrm-layout her zaman flex-SATIRDIR; on-top-mobile
   modunda panel width:100% olsa da form-holder ile yan yana sıkışır —
   sütuna çevrilmesi gerekir. .info-holder'ın dikey ortalama transform'u da
   içerik yüksekliğine göre akmalı. --- */
@media (max-width: 992px) {
    .iofrm-layout { flex-direction: column; height: auto; }
    .form-body.on-top-mobile .img-holder { padding: 100px 32px 28px; }
    .img-holder .info-holder { top: 0; transform: none; }
    .apply-steps { display: none; }
    .img-holder .bottom-view { position: static; margin-top: 12px; text-align: left; }
}

/* --- Sayfa/bölüm başlıkları --- */
.form-content h3 { color: #12212e; }
.form-content p.form-subtitle { margin-bottom: 26px; }

.apply-section {
    margin-top: 34px;
    padding-top: 26px;
    border-top: 1px solid #e7ecf1;
}
.apply-section:first-of-type { margin-top: 8px; padding-top: 0; border-top: 0; }

.section-title {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 0 0 4px;
    color: #003A70;
    font-size: 18px;
    font-weight: 700;
}
/* ERES style.css'in genel .num hap stilini (lacivert zemin, 0 20px padding)
   etkisizleştirmek için tüm kutu özellikleri açıkça sıfırlanır. */
.form-content .section-title .num {
    flex: none;
    display: inline;
    width: auto;
    height: auto;
    padding: 0;
    background: transparent;
    border-radius: 0;
    line-height: inherit;
    font-size: 13px;
    font-weight: 700;
    color: #9E2A2B;
    letter-spacing: .04em;
}
/* iofrm'nin .form-content p (18px) kuralından daha özgül olmalı. */
.form-content p.section-sub {
    margin: 0 0 18px;
    font-size: 14px;
    font-weight: 400;
    color: #5b6b7c;
    line-height: 1.5;
    text-align: left;
}

/* --- fieldset/legend (Bootstrap 5 reboot sıfırlaması) --- */
.form-content fieldset {
    border: 0;
    padding: 0;
    margin: 0;
    min-width: 0;
}
.form-content fieldset + fieldset { margin-top: 10px; }
.form-content legend {
    float: none;
    width: auto;
    padding: 0;
    margin: 6px 0 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: #5b6b7c;
    line-height: 1.4;
}

/* --- Etiketler (beyaz zemin) --- */
.form-content label {
    display: inline-block;
    margin-bottom: 6px;
    color: #2c3a48;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

/* --- Native select / textarea: temadaki input görünümüyle eş --- */
.form-content select.form-control {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: inherit;
    padding: 12px 42px 12px 16px;
    margin-bottom: 14px;
    border: 1px solid #d7dee6;
    border-radius: 9px;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%23003A70' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    font-size: 15px;
    color: #12212e;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.form-content select.form-control:hover { border-color: #a9b6c3; }
.form-content select.form-control:focus {
    border-color: #003A70;
    box-shadow: 0 0 0 3px rgba(0, 58, 112, .15);
}
.form-content select.form-control:disabled {
    color: #5b6b7c;
    background-color: #f0f3f7;
    border-color: #dfe5ec;
    cursor: not-allowed;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%235b6b7c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.form-content textarea,
.form-content textarea.form-control {
    border: 1px solid #d7dee6;
    border-radius: 9px;
    background-color: #fff;
    color: #12212e;
    padding: 12px 16px;
    font-size: 15px;
    resize: vertical;
    height: auto;
    min-height: 96px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.form-content textarea:hover { border-color: #a9b6c3; background-color: #fff; color: #12212e; }
.form-content textarea:focus {
    border-color: #003A70;
    background-color: #fff;
    color: #12212e;
    box-shadow: 0 0 0 3px rgba(0, 58, 112, .15);
}

/* --- Dosya alanı: native input, tema diliyle --- */
.form-content input[type=file] {
    padding: 8px 10px;
    cursor: pointer;
    color: #5b6b7c;
}
.form-content input[type=file]::file-selector-button {
    margin-right: 12px;
    padding: 7px 14px;
    border: 1px solid rgba(0, 58, 112, .25);
    border-radius: 7px;
    background: #f2f6fa;
    color: #003A70;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s ease;
}
.form-content input[type=file]::file-selector-button:hover { background: #e9eff6; }

/* --- İpucu / hata / durum metinleri --- */
.form-content .form-hint {
    display: block;
    margin: -6px 0 14px;
    font-size: 12.5px;
    font-weight: 400;
    color: #5b6b7c;
    line-height: 1.5;
}
.form-content p.form-hint { text-align: left; margin: 8px 0 0; }
.form-content small.error-message {
    display: block;
    margin: -6px 0 14px;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.5;
}

/* --- Onay kutuları: uzun metinli KVKK/onam satırları --- */
.consent-item { margin-bottom: 12px; }
.form-content .consent-item input[type=checkbox]:not(:checked) + label,
.form-content .consent-item input[type=checkbox]:checked + label {
    display: inline-block;
    padding-left: 32px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.55;
}
.form-content .consent-item small.error-message { margin-top: 4px; }

/* --- Düğmeler: .form-button dışında da kullanılabilen taban --- */
.form-content .ibtn {
    display: inline-block;
    border: 0;
    border-radius: 7px;
    padding: 11px 22px;
    background-color: #003A70;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 58, 112, .25);
    transition: background .2s ease, box-shadow .2s ease;
}
.form-content .ibtn:hover, .form-content .ibtn:focus {
    background-color: #00294f;
    color: #fff;
    box-shadow: 0 6px 16px -4px rgba(0, 58, 112, .38);
}

/* OTP: düğme, yanındaki etiketli girişle hizalanır */
@media (min-width: 576px) {
    .otp-send { padding-top: 26px; }
}
.otp-verify-row { display: flex; gap: 10px; align-items: stretch; }
.otp-verify-row .form-control { flex: 1; margin-bottom: 0; }
.otp-verify-row .ibtn { flex: none; white-space: nowrap; }
#otp-code-field { margin-bottom: 14px; }

/* --- Ücret özeti --- */
.form-content p.fee-summary,
.fee-summary {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin: 10px 0 4px;
    padding: 14px 18px;
    background: #f2f6fa;
    border: 1px solid rgba(0, 58, 112, .18);
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600;
    color: #12212e;
    text-align: left;
}
.fee-summary b {
    font-size: 22px;
    font-weight: 700;
    color: #003A70;
}

/* --- Gönderim --- */
.apply-submit {
    margin-top: 34px;
    padding-top: 22px;
    border-top: 1px solid #e7ecf1;
}
.form-content p.submit-note {
    margin: 0 0 14px;
    font-size: 13px;
    font-weight: 400;
    color: #5b6b7c;
    text-align: left;
    line-height: 1.5;
}
.form-content .form-button .ibtn.apply-submit-btn {
    width: 100%;
    padding: 13px 28px;
    font-size: 15px;
    border-radius: 8px;
}

/* --- Sayfa altı bağlantıları (giriş + telif) --- */
.apply-footer {
    margin-top: 30px;
    padding-top: 16px;
    border-top: 1px solid #e7ecf1;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #5b6b7c;
}
.form-content .apply-footer p {
    margin: 0;
    font-size: 13px;
    font-weight: 400;
    color: #5b6b7c;
}
.apply-footer a { color: #003A70; font-weight: 600; text-decoration: none; }
.apply-footer a:hover { text-decoration: underline; }

/* --- Bildirim kutuları (ERES/BS5 .alert üzerine ufak dokunuş) --- */
.form-items .alert { text-align: left; font-size: 14px; }

@media (max-width: 992px) {
    .form-holder .form-content { padding: 40px 24px; }
}
@media (max-width: 575px) {
    .form-holder .form-content { padding: 30px 16px; }
    .otp-verify-row { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}
