.vx-cmb {
    position: relative;
    z-index: 2;
    display: block;
    box-sizing: border-box;
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 18px 0 22px;
    padding: 20px;
    clear: both;
    overflow: visible !important;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    background: #fff;
}

.vx-cmb,
.vx-cmb * {
    box-sizing: border-box;
}

.vx-cmb h3 {
    margin: 0 0 5px;
    font-size: 22px;
    line-height: 1.25;
}

.vx-cmb-note {
    margin: 0 0 16px;
    color: #666;
    line-height: 1.45;
}

.vx-cmb-status {
    display: none;
    width: 100%;
    margin: 0 0 14px;
    padding: 10px 12px;
    border: 1px solid #c62828;
    border-radius: 8px;
    background: #fff4f4;
    color: #8b1111;
    font-size: 14px;
    line-height: 1.4;
}

.vx-cmb-status:not(:empty) {
    display: block;
}

.vx-cmb-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
    align-items: start;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.vx-cmb-row,
.vx-cmb .form-row,
.vx-cmb p.form-row {
    float: none !important;
    clear: none !important;
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    scroll-margin-top: 110px;
    scroll-margin-bottom: 120px;
}

.vx-cmb-row label {
    display: block;
    margin: 0 0 6px;
    font-weight: 700;
    line-height: 1.3;
}

.vx-cmb-row .required {
    color: #d21f2b;
}

.vx-cmb-select,
.vx-cmb select.vx-cmb-select {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 48px !important;
    min-height: 48px !important;
    margin: 0 !important;
    padding: 0 42px 0 12px !important;
    overflow: hidden;
    border-radius: 8px !important;
    line-height: 46px !important;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.vx-cmb .select2-container,
.vx-cmb .select2-container--default,
.vx-cmb .select2-selection,
.vx-cmb .select2-selection--single,
.vx-cmb .wd-select,
.vx-cmb .wd-dropdown {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

.vx-cmb-row--error .vx-cmb-select,
.vx-cmb-row--error .select2-selection {
    border-color: #c62828 !important;
    box-shadow: 0 0 0 1px #c62828 !important;
}

.vx-cmb-hidden,
.vx-cmb[data-vx-duplicate="1"] {
    display: none !important;
}

.vx-cmb-payload,
.vx-cmb-nonce {
    display: none !important;
}

.vx-cmb-admin-warning {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    padding: 12px;
    border-left: 4px solid #d63638;
    background: #fff3f3;
}

/* WoodMart and similar themes often make the add-to-cart form a flex row. */
.vx-has-cartridge-builder form.cart > .vx-cmb,
.vx-has-cartridge-builder form.variations_form > .vx-cmb {
    flex-basis: 100%;
    order: -1;
}

@media (max-width: 767px) {
    .vx-cmb {
        margin: 14px 0 calc(24px + env(safe-area-inset-bottom));
        padding: 14px 12px;
        border-radius: 10px;
    }

    .vx-cmb h3 {
        font-size: 20px;
    }

    .vx-cmb-note {
        margin-bottom: 14px;
        font-size: 14px;
    }

    .vx-cmb-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .vx-cmb-select,
    .vx-cmb select.vx-cmb-select {
        height: 48px !important;
        min-height: 48px !important;
        padding-right: 38px !important;
        padding-left: 10px !important;
        font-size: 16px !important;
        line-height: 46px !important;
    }

    .vx-cmb-row label {
        font-size: 14px;
    }
}

@media (max-width: 420px) {
    .vx-cmb {
        padding: 12px 10px;
    }

    .vx-cmb h3 {
        font-size: 19px;
    }

    .vx-cmb-note {
        font-size: 13px;
    }
}
