/* Analyse PDF */
.recode-analyse-stage {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
}

.recode-analyse-page {
    width: min(210mm, 100%);
    max-width: 210mm;
    background: var(--background-default-grey);
    border: 1px solid var(--border-default-grey);
    box-shadow: var(--raised-shadow);
    border-radius: .5rem;
    padding: 18mm 16mm;
    box-sizing: border-box;
}

@media (max-width: 48em) {
    .recode-analyse-page {
        padding: 1.5rem 1.25rem;
        border-radius: .25rem;
    }
}

.recode-analyse-text {
    white-space: pre-wrap;
    line-height: 1.5;
    width: 100%;
    max-width: none;
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
    overflow-wrap: anywhere;
}

/* Ensure nested elements also take the full width and are justified */
.recode-analyse-text * {
    max-width: none;
    text-align: justify;
}
.recode-legacy-hit {
    display: inline;
    appearance: none;
    border: 0;
    margin: 0;
    font: inherit;
    line-height: inherit;
    text-align: inherit;
    vertical-align: baseline;
    white-space: inherit;
    padding: .05rem .25rem;
    border-radius: .25rem;
    cursor: pointer;
    background: var(--background-contrast-info);
    color: var(--text-default-info);
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}
.recode-legacy-hit::-moz-focus-inner {
    border: 0;
    padding: 0;
}
.recode-legacy-hit:focus {
    outline: 2px solid var(--border-action-high-blue-france);
    outline-offset: 2px;
}
.recode-legacy-preview {
    position: fixed;
    z-index: 6000;
    width: min(46rem, calc(100vw - 64px));
    max-width: calc(100vw - 64px);
    max-height: min(28rem, calc(100vh - 24px));
    display: none;
    align-items: stretch;
    background: var(--background-contrast-grey);
    box-shadow: var(--lifted-shadow);
    border: 1px solid var(--border-default-grey);
    border-radius: .5rem;
    overflow: hidden;
    transform: none !important;
    box-sizing: border-box;
}
.recode-legacy-preview__accent {
    flex: 0 0 8px;
    background: var(--border-action-high-blue-france);
}
.recode-legacy-preview__content {
    padding: 1rem 1.75rem;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
}
.recode-legacy-preview__title {
    margin: 0 0 .5rem 0;
}
.recode-legacy-preview__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .5rem;
}
.recode-legacy-preview__header .fr-btn {
    flex: 0 0 auto;
}
.recode-legacy-preview__group-title {
    margin: 1rem 0 .25rem 0;
}
.recode-legacy-preview__excerpt {
    margin: .15rem 0 .75rem 0;
    text-align: justify;
}

@media print {
    body {
        background: #fff !important;
    }
    .recode-analyse-page {
        width: 210mm;
        max-width: 210mm;
        min-height: 297mm;
        padding: 20mm;
        border: none;
        box-shadow: none;
        border-radius: 0;
    }
    header, footer, .fr-callout, .fr-btn {
        display: none !important;
    }
}
