/*
 * EU harmonised legal guarantee notice.
 *
 * Two triggers, never both on screen: the top bar one rides inside
 * .top-header, which the theme shows only from 769px up and hides outright on
 * the checkout, so the inline one covers everything below that breakpoint.
 */
.amondi-gn-trigger {
    cursor: pointer;
}

/*
 * Mobile: sits in the logo row, left of the cart. .top-search is the theme's
 * position:relative containing block and the cart is lifted into that row the
 * same way (absolute, top:-47px, right:10px); at 375px the logo ends at x≈188
 * and the cart starts at x≈304, which is the gap this is measured for. top is
 * eyeballed against the cart icon on staging (25.9.), not against the logo box.
 */
.amondi-gn-trigger--inline {
    display: none;
}

@media screen and (max-width: 768px) {
    .amondi-gn-trigger--inline {
        display: block;
        position: absolute;
        top: -35px;
        right: 78px;
        max-width: 110px;
        font-size: 12px;
        font-weight: 600;
        line-height: 1.15;
        text-align: right;
    }
}

.amondi-gn-footer {
    padding: 12px 15px;
}

.amondi-gn-trigger--footer {
    display: inline-block;
}

.amondi-gn-checkout {
    margin: 0 0 12px;
}

/*
 * The dialog is a flex column so the header and footer never get clipped by
 * the height cap - only the middle scrolls. Scoped to [open]: an unconditional
 * display would override the UA's display:none and show the closed dialog.
 */
.amondi-gn-modal {
    width: 720px;
    max-width: 96vw;
    max-height: 92vh;
    padding: 0;
    border: 1px solid #dddddd;
    border-radius: 4px;
    overflow: hidden;
}

.amondi-gn-modal[open] {
    display: flex;
    flex-direction: column;
}

.amondi-gn-modal::backdrop {
    background: rgba(0, 0, 0, 0.6);
}

@media screen and (max-width: 480px) {
    .amondi-gn-modal {
        width: 100vw;
        max-width: 100vw;
        height: 100vh;
        max-height: 100vh;
        margin: 0;
        border: 0;
        border-radius: 0;
    }
}

.amondi-gn-modal__head,
.amondi-gn-modal__foot {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    flex: 0 0 auto;
}

.amondi-gn-modal__head {
    justify-content: space-between;
    border-bottom: 1px solid #eeeeee;
}

.amondi-gn-modal__title {
    font-weight: 600;
}

.amondi-gn-modal__close {
    padding: 0 4px;
    border: 0;
    background: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.amondi-gn-modal__scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

/*
 * The notice is an A4 portrait. A 640px floor kept its body text above 8px on
 * phones at the price of sideways scrolling; on staging (25.9.) that read worse
 * than a whole, small page, so the floor is 300px and the artwork fits the
 * dialog. Phone legibility then rests on pinch-zoom and the "open full size"
 * link in the footer, which is why that link is not optional.
 */
.amondi-gn-modal__notice {
    display: block;
    width: 100%;
    min-width: 300px;
    height: auto;
}

.amondi-gn-modal__foot {
    flex-wrap: wrap;
    border-top: 1px solid #eeeeee;
    font-size: 13px;
}
