/* ============================================================
   OVK İletişim Formu — Buton & Modal
   Tema tasarımıyla uyumlu; mevcut stilleri değiştirmez.
   ============================================================ */

/* ---------- CSS Değişkenleri (Customizer tarafından override edilir) ---------- */
:root {
    --ovk-cf-btn-bg:           var(--accent, #e11d48);
    --ovk-cf-btn-bg-hover:     var(--accent-dark, #be123c);
    --ovk-cf-btn-color:        #ffffff;
    --ovk-cf-btn-size:         15px;
    --ovk-cf-btn-weight:       700;
    --ovk-cf-btn-radius:       8px;
    --ovk-cf-btn-align:        center;
    --ovk-cf-btn-family:       inherit;

    --ovk-cf-title-color:      var(--ink, #0f172a);
    --ovk-cf-title-size:       20px;
    --ovk-cf-title-weight:     800;
    --ovk-cf-title-family:     inherit;
    --ovk-cf-title-align:      left;

    --ovk-cf-label-color:      var(--muted, #64748b);
    --ovk-cf-label-size:       13px;
    --ovk-cf-label-weight:     700;
    --ovk-cf-label-family:     inherit;
    --ovk-cf-label-align:      left;

    --ovk-cf-input-color:      var(--ink, #0f172a);
    --ovk-cf-input-size:       14px;
    --ovk-cf-input-weight:     400;
    --ovk-cf-input-family:     inherit;
    --ovk-cf-input-align:      left;

    --ovk-cf-submit-bg:        var(--accent, #e11d48);
    --ovk-cf-submit-bg-hover:  var(--accent-dark, #be123c);
    --ovk-cf-submit-color:     #ffffff;
    --ovk-cf-submit-size:      15px;
    --ovk-cf-submit-weight:    700;
    --ovk-cf-submit-family:    inherit;
    --ovk-cf-submit-align:     center;
}

/* ---------- Tetikleyici Buton ---------- */
.ovk-contact-trigger {
    display: flex;
    align-items: center;
    justify-content: var(--ovk-cf-btn-align, center);
    gap: 8px;
    width: 100%;
    padding: 13px 20px;
    border: none;
    border-radius: var(--ovk-cf-btn-radius, 8px);
    background: var(--ovk-cf-btn-bg);
    color: var(--ovk-cf-btn-color);
    font-size: var(--ovk-cf-btn-size);
    font-weight: var(--ovk-cf-btn-weight);
    font-family: var(--ovk-cf-btn-family, inherit);
    text-align: var(--ovk-cf-btn-align, center);
    cursor: pointer;
    transition: background 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
    box-shadow: 0 2px 8px rgba(225, 29, 72, 0.18);
    line-height: 1.3;
    letter-spacing: 0.01em;
    white-space: nowrap;
    text-decoration: none;
    /* Filtre formu butonundan farklılaşsın */
    margin-top: 4px;
}

.ovk-contact-trigger:hover,
.ovk-contact-trigger:focus-visible {
    background: var(--ovk-cf-btn-bg-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(225, 29, 72, 0.28);
    color: var(--ovk-cf-btn-color);
    outline: none;
}

/* Ana tema button:hover override'ı */
button.ovk-contact-trigger:hover,
button.ovk-contact-form__submit:hover {
    background: var(--ovk-cf-btn-bg-hover);
}

.ovk-contact-trigger:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(225, 29, 72, 0.14);
}

.ovk-contact-trigger svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---------- Overlay ---------- */
.ovk-contact-overlay {
    position: fixed;
    inset: 0;
    z-index: 9990;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.ovk-contact-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

/* ---------- Modal ---------- */
.ovk-contact-modal {
    position: relative;
    width: 100%;
    max-width: 480px;
    background: var(--surface, #ffffff);
    border: 1px solid var(--line, #d9e1ea);
    border-radius: 12px;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18);
    padding: 32px 28px 28px;
    transform: translateY(18px) scale(0.97);
    transition: transform 0.24s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 92vh;
    overflow-y: auto;
}

.ovk-contact-overlay.is-open .ovk-contact-modal {
    transform: translateY(0) scale(1);
}

/* ---------- Modal Başlık ---------- */
.ovk-contact-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
}

.ovk-contact-modal__title {
    margin: 0;
    color: var(--ovk-cf-title-color);
    font-size: var(--ovk-cf-title-size);
    font-weight: var(--ovk-cf-title-weight);
    font-family: var(--ovk-cf-title-family, inherit);
    text-align: var(--ovk-cf-title-align, left);
    line-height: 1.25;
}

/* ---------- Kapat Butonu ---------- */
.ovk-contact-close {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--line, #d9e1ea);
    border-radius: 6px;
    background: transparent;
    color: var(--muted, #64748b);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    line-height: 1;
    box-shadow: none;
}

.ovk-contact-close:hover,
.ovk-contact-close:focus-visible {
    background: #f1f5f9;
    color: var(--ink, #0f172a);
    border-color: var(--ink, #0f172a);
    outline: none;
    transform: none;
}

.ovk-contact-close svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    fill: none;
}

/* ---------- Form Alanları ---------- */
.ovk-contact-form {
    display: grid;
    gap: 16px;
}

.ovk-contact-form__field {
    display: grid;
    gap: 6px;
}

.ovk-contact-form__label {
    color: var(--ovk-cf-label-color);
    font-size: var(--ovk-cf-label-size);
    font-weight: var(--ovk-cf-label-weight);
    font-family: var(--ovk-cf-label-family, inherit);
    text-align: var(--ovk-cf-label-align, left);
    line-height: 1.3;
}

.ovk-contact-form__input,
.ovk-contact-form__textarea {
    width: 100%;
    padding: 10px 13px;
    border: 1px solid var(--line, #d9e1ea);
    border-radius: 7px;
    background: #f8fafc;
    color: var(--ovk-cf-input-color);
    font-size: var(--ovk-cf-input-size);
    font-weight: var(--ovk-cf-input-weight);
    font-family: var(--ovk-cf-input-family, inherit);
    text-align: var(--ovk-cf-input-align, left);
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    box-sizing: border-box;
    outline: none;
    line-height: 1.5;
    appearance: none;
    -webkit-appearance: none;
}

.ovk-contact-form__input:focus,
.ovk-contact-form__textarea:focus {
    border-color: var(--accent, #e11d48);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.1);
}

.ovk-contact-form__textarea {
    resize: vertical;
    min-height: 110px;
}

/* ---------- Gönder Butonu ---------- */
.ovk-contact-form__submit {
    display: flex;
    align-items: center;
    justify-content: var(--ovk-cf-submit-align, center);
    gap: 8px;
    width: 100%;
    padding: 13px 20px;
    border: none;
    border-radius: 8px;
    background: var(--ovk-cf-submit-bg);
    color: var(--ovk-cf-submit-color);
    font-size: var(--ovk-cf-submit-size);
    font-weight: var(--ovk-cf-submit-weight);
    font-family: var(--ovk-cf-submit-family, inherit);
    text-align: var(--ovk-cf-submit-align, center);
    cursor: pointer;
    transition: background 0.18s ease, transform 0.12s ease;
    margin-top: 4px;
    letter-spacing: 0.01em;
}

.ovk-contact-form__submit:hover,
.ovk-contact-form__submit:focus-visible {
    background: var(--ovk-cf-submit-bg-hover);
    transform: translateY(-1px);
    outline: none;
}

.ovk-contact-form__submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

/* ---------- Başarı / Hata Mesajı ---------- */
.ovk-contact-notice {
    display: none;
    padding: 12px 14px;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 16px;
}

.ovk-contact-notice--success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
}

.ovk-contact-notice--error {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #be123c;
}

.ovk-contact-notice.is-visible {
    display: block;
}

/* ---------- Mobil ---------- */
@media (max-width: 600px) {
    .ovk-contact-modal {
        padding: 24px 18px 20px;
        border-radius: 10px;
    }

    .ovk-contact-modal__title {
        font-size: calc(var(--ovk-cf-title-size) * 0.9);
    }
}

/* ---------- Body scroll kilidi ---------- */
body.ovk-modal-open {
    overflow: hidden;
}

/* ---------- Focus trap için gizli çerçeve ---------- */
.ovk-contact-focus-guard {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
}
