/**
 * Ordotype Ordonnances Page - Non-critical Styles
 *
 * These styles can load after the initial render.
 * Critical styles (.ordo-for-members, .reco-rich-text, .qr-codes-wrapper opacity)
 * should remain inline in Webflow.
 *
 * Usage in Webflow:
 * <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/william-ordotype/ordotype-scripts@main/ordonnances/styles.css">
 */

/* Medoc block spacing */
.w-dyn-item:not(:last-child) .medoc1-block {
    margin-bottom: 1rem;
}

/* Naming ordo heading */
.naming-ordo-heading p {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
}

.naming-ordo-heading p strong {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
}

/* Rich text paragraph spacing */
.texte-a-afficher-rich-text.w-richtext p:not(:last-child),
.reco-rich-text p:not(table p) {
    margin-bottom: 10px !important;
}

/* Big checkbox */
span.big-checkbox {
    font-size: 20px;
    line-height: 16px;
}

/* HTML embed inline */
.html-embed-16 {
    display: inline-block !important;
    text-decoration: none;
}

/* Reco medoc bloc list */
.reco-medoc1-bloc ul {
    margin-bottom: 0px;
}

/* Print styles */
@media print {
    body {
        font-size: 12pt;
        line-height: 1.3;
    }

    @page {
        margin-top: 10;
        margin-bottom: 10;
    }

    mywindow {
        padding-top: 72px;
        padding-bottom: 72px;
        padding-left: 30px;
        padding-right: 30px;
    }
}

/* Desktop and tablet (480px+) */
@media only screen and (min-width: 480px) {
    table {
        border-style: hidden;
        border-collapse: collapse;
        border-radius: 6px;
        box-shadow: 0 0 0 1px #CCC;
        margin: 0.5em;
        width: 90% !important;
        margin-left: auto;
        margin-right: auto;
    }

    td {
        border: 1px solid #ccc;
        padding: .75em;
    }

    th {
        font-weight: bold;
        text-align: center;
        border: 1px solid #ccc;
    }

    tr:first-child td:first-child,
    tr:first-child th:first-child {
        border-top-left-radius: 6px;
    }

    tr:first-child td:last-child,
    tr:first-child th:last-child {
        border-top-right-radius: 6px;
    }

    tr:last-child th:first-child {
        border-bottom-left-radius: 6px;
    }

    tr:last-child th:last-child {
        border-bottom-right-radius: 6px;
    }

    tr th:only-child {
        background-color: #d8f2ff;
        color: black;
        font-weight: bold;
        text-align: center;
        margin: .25em;
        padding-bottom: 1em;
        padding-top: 1em;
    }

    tr th:not(:only-of-type) {
        background-color: #d8f2ff;
        color: black;
        font-weight: bold;
        text-align: center;
        margin: .25em;
        padding-bottom: .5em;
        padding-top: .5em;
    }

    table caption {
        font-weight: bold;
        padding-bottom: .75em;
    }

    strong.rc-html {
        background-color: transparent !important;
    }

    ul {
        padding-left: 1.5em;
    }

    .exam-indications ul {
        padding-left: 3em;
    }
}

/* Mobile (max 479px) */
@media only screen and (max-width: 479px) {
    body :not(.naming-ordo-heading) p strong {
        font-size: 12px;
    }

    .naming-ordo-heading p strong {
        font-size: inherit !important;
    }

    table {
        border-style: hidden;
        border-collapse: collapse;
        border-radius: 12px;
        box-shadow: 0 0 0 1px #ccc;
        margin: 0.25em;
        margin-left: auto;
        margin-right: auto;
    }

    td {
        border: 1px solid #ccc;
        padding: .5em;
    }

    th {
        font-weight: bold;
        text-align: center;
        border: 1px solid #ccc;
    }

    tr:first-child td:first-child,
    tr:first-child th:first-child {
        border-top-left-radius: 12px;
    }

    tr:first-child td:last-child,
    tr:first-child th:last-child {
        border-top-right-radius: 12px;
    }

    tr:last-child th:first-child {
        border-bottom-left-radius: 12px;
    }

    tr:last-child th:last-child {
        border-bottom-right-radius: 12px;
    }

    tr th:only-child {
        background-color: #d8f2ff;
        color: black;
        font-weight: bold;
        text-align: center;
        margin: .25em;
        padding-bottom: 1em;
        padding-top: 1em;
    }

    tr th:not(:only-of-type) {
        background-color: #d8f2ff;
        color: black;
        font-weight: bold;
        text-align: center;
        margin: .25em;
        padding-bottom: .5em;
        padding-top: .5em;
    }

    table caption {
        font-weight: bold;
        padding-bottom: .5em;
    }

    span:not(.tooltiptext) {
        text-decoration: none !important;
        background-color: transparent !important;
    }

    strong.rc-html {
        background-color: transparent !important;
    }

    ul {
        padding-left: 1.5em;
    }
}
