/**
 * WCOP chat form — Varyant A (inline icons).
 *
 * NOT: Widget 2.3 CSS'i .wooai-widget içindeki tüm button/input'lara
 * agresif reset uyguluyor (background, border, padding = 0). Bu yüzden
 * kritik özelliklerde `!important` kullanıyoruz. Aksi halde reset
 * bizim class selector'ımıza göre daha spesifik oluyor ve override ediyor.
 */

.wcop-chat-form {
    --wcf-sage-50:  #F3F9F5;
    --wcf-sage-100: #E7F3EA;
    --wcf-sage-200: #CFE6D4;
    --wcf-sage-300: #A9D2B3;
    --wcf-sage-400: #73B085;
    --wcf-sage-500: #4A9164;
    --wcf-sage-600: #347049;
    --wcf-sage-700: #265438;
    --wcf-sage-800: #1A3D28;
    --wcf-danger:   #B91C1C;

    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    margin-top: 12px !important;
    padding: 0 !important;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    line-height: 1.4;
    color: var(--wcf-sage-800);
}

/* ─── Row (input + inline icon) ─── */
.wcop-chat-form .wcop-chat-form__row {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    background: #fff !important;
    border: 1px solid rgba(38, 84, 56, 0.14) !important;
    border-radius: 14px !important;
    padding: 0 !important;
    margin: 0 !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.wcop-chat-form .wcop-chat-form__row:focus-within {
    border-color: var(--wcf-sage-500) !important;
    box-shadow: 0 0 0 3px rgba(74, 145, 100, 0.14) !important;
}

.wcop-chat-form .wcop-chat-form__label {
    position: absolute !important;
    left: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    height: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--wcf-sage-400) !important;
    background: transparent !important;
    border: 0 !important;
    pointer-events: none !important;
    transition: color 0.15s ease !important;
    cursor: text !important;
    z-index: 1 !important;
}

.wcop-chat-form .wcop-chat-form__row:focus-within .wcop-chat-form__label {
    color: var(--wcf-sage-600) !important;
}

.wcop-chat-form .wcop-chat-form__icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
}

.wcop-chat-form .wcop-chat-form__icon svg {
    width: 15px !important;
    height: 15px !important;
}

/* ─── Input ─── */
.wcop-chat-form input.wcop-chat-form__input {
    flex: 1 1 auto !important;
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    padding: 10px 12px 10px 38px !important;
    margin: 0 !important;
    font: inherit;
    font-size: 13px !important;
    line-height: 1.4 !important;
    color: var(--wcf-sage-800) !important;
    background: transparent !important;
    border: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    border-radius: 14px !important;
}

.wcop-chat-form input.wcop-chat-form__input::placeholder {
    color: rgba(38, 84, 56, 0.45) !important;
    opacity: 1 !important;
}

.wcop-chat-form input.wcop-chat-form__input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
    -webkit-text-fill-color: var(--wcf-sage-800) !important;
}

/* ─── Error message ─── */
.wcop-chat-form .wcop-chat-form__error {
    min-height: 0 !important;
    margin: 2px 2px 0 !important;
    padding: 0 !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
    color: var(--wcf-danger) !important;
    background: transparent !important;
}

.wcop-chat-form .wcop-chat-form__error:empty {
    display: none !important;
}

/* ─── Submit button ─── */
.wcop-chat-form button.wcop-chat-form__submit {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: auto !important;
    height: auto !important;
    margin: 4px 0 0 0 !important;
    padding: 11px 16px !important;
    font: inherit;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #fff !important;
    background: var(--wcf-sage-600) !important;
    border: 0 !important;
    border-radius: 14px !important;
    box-shadow: none !important;
    cursor: pointer !important;
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease !important;
    line-height: 1.4 !important;
    letter-spacing: 0.01em !important;
    text-transform: none !important;
}

.wcop-chat-form button.wcop-chat-form__submit:hover:not(:disabled) {
    background: var(--wcf-sage-700) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px rgba(38, 84, 56, 0.20) !important;
}

.wcop-chat-form button.wcop-chat-form__submit:active:not(:disabled) {
    transform: translateY(0) !important;
    box-shadow: none !important;
}

.wcop-chat-form button.wcop-chat-form__submit:disabled {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

.wcop-chat-form button.wcop-chat-form__submit svg {
    flex-shrink: 0 !important;
    width: 14px !important;
    height: 14px !important;
}

/* ─── Compact for mobile chat width ─── */
@media (max-width: 480px) {
    .wcop-chat-form {
        gap: 7px !important;
    }
    .wcop-chat-form input.wcop-chat-form__input {
        padding: 10px 10px 10px 36px !important;
        font-size: 13px !important;
    }
    .wcop-chat-form .wcop-chat-form__label {
        left: 11px !important;
    }
}
