html.mgp-open {
    overflow: hidden;
}

.mgp {
    --mgp-accent: #3a7d44;
    position: fixed;
    inset: 0;
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.mgp:not([hidden]) {
    display: flex;
}

.mgp.mgp--inline {
    position: static;
    display: block;
    margin: 24px 0;
    padding: 24px 20px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #fff;
    text-align: center;
}

.mgp.mgp--inline .mgp__intro {
    margin-top: 0;
}

.mgp *,
.mgp *::before,
.mgp *::after {
    box-sizing: border-box;
}

.mgp .mgp__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.mgp .mgp__dialog {
    position: relative;
    width: 100%;
    max-width: 640px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 36px 28px 24px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    color: #222;
    text-align: center;
}

.mgp .mgp__close {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #555;
    font-size: 22px;
    line-height: 40px;
    cursor: pointer;
    box-shadow: none;
}

.mgp .mgp__headline {
    margin: 0 0 18px;
    color: var(--mgp-accent);
    font-size: 26px;
    font-weight: 700;
    line-height: 1.25;
}

.mgp .mgp__code-label {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
}

.mgp .mgp__code-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.mgp .mgp__code {
    width: 230px;
    max-width: 100%;
    height: auto;
    margin: 0;
    padding: 10px 12px;
    border: 2px dashed var(--mgp-accent);
    border-radius: 4px;
    background: #fafafa;
    color: #222;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-align: center;
    text-transform: uppercase;
    box-shadow: none;
}

.mgp .mgp__button {
    display: inline-block;
    margin: 0;
    padding: 12px 20px;
    border: 0;
    border-radius: 4px;
    background: var(--mgp-accent);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
}

/* !important: the theme's global button hover would otherwise turn the text red. */
.mgp .mgp__button:hover,
.mgp .mgp__button:focus {
    background: #aeae23 !important;
    color: #fff !important;
}

.mgp .mgp__intro {
    margin: 26px 0 14px;
    font-weight: 600;
}

.mgp .mgp__products {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mgp .mgp__product {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 12px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    font-size: 14px;
}

.mgp .mgp__product-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: inherit;
    text-decoration: none;
}

.mgp .mgp__product-image {
    width: auto;
    max-width: 100%;
    height: 226px;
    object-fit: contain;
}

.mgp .mgp__product-name {
    font-weight: 600;
    line-height: 1.3;
}

.mgp .mgp__product-name sup {
    font-size: 0.6em;
    vertical-align: super;
    line-height: 0;
}

.mgp .mgp__product-name p {
    margin: 4px 0 0;
    padding: 0;
    color: #555;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.35;
}

.mgp .mgp__price del {
    opacity: 0.6;
}

.mgp .mgp__price-discounted {
    color: var(--mgp-accent);
    font-weight: 700;
}

.mgp .mgp__legal {
    color: #666;
    font-size: 11px;
    line-height: 1.4;
}

.mgp .mgp__legal a {
    color: inherit;
}

.mgp .mgp__product-actions {
    margin-top: auto;
    padding-top: 6px;
}

.mgp .mgp__in-cart-note {
    margin: 0 0 8px;
    color: #555;
    font-size: 12px;
    line-height: 1.35;
}

.mgp .mgp__product-actions form {
    margin: 0;
}

.mgp .mgp__product .mgp__button {
    padding: 9px 12px;
    font-size: 12px;
}

.mgp .mgp__footnote {
    margin: 20px 0 0;
    color: #666;
    font-size: 12px;
    line-height: 1.4;
}

@media (max-width: 600px) {
    .mgp .mgp__dialog {
        padding: 34px 14px 16px;
    }

    .mgp .mgp__headline {
        font-size: 20px;
    }

    .mgp .mgp__products {
        gap: 10px;
    }

    .mgp .mgp__product {
        padding: 8px;
        font-size: 13px;
    }

    .mgp .mgp__product-image {
        height: 130px;
    }
}
