/* ═══ FORMS — Inputs, Selects, Textareas ═════════════ */

body.inkside-theme input[type="text"],
body.inkside-theme input[type="email"],
body.inkside-theme input[type="password"],
body.inkside-theme input[type="search"],
body.inkside-theme input[type="url"],
body.inkside-theme input[type="tel"],
body.inkside-theme input[type="number"],
body.inkside-theme input[type="date"],
body.inkside-theme textarea,
body.inkside-theme select,
body.inkside-theme .ink-input {
    display: block;
    width: 100%;
    height: var(--ink-btn-height);
    padding: 0 var(--ink-space-md);
    font-family: var(--ink-font);
    font-size: 16px; /* Prevent iOS zoom */
    line-height: 1.5;
    color: var(--ink-text);
    background-color: var(--ink-bg);
    border: 1px solid var(--ink-border);
    border-radius: var(--ink-radius-md);
    transition:
        border-color var(--ink-transition-fast),
        box-shadow var(--ink-transition-fast);
    -webkit-appearance: none;
    appearance: none;
}

body.inkside-theme textarea {
    height: auto;
    min-height: 100px;
    padding: var(--ink-space-sm) var(--ink-space-md);
    resize: vertical;
}

body.inkside-theme select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%235b6b7d' viewBox='0 0 16 16'%3E%3Cpath d='M8 11.5l-5-5h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--ink-space-md) center;
    padding-right: var(--ink-space-xl);
}

/* ── Focus ── */
body.inkside-theme input:focus,
body.inkside-theme textarea:focus,
body.inkside-theme select:focus,
body.inkside-theme .ink-input:focus {
    outline: none;
    border-color: var(--ink-primary);
    box-shadow: 0 0 0 3px var(--ink-primary-ring);
}

/* ── Hover ── */
body.inkside-theme input:hover:not(:focus):not(:disabled),
body.inkside-theme textarea:hover:not(:focus):not(:disabled),
body.inkside-theme select:hover:not(:focus):not(:disabled) {
    border-color: var(--ink-border-hover);
}

/* ── Disabled ── */
body.inkside-theme input:disabled,
body.inkside-theme textarea:disabled,
body.inkside-theme select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: var(--ink-bg-muted);
}

/* ── Error ── */
body.inkside-theme .ink-input--error,
body.inkside-theme input.ink-input--error,
body.inkside-theme .woocommerce-invalid input {
    border-color: var(--ink-red);
}

body.inkside-theme .ink-input--error:focus,
body.inkside-theme .woocommerce-invalid input:focus {
    box-shadow: 0 0 0 3px var(--ink-red-bg);
}

body.inkside-theme .ink-error-message {
    color: var(--ink-red);
    font-size: var(--ink-font-size-sm);
    margin-top: var(--ink-space-xs);
}

/* ── Labels ── */
body.inkside-theme label,
body.inkside-theme .ink-label {
    display: block;
    font-size: var(--ink-font-size-sm);
    font-weight: 600;
    color: var(--ink-text);
    margin-bottom: var(--ink-space-xs);
}

/* ── Checkbox & Radio ── */
body.inkside-theme input[type="checkbox"],
body.inkside-theme input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--ink-primary);
    cursor: pointer;
}

/* ── Search field ── */
body.inkside-theme .ink-search {
    position: relative;
}

body.inkside-theme .ink-search__input {
    padding-left: var(--ink-space-xl);
}

body.inkside-theme .ink-search__icon {
    position: absolute;
    left: var(--ink-space-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--ink-text-faint);
    pointer-events: none;
}
