/**
 * Ortak form captcha (matematik sorusu) stilleri
 * Danışmanlık modalı ve eğitim bilgi talep formları
 */

.form-captcha-field {
    margin-bottom: 16px;
}

.form-captcha-field > label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    color: #1e3a5f;
    margin-bottom: 8px;
    line-height: 1.3;
}

.form-captcha-field > label i {
    color: #0f73a7;
    font-size: 14px;
    flex-shrink: 0;
}

.form-captcha-field .req {
    color: #e23c3c;
    margin-left: 1px;
}

/* Yatay hizalı birleşik kutu — grid flex'ten daha kararlı */
.form-captcha-box {
    display: grid;
    grid-template-columns: auto minmax(80px, 1fr) 44px;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    background: #fff;
    border: 1.5px solid #d8e0ea;
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-captcha-box:focus-within {
    border-color: #0f73a7;
    box-shadow: 0 0 0 3px rgba(15, 115, 167, 0.12);
}

.form-captcha-soru {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    padding: 0 14px;
    background: #f1f5f9;
    border-right: 1px solid #e2e8f0;
    font-size: 17px;
    font-weight: 700;
    font-family: ui-monospace, SFMono-Regular, Consolas, Monaco, monospace;
    color: #1e3a5f;
    letter-spacing: 0.02em;
    user-select: none;
    white-space: nowrap;
}

.form-captcha-input {
    width: 100%;
    min-width: 0;
    max-width: none;
    height: 44px;
    padding: 0 14px;
    margin: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    font-size: 15px;
    font-family: inherit;
    color: #334155;
    box-shadow: none;
    -moz-appearance: textfield;
    appearance: textfield;
}

.form-captcha-input::-webkit-outer-spin-button,
.form-captcha-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.form-captcha-input:focus {
    outline: none;
    box-shadow: none;
}

.form-captcha-input::placeholder {
    color: #94a3b8;
}

/* Üst form stillerinin birleşik kutuyu bozmaması için */
.form-captcha-box .form-captcha-input,
.dh-form .form-captcha-field input.form-captcha-input,
.request-form .form-captcha-box .form-captcha-input {
    width: 100%;
    max-width: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0 14px;
    height: 44px;
}

.form-captcha-box .form-captcha-input:focus,
.dh-form .form-captcha-field input.form-captcha-input:focus,
.request-form .form-captcha-box .form-captcha-input:focus {
    border: none;
    box-shadow: none;
    outline: none;
}

.form-captcha-yenile {
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0;
    margin: 0;
    border: none;
    border-left: 1px solid #e2e8f0;
    border-radius: 0;
    background: #f8fafc;
    color: #475569;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
    line-height: 1;
}

.form-captcha-yenile:hover {
    background: #eef4fb;
    color: #0f73a7;
}

.form-captcha-yenile:focus-visible {
    outline: 2px solid #0f73a7;
    outline-offset: -2px;
}

.form-captcha-yenile i {
    font-size: 15px;
    pointer-events: none;
}

/* Hata durumu */
.form-captcha-field.is-invalid .form-captcha-box,
.form-captcha-field.dh-invalid .form-captcha-box {
    border-color: #e23c3c;
    box-shadow: 0 0 0 3px rgba(226, 60, 60, 0.1);
}

/* Danışmanlık modalı */
.dh-form .form-captcha-field > label {
    font-size: 13px;
    font-weight: 600;
    color: var(--dh-navy, #1e3a5f);
    margin-bottom: 6px;
}

.dh-form .form-captcha-field > label i {
    color: var(--dh-blue3, #0f73a7);
}

.dh-form .form-captcha-box {
    border-color: var(--dh-border, #d8e0ea);
}

.dh-form .form-captcha-box:focus-within {
    border-color: var(--dh-blue3, #0f73a7);
    box-shadow: 0 0 0 3px rgba(15, 115, 167, 0.12);
}

/* Eğitim detay formu */
.request-form .form-captcha-field > label {
    font-size: 14px;
    font-weight: 600;
    color: #1d458b;
    margin-bottom: 8px;
}

.request-form .form-captcha-field > label i {
    color: #1d458b;
}

.request-form .form-captcha-box {
    border: 2px solid #e8f0ff;
    border-radius: 12px;
}

.request-form .form-captcha-box:focus-within {
    border-color: #1d458b;
    box-shadow: 0 0 0 3px rgba(29, 69, 139, 0.1);
}

.request-form .form-captcha-soru {
    color: #1d458b;
    background: #f0f4ff;
    border-right-color: #e8f0ff;
}

.request-form .form-captcha-yenile {
    background: #fff;
    color: #1d458b;
    border-left-color: #e8f0ff;
}

.request-form .form-captcha-yenile:hover {
    background: #f8fafc;
    color: #1d458b;
}

.talep-form .form-captcha-field > label {
    font-size: 14px;
    font-weight: 600;
    color: #1d458b;
}

.talep-form .form-captcha-box {
    border: 2px solid #e8f0ff;
    border-radius: 12px;
}

/* Mobil — soru üstte, cevap + yenile altta yan yana */
@media (max-width: 480px) {
    .form-captcha-box {
        grid-template-columns: minmax(0, 1fr) 44px;
        grid-template-rows: auto 44px;
    }

    .form-captcha-soru {
        grid-column: 1 / -1;
        min-width: 0;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        padding: 10px 14px;
        min-height: 42px;
    }

    .form-captcha-input {
        grid-column: 1;
    }

    .form-captcha-yenile {
        grid-column: 2;
    }
}
