.cg-block-popup {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.6);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}
.cg-block-popup[hidden] { display: none; }

.cg-block-card {
    max-width: 340px;
    width: 100%;
    background: #fff;
    border-radius: 18px;
    padding: 26px 24px 22px;
    text-align: center;
    box-shadow: 0 18px 44px rgba(2, 6, 23, 0.26), 0 2px 6px rgba(2, 6, 23, 0.06);
    animation: cg-block-in 0.24s cubic-bezier(0.2, 0.8, 0.25, 1);
}
@keyframes cg-block-in {
    from { opacity: 0; transform: translateY(10px) scale(0.97); }
    to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
    .cg-block-card { animation: none; }
}

/* One colour story: the card points at a single action, so the mark at the top is the
   same WhatsApp green as the button rather than a competing red alert blob. */
.cg-block-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #e8f8ef;
    color: #0f7a42;
    font-size: 26px;
    font-weight: 800;
    line-height: 52px;
    box-shadow: 0 0 0 7px rgba(37, 211, 102, 0.09);
}
.cg-block-icon.is-wa {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.cg-block-icon.is-wa .cg-wa-mark {
    width: 26px;
    height: 26px;
    background: #0f7a42;
}

.cg-block-text {
    margin: 0 0 18px;
    color: #1e293b;
    font-size: 14.5px;
    line-height: 1.65;
}

/* Sized to its own label, not to the card — the button is the action, not a banner. */
.cg-block-call {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 10px 20px;
    border-radius: 999px;
    background: #4f46e5;
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    transition: background-color 0.15s ease, transform 0.15s ease;
}
.cg-block-call:hover { transform: translateY(-1px); }

.cg-block-call.cg-block-wa {
    background: #25d366;
    box-shadow: 0 8px 18px rgba(37, 211, 102, 0.28);
}
.cg-block-call.cg-block-wa:hover { background: #1fbe5b; }

.cg-wa-mark {
    width: 16px;
    height: 16px;
    flex: none;
    background: #fff;
    -webkit-mask: var(--cg-wa-icon) center / contain no-repeat;
    mask: var(--cg-wa-icon) center / contain no-repeat;
}

/* Declared on the overlay so both the top mark and the button glyph can use it. */
.cg-block-popup {
    --cg-wa-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M.06 24l1.68-6.16A11.87 11.87 0 0 1 .15 11.9C.15 5.33 5.5 0 12.07 0a11.82 11.82 0 0 1 8.42 3.49 11.82 11.82 0 0 1 3.48 8.42c0 6.56-5.34 11.9-11.9 11.9a11.9 11.9 0 0 1-5.7-1.45L.06 24zm6.6-3.8c1.68 1 3.28 1.6 5.4 1.6 5.45 0 9.9-4.43 9.9-9.89a9.86 9.86 0 0 0-9.88-9.9c-5.46 0-9.9 4.44-9.9 9.9 0 2.23.65 3.9 1.75 5.65l-.99 3.62 3.72-.98zm11.4-5.55c-.08-.12-.27-.2-.56-.35-.3-.15-1.75-.86-2.02-.96-.27-.1-.47-.15-.66.15-.2.29-.76.95-.93 1.15-.17.2-.34.22-.63.07-.3-.15-1.25-.46-2.38-1.47-.88-.78-1.47-1.75-1.64-2.05-.17-.29-.02-.45.13-.6.13-.13.3-.35.44-.52.15-.17.2-.3.3-.5.1-.19.05-.36-.02-.5-.08-.16-.66-1.6-.9-2.19-.24-.57-.48-.5-.66-.5l-.57-.01c-.2 0-.5.07-.77.36-.26.3-1.01.99-1.01 2.41s1.04 2.8 1.18 2.99c.15.2 2.04 3.11 4.94 4.36.69.3 1.23.48 1.65.61.7.22 1.33.19 1.83.12.56-.09 1.72-.71 1.96-1.39.25-.68.25-1.26.17-1.38z'/%3E%3C/svg%3E");
}

/* Only ever rendered when no support number is saved, so it is the lone way out. */
.cg-block-close {
    display: inline-block;
    margin: 0;
    padding: 10px 22px;
    border: 0;
    border-radius: 999px;
    background: #eef1f6;
    color: #334155;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}
.cg-block-close:hover { background: #e2e8f0; }

.cg-field-error { border-color: #dc2626 !important; box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15) !important; }
#place_order.cg-disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- Live phone check: green when the 11-digit number is right, red + a hint
   right under the field when it is not. The hint slides open rather than jumping. */
#billing_phone.cg-phone-ok,
input[name="billing_phone"].cg-phone-ok {
    border-color: #16a34a !important;
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.15) !important;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
#billing_phone.cg-phone-bad,
input[name="billing_phone"].cg-phone-bad {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15) !important;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.cg-phone-hint {
    display: block;
    overflow: hidden;
    max-height: 0;
    margin-top: 0;
    opacity: 0;
    transform: translateY(-4px);
    color: #dc2626;
    font-size: 13px;
    line-height: 1.5;
    transition: max-height 0.22s ease, opacity 0.18s ease, transform 0.18s ease, margin-top 0.22s ease;
}
.cg-phone-hint.is-shown {
    max-height: 4.5em;
    margin-top: 6px;
    opacity: 1;
    transform: none;
}
@media (prefers-reduced-motion: reduce) {
    .cg-phone-hint { transition: none; }
}

/* ---- Editable checkout notice (text set in the CRM). Plain, selectable text. */
.cg-checkout-notice {
    margin: 0 0 20px;
    padding: 12px 16px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    color: #1d4ed8;
    font-size: 14px;
    line-height: 1.7;
}
