/* Native inputs retain their name, value, label, focus and browser validation. */
input.mg-liquid-native:is([type="checkbox"], [type="radio"]) {
    --mg-choice-accent: var(--e-global-color-primary, #0753f2);
    appearance: none !important;
    -webkit-appearance: none !important;
    box-sizing: border-box;
    inline-size: 1.125rem !important;
    block-size: 1.125rem !important;
    min-inline-size: 1.125rem;
    min-block-size: 0 !important;
    padding: 0 !important;
    flex: none;
    vertical-align: -.18em;
    border: 1.5px solid #7186a3 !important;
    border-radius: 5px !important;
    background: #fff no-repeat center / 82% 82% !important;
    box-shadow: none !important;
    cursor: pointer;
}

input.mg-liquid-native[type="radio"] {
    border-radius: 50% !important;
}

input.mg-liquid-native:is(:checked, :indeterminate) {
    border-color: var(--mg-choice-accent) !important;
    background-color: var(--mg-choice-accent) !important;
    --mg-choice-symbol: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m4.5 10.2 3.4 3.4 7.6-7.6' fill='none' stroke='white' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-image: var(--mg-choice-symbol) !important;
}

input.mg-liquid-native[type="radio"]:checked {
    --mg-choice-symbol: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='4.2' fill='white'/%3E%3C/svg%3E");
}

input.mg-liquid-native:indeterminate {
    --mg-choice-symbol: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10h10' stroke='white' stroke-width='2.3' stroke-linecap='round'/%3E%3C/svg%3E");
}

input.mg-liquid-native:focus-visible {
    outline: 2px solid var(--mg-choice-accent) !important;
    outline-offset: 3px;
}

input.mg-liquid-native:disabled {
    cursor: default;
    opacity: .55;
}

/* The original pill labels and choice cards retain their own selection styling. */
.mg-contact-fields .mg-activity-options label > input[type="radio"] + span::before {
    content: "";
    inline-size: 14px;
    block-size: 14px;
    box-sizing: border-box;
    flex: none;
    margin-inline-end: 6px;
    border: 1.5px solid #7186a3;
    border-radius: 50%;
}

.mg-contact-fields .mg-activity-options label > input[type="radio"]:checked + span::before {
    border-color: var(--e-global-color-primary, #0753f2);
    background: radial-gradient(circle, var(--e-global-color-primary, #0753f2) 38%, transparent 43%);
}

input.mg-liquid-native[data-mg-liquid-playing] {
    border-color: transparent !important;
    background: transparent !important;
}

.mg-contact-fields .mg-activity-options label > input[data-mg-liquid-playing] + span::before,
[data-category][data-mg-liquid-playing] > .mg-category-check {
    visibility: hidden;
}

.mg-liquid-effect {
    position: fixed;
    z-index: 2147483000;
    display: block;
    max-width: none;
    pointer-events: none;
    overflow: visible;
    margin: 0;
    padding: 0;
}

.mg-liquid-effect [data-layer] {
    transform-box: fill-box;
    transform-origin: center;
}

@media (forced-colors: active) {
    input.mg-liquid-native:is([type="checkbox"], [type="radio"]) {
        appearance: auto !important;
        -webkit-appearance: auto !important;
        background: revert !important;
        border: revert !important;
        accent-color: auto;
    }
    .mg-contact-fields .mg-activity-options input:checked + span::before {
        background: Highlight;
        border-color: Highlight;
    }
    .mg-liquid-effect { display: none; }
}

.mg-liquid-definitions {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none;
}
