/* ── Gravity Forms style presets ─────────────────────────────────────────────
 *
 * Each preset overrides GF Orbital's CSS variables at a specificity that beats
 * the global .gform-theme--framework.gform-theme--framework defaults set by
 * oi_gf_palette_defaults(). Where variables don't reach (border-style, radius
 * overrides for underline/pill), direct element selectors are used.
 *
 * Applied via register_block_style('gravityforms/form', ...) — the block
 * editor adds .is-style-oi-gf-* to the .wp-block-gravityforms-form wrapper.
 * ────────────────────────────────────────────────────────────────────────── */

/* ── 1. Minimal ───────────────────────────────────────────────────────────────
 * Transparent inputs, thin palette-6 border. No background fill.
 * Best on white/light sections where you want a clean editorial look. */

.is-style-oi-gf-minimal .gform-theme--framework.gform-theme--framework {
    --gf-color-in-ctrl:         transparent;
    --gf-ctrl-border-color:     var(--wp--preset--color--palette-6);
    --gf-ctrl-border-color-focus: var(--wp--preset--color--palette-1);
}

/* ── 2. Filled ────────────────────────────────────────────────────────────────
 * Inputs have a light surface background (palette-8) with no visible border.
 * Border appears on focus. Works well on white or palette-9 sections. */

.is-style-oi-gf-filled .gform-theme--framework.gform-theme--framework {
    --gf-color-in-ctrl:           var(--wp--preset--color--palette-8);
    --gf-ctrl-border-color:       transparent;
    --gf-ctrl-border-color-focus: var(--wp--preset--color--palette-1);
}

/* ── 3. Underline ─────────────────────────────────────────────────────────────
 * Bottom border only — no box. Transparent background. Very clean/editorial.
 * Uses direct element selectors since no GF variable controls border-style. */

.is-style-oi-gf-underline .gform-theme--framework.gform-theme--framework {
    --gf-color-in-ctrl:       transparent;
    --gf-ctrl-border-color:   transparent;
}

.is-style-oi-gf-underline .gform_wrapper .ginput_container input[type="text"],
.is-style-oi-gf-underline .gform_wrapper .ginput_container input[type="email"],
.is-style-oi-gf-underline .gform_wrapper .ginput_container input[type="tel"],
.is-style-oi-gf-underline .gform_wrapper .ginput_container input[type="number"],
.is-style-oi-gf-underline .gform_wrapper .ginput_container input[type="url"],
.is-style-oi-gf-underline .gform_wrapper .ginput_container input[type="date"],
.is-style-oi-gf-underline .gform_wrapper .ginput_container input[type="password"],
.is-style-oi-gf-underline .gform_wrapper .ginput_container select,
.is-style-oi-gf-underline .gform_wrapper .ginput_container textarea {
    border-top:    none;
    border-left:   none;
    border-right:  none;
    border-bottom: 1px solid var(--wp--preset--color--palette-6);
    border-radius: 0;
    padding-left:  0;
    padding-right: 0;
    background:    transparent;
    box-shadow:    none;
}

.is-style-oi-gf-underline .gform_wrapper .ginput_container input:focus,
.is-style-oi-gf-underline .gform_wrapper .ginput_container select:focus,
.is-style-oi-gf-underline .gform_wrapper .ginput_container textarea:focus {
    border-bottom-color: var(--wp--preset--color--palette-1);
    outline:             none;
    box-shadow:          none;
}

/* ── 4. Pill ──────────────────────────────────────────────────────────────────
 * Fully rounded (pill-shaped) inputs with a subtle surface fill.
 * Only applies to single-line inputs — textarea stays rounded-rect. */

.is-style-oi-gf-pill .gform-theme--framework.gform-theme--framework {
    --gf-color-in-ctrl:           var(--wp--preset--color--palette-8);
    --gf-ctrl-border-color:       transparent;
    --gf-ctrl-border-color-focus: var(--wp--preset--color--palette-1);
}

.is-style-oi-gf-pill .gform_wrapper .ginput_container input[type="text"],
.is-style-oi-gf-pill .gform_wrapper .ginput_container input[type="email"],
.is-style-oi-gf-pill .gform_wrapper .ginput_container input[type="tel"],
.is-style-oi-gf-pill .gform_wrapper .ginput_container input[type="number"],
.is-style-oi-gf-pill .gform_wrapper .ginput_container input[type="url"],
.is-style-oi-gf-pill .gform_wrapper .ginput_container input[type="date"],
.is-style-oi-gf-pill .gform_wrapper .ginput_container input[type="password"],
.is-style-oi-gf-pill .gform_wrapper .ginput_container select {
    border-radius: 100px;
    padding-left:  1.25em;
    padding-right: 1.25em;
}
