/**
 * Harmonised notice on the legal guarantee of conformity, according to (EU) 2025/1960.
 * Modal shown from the footer link, image is language dependent.
 *
 * Note: this file is loaded before the theme stylesheet, so every rule that has to win
 * over a theme rule is written with a two-class selector.
 */

/* the theme sets overflow: hidden and drops the bottom padding on .modal-body, which cuts
   off the notice on short viewports - modal-dialog-scrollable needs the body to scroll */
.osceulegalguarantee-modal .modal-body {
    padding: 20px;
    overflow-y: auto;
}

.osceulegalguarantee-modal .osceulegalguarantee-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

.osceulegalguarantee-modal .osceulegalguarantee-zoom {
    margin: 15px 0 0;
    text-align: center;
}

/* keep the modal usable on short viewports: the dialog scrolls, the image never overflows */
@media (max-width: 767px) {
    .osceulegalguarantee-modal .modal-dialog {
        margin: 10px;
    }

    .osceulegalguarantee-modal .modal-body {
        padding: 10px;
    }
}

/* ------------------------------------------------------------------ *
 * Trigger, rendered wherever the notice has to be reachable:
 * footer (plain), product detail page (boxed), basket summary (summary)
 * ------------------------------------------------------------------ */

.osceulegalguarantee-trigger .osceulegalguarantee-trigger-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    line-height: 1.4;
    touch-action: manipulation;
}

.osceulegalguarantee-trigger .osceulegalguarantee-trigger-icon {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* product detail page: highlighted, directly above the add-to-basket button */
.osceulegalguarantee-trigger--boxed {
    margin: 12px 0 0;
}

.osceulegalguarantee-trigger-link {
    font-size: 0.875rem;
}

.osceulegalguarantee-trigger--boxed .osceulegalguarantee-trigger-icon {
    width: 20px;
    height: 20px;
}

/* basket and order summary: one notice per basket, below the totals */
.osceulegalguarantee-trigger--summary {
    margin: 10px 0 0;
    padding-top: 10px;
    border-top: 1px solid var(--bs-border-color-light, #e6e6e6);
}

/* comfortable tap target where the trigger is the only control in its row */
@media (max-width: 991px) {
    .osceulegalguarantee-trigger--boxed,
    .osceulegalguarantee-trigger--summary {
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .osceulegalguarantee-trigger--boxed .osceulegalguarantee-trigger-link,
    .osceulegalguarantee-trigger--summary .osceulegalguarantee-trigger-link {
        min-height: 24px;
    }
}
