/**
 * The suggestion line under an email field. Kept in its own sheet because the
 * forms it serves appear on both the current and the frozen legacy stylesheets.
 */

.gst-email-typo {
    display: flex;
    align-items: baseline;
    gap: 2px 6px;
    flex-wrap: wrap;
    /* The hint lands next to its field, and a field sitting in a flex or grid
       row would otherwise squeeze it into a column beside the input. */
    width: 100%;
    flex-basis: 100%;
    grid-column: 1 / -1;
    margin: 6px 0 0;
    font-size: 15px;
    line-height: 1.4;
    color: #171b1c;
}

.gst-email-typo__question {
    opacity: 0.75;
}

/* One group, so the cross stays beside the address instead of being pushed
   onto a line of its own in a narrow field. */
.gst-email-typo__answer {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    min-width: 0;
}

.gst-email-typo__accept,
.gst-email-typo__dismiss {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

/* Plain weight, so the bold inside it means "this is the part that changes"
   and not merely "this is a link". */
.gst-email-typo__accept {
    min-width: 0;
    font-weight: 400;
    text-decoration: underline;
    text-underline-offset: 2px;
    /* An address is one long unbreakable token; without this it pushes the
       field's container wider on narrow screens. */
    overflow-wrap: anywhere;
    text-align: left;
}

.gst-email-typo__accept strong {
    font-weight: 700;
}

.gst-email-typo__accept:hover,
.gst-email-typo__accept:focus-visible {
    text-decoration-thickness: 2px;
}

/* Square box so the glyph sits in the middle of the address rather than on its
   baseline, where a 20px cross next to 15px text reads as dropped. */
.gst-email-typo__dismiss {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: 20px;
    line-height: 1;
    opacity: 0.55;
}

.gst-email-typo__dismiss:hover,
.gst-email-typo__dismiss:focus-visible {
    opacity: 1;
}

.gst-email-typo__accept:focus-visible,
.gst-email-typo__dismiss:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

@media (max-width: 767px) {
    .gst-email-typo {
        font-size: 14px;
    }
}
