.vpwmo-open-modal,
.woocommerce a.button.vpwmo-loop-select {
    --vpwmo-red: #c40000;
    position: relative;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 13px 22px !important;
    margin-top: 10px;
    border: 0 !important;
    border-radius: 14px !important;
    background: linear-gradient(135deg, var(--vpwmo-red), #8f0000) !important;
    color: #fff !important;
    font-weight: 900 !important;
    letter-spacing: .2px;
    line-height: 1.15 !important;
    text-align: center;
    text-decoration: none !important;
    box-shadow: 0 12px 26px rgba(196, 0, 0, .24);
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.vpwmo-open-modal:hover,
.woocommerce a.button.vpwmo-loop-select:hover {
    transform: translateY(-1px);
    filter: saturate(1.08);
    box-shadow: 0 16px 30px rgba(196, 0, 0, .32);
}

.vpwmo-single-button,
.vpwmo-cart-button,
.vpwmo-checkout-button {
    width: 100%;
}

.vpwmo-cart-button {
    margin-top: 14px !important;
}

.vpwmo-checkout-order-row td {
    padding: 14px 0 16px !important;
    border: 0 !important;
}

.vpwmo-checkout-button {
    margin: 6px 0 0 !important;
    font-size: 17px !important;
}

.vpwmo-checkout-block-wrap {
    margin: 14px 0 18px;
}

body.vpwmo-lock {
    overflow: hidden;
}

.vpwmo-modal {
    --vpwmo-red: #c40000;
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 14px;
}

.vpwmo-modal.is-open {
    display: flex;
}

.vpwmo-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(8, 8, 10, .72);
    backdrop-filter: blur(7px);
}

.vpwmo-modal__box {
    position: relative;
    z-index: 2;
    width: min(500px, 100%);
    max-height: calc(100vh - 28px);
    overflow: auto;
    border: 1px solid rgba(196, 0, 0, .16);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 32px 84px rgba(0, 0, 0, .34);
    animation: vpwmoPop .20s ease-out;
}

@keyframes vpwmoPop {
    from { transform: translateY(14px) scale(.98); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.vpwmo-modal__close {
    position: absolute;
    right: 12px;
    top: 10px;
    z-index: 4;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: #1c1c1c;
    font-size: 30px;
    line-height: 36px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0,0,0,.14);
}

.vpwmo-brand-head {
    padding: 18px 22px 6px;
    text-align: center;
    background: #fff;
}

.vpwmo-brand-logo {
    display: block;
    width: min(178px, 42vw);
    height: auto;
    margin: 0 auto 6px;
    object-fit: contain;
}

.vpwmo-brand-name {
    margin: 0 auto;
    color: var(--vpwmo-red);
    font-size: clamp(25px, 5vw, 36px);
    line-height: 1;
    font-weight: 1000;
    letter-spacing: .2px;
    text-transform: none;
}

.vpwmo-modal__head {
    padding: 8px 28px 10px;
    background: #fff;
    text-align: center;
    border: 0;
}

.vpwmo-modal__head h3 {
    margin: 0 36px 6px;
    color: #141414;
    font-size: clamp(22px, 4vw, 28px);
    line-height: 1.08;
    font-weight: 900;
}

.vpwmo-modal__head p {
    max-width: 390px;
    margin: 0 auto;
    color: #555;
    font-size: 14px;
    line-height: 1.35;
}

.vpwmo-form {
    padding: 12px 28px 28px;
}

.vpwmo-form label {
    display: block;
    margin-bottom: 12px;
}

.vpwmo-form label span {
    display: block;
    margin-bottom: 6px;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 900;
}

.vpwmo-form input,
.vpwmo-form textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #dedede;
    border-radius: 14px;
    background: #fff;
    color: #161616;
    font-size: 16px;
    line-height: 1.35;
    padding: 12px 14px;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.vpwmo-form textarea {
    resize: vertical;
}

.vpwmo-form input:focus,
.vpwmo-form textarea:focus {
    border-color: var(--vpwmo-red);
    box-shadow: 0 0 0 4px rgba(196,0,0,.10);
}

.vpwmo-form__privacy {
    margin: 0 0 14px;
    color: #666;
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
}

.vpwmo-submit {
    width: 100%;
    min-height: 52px;
    border: 0;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--vpwmo-red), #860000);
    color: #fff;
    font-size: 17px;
    font-weight: 1000;
    cursor: pointer;
    box-shadow: 0 15px 30px rgba(196,0,0,.25);
    transition: transform .18s ease, opacity .18s ease;
}

.vpwmo-submit:hover {
    transform: translateY(-1px);
}

.vpwmo-submit:disabled {
    cursor: wait;
    opacity: .72;
}

.vpwmo-result {
    margin-top: 12px;
    padding: 0;
    font-size: 14px;
    line-height: 1.45;
    text-align: center;
}

.vpwmo-result.is-success,
.vpwmo-result.is-error {
    padding: 12px 14px;
    border-radius: 14px;
}

.vpwmo-result.is-success {
    color: #116329;
    background: #ecfff1;
    border: 1px solid #b8efc6;
}

.vpwmo-result.is-error {
    color: #930000;
    background: #fff0f0;
    border: 1px solid #ffc0c0;
}

.vpwmo-floating-error {
    position: fixed;
    left: 50%;
    bottom: 22px;
    z-index: 1000000;
    max-width: min(420px, calc(100vw - 26px));
    padding: 12px 16px;
    border-radius: 14px;
    background: #1d1d1f;
    color: #fff;
    font-weight: 800;
    opacity: 0;
    transform: translate(-50%, 10px);
    transition: opacity .2s ease, transform .2s ease;
    box-shadow: 0 16px 40px rgba(0,0,0,.22);
}

.vpwmo-floating-error.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

@media (max-width: 520px) {
    .vpwmo-modal {
        padding: 10px;
    }
    .vpwmo-modal__box {
        border-radius: 18px;
        max-height: calc(100vh - 20px);
    }
    .vpwmo-brand-head {
        padding: 15px 18px 4px;
    }
    .vpwmo-brand-logo {
        width: 140px;
    }
    .vpwmo-modal__head {
        padding: 7px 20px 8px;
    }
    .vpwmo-modal__head h3 {
        margin-right: 30px;
        margin-left: 30px;
    }
    .vpwmo-form {
        padding: 10px 18px 20px;
    }
    .vpwmo-form input,
    .vpwmo-form textarea {
        padding: 11px 13px;
        font-size: 15px;
    }
}
