/* WooMerchants — Vertriebspartner code field
 * Theme-agnostic styling that adopts the current site's button look
 * via currentColor and inherited typography. The field sits inside the
 * cart/checkout totals box; layout favours full-width input + button
 * below to survive narrow sidebars.
 */

.wm-vp-autoinject {
    margin-top: 1.25em;
}

.wm-vp-code-field {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    font-size: inherit;
    line-height: 1.4;
}

.wm-vp-code-field label {
    font-weight: 600;
    margin: 0;
}

.wm-vp-code-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    align-items: stretch;
}

.wm-vp-code-input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.65em 0.85em;
    font: inherit;
    color: inherit;
    background: transparent;
    border: 1px solid currentColor;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.wm-vp-code-input:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.wm-vp-code-apply {
    flex: 0 0 auto;
    min-width: 9em;
    padding: 0.75em 1.5em;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    border: 0;
    border-radius: 6px;
    background: var(--wm-vp-button-bg, #ec4899);
    color: var(--wm-vp-button-fg, #ffffff);
    transition: opacity 0.15s ease, transform 0.05s ease;
}

.wm-vp-code-apply:hover     { opacity: 0.88; }
.wm-vp-code-apply:active    { transform: translateY(1px); }
.wm-vp-code-apply[disabled] { opacity: 0.6; cursor: progress; }

.wm-vp-code-hint {
    margin: 0;
    opacity: 0.8;
    font-size: 0.9em;
}

.wm-vp-code-feedback {
    margin: 0;
    min-height: 1.4em;
    font-size: 0.95em;
}
.wm-vp-code-feedback[data-state="ok"]    { color: #4ade80; }
.wm-vp-code-feedback[data-state="error"] { color: #f87171; }

/* Variant slot used by the render_block injector — lets themes target
 * the autoinjected instances separately from manually placed ones. */
.wm-vp-autoinject--blocks .wm-vp-code-field { margin-top: 0.5em; }
