﻿/* Tokens do rich text — valores do OE27.
   Os nomes --rte-* sao os mesmos usados em estilos-editor.css (o ficheiro que o
   data type Rich Text carrega), para que os estilos do dropdown se pintem com a
   cor de cada edicao sem duplicar o data type.
   >>> Ao mudar uma cor aqui, mudar tambem o bloco #tinymce de estilos-editor.css <<< */
:root {
    --rte-primary: #0077c0;
    --rte-primary-600: #003F66;
    --rte-secondary: #1a4056;
    --rte-heading: #003F66;
}

h1.news-text.text-3xl/10.lg:text-5xl/16.md:text-4xl/12 {
    color: var(--color-secondary-900);
    font-weight: 700;
    display: block;
    margin-bottom: calc(0.25rem * 6);
}

#tinymce {
    font-family: 'Noto Sans', sans-serif;
}

    #tinymce h2 {
        margin-bottom: 4px !important;
    }

    #tinymce p {
        margin-top: 0 !important;
    }

    #tinymce .text-2xl {
        font-size: 1.5rem;
    }

    #tinymce .text-xl {
        font-size: 1.25rem;
    }

    #tinymce .text-lg {
        font-size: 1.125rem;
    }

.news-text {
    color: var(--rte-heading);
    font-weight: 700;
    display: block;
    margin-bottom: 1rem;
}

.rich-text a {
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 2px;
}

    .rich-text a:hover {
        color: var(--rte-primary);
    }

/* h2: alvo das âncoras automáticas do índice "Nesta página" (WebsiteHelper.AddHeadingAnchors).
   h2 a: âncoras vazias antigas que ainda existam no conteúdo (links partilhados com #id). */
.rich-text h2,
.rich-text h2 a {
    scroll-margin-top: 120px;
}

.rich-text p {
    margin-bottom: 1rem;
}

    .rich-text p:last-child {
        margin-bottom: 0;
    }

.rich-text ol,
#tinymce ol,
.rich-text ul,
#tinymce ul {
    margin-top: 0;
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.rich-text ul,
#tinymce ul {
    list-style: inherit;
}

.rich-text ol,
#tinymce ol {
    list-style: decimal;
}

    .rich-text ol li::marker,
    #tinymce ol li::marker {
        font-size: 85%;
        font-weight: 700;
    }

.rich-text li,
#tinymce li {
    margin-bottom: 1rem;
}

#tinymce img {
    max-width: 100%;
    height: auto;
}

.modal {
    display: none;
}

    .modal.active {
        display: flex;
    }

.modal-backdrop {
    backdrop-filter: blur(4px);
}

/**umb_name:H2 Cabeçalho Nível 2*/
h2.text-2xl/9 md:text-3xl/10 lg:text-4xl/12 {
}

/**umb_name:H3 Cabeçalho Nível 3*/
h3.text-xl/8 md:text-2xl/9 lg:text-3xl/10 {
}

/**umb_name:H4 Cabeçalho Nível 4*/
h4.text-lg/7 md:text-xl/8 lg:text-2xl/9 {
}

/**umb_name:Titulo Highligth*/
.highlight-text {
    background-color: rgb(0 119 192 / 10%);
    padding: 0 5px;
}

/**umb_name:Cor primary*/
.color-primary {
    color: var(--rte-primary-600);
}

/**umb_name:Cor secondary*/
.color-secondary {
    color: var(--rte-secondary);
}

/**umb_name:Font Light*/
.font-light {
    font-weight: 300;
}

/**umb_name:Font Medium*/
.font-medium {
    font-weight: 500;
}

/**umb_name:Font XL*/
.text-2xl lg:text-4xl md:text-3xl {
}

/**umb_name:Font LG*/
.text-xl lg:text-3xl md:text-2xl {
}

/**umb_name:Font MD*/
.text-lg lg:text-2xl md:text-xl {
}

.rich-text h2 {
    margin-top: 3rem;
    margin-bottom: 1rem;
}

    .rich-text h2:first-child {
        margin-top: 0;
    }

.rich-text h3 {
    margin-top: 2rem;
    margin-bottom: .75rem;
}

.rich-text a[target="_blank"]:not(:has(img))::after,
#tinymce a[target="_blank"]:not(:has(img))::after {
    content: "";
    display: inline-block;
    width: .8em;
    height: .8em;
    margin-left: .3em;
    vertical-align: -.02em;
    background-color: currentColor;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cline x1='10' y1='14' x2='21' y2='3'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cline x1='10' y1='14' x2='21' y2='3'/%3E%3C/svg%3E");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
}
