/*
 * Central de Acessibilidade 1.13.0 — Moodle 4.0.
 * All UI selectors are scoped to local-ca to avoid theme conflicts.
 */
.local-ca-shell {
    --local-ca-navy: #132c50;
    --local-ca-blue: #1765c1;
    --local-ca-border: #a6b9d9;
    --local-ca-trigger-size: 40px;
    position: fixed;
    bottom: var(--local-ca-bottom, 100px);
    z-index: 2147483500;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    line-height: 1.38;
    color: #17263d;
    text-align: left;
}
/* Standard placement is retained when automatic VLibras alignment is disabled. */
.local-ca-shell.local-ca-pos-right { right: 17px; }
/* While VLibras loads, keep our launcher below the middle of the right edge. */
.local-ca-shell.local-ca-pos-right.local-ca-auto {
    right: 9px;
    top: calc(50% + 43px);
    bottom: auto;
}
/* The AMD module sets exact top, right and size after locating the VLibras launcher. */
.local-ca-shell.local-ca-pos-right.local-ca-auto.local-ca-docked { bottom: auto; }
.local-ca-shell.local-ca-pos-left { left: 17px; }
.local-ca-shell, .local-ca-shell * { box-sizing: border-box; }
.local-ca-shell button { font-family: inherit; font-size: 11.5px; cursor: pointer; }
.local-ca-shell button:focus-visible { outline: 3px solid #f6b51b !important; outline-offset: 3px; }
.local-ca-shell [hidden], #local-ca-readingbar[hidden] { display: none !important; }
.local-ca-trigger {
    display: flex;
    width: var(--local-ca-trigger-size, 40px);
    height: var(--local-ca-trigger-size, 40px);
    padding: 5px;
    border: 0;
    border-radius: 9px;
    background: #1764c1;
    color: #fff;
    box-shadow: 0 4px 12px rgba(16,38,75,.28);
    align-items: center;
    justify-content: center;
    line-height: 1;
}
/* The widget icon scales proportionally with the VLibras button. */
.local-ca-trigger svg { display: block; width: 76%; height: 76%; }
.local-ca-trigger:hover, .local-ca-trigger:focus { background: #0b447f; color: #fff; }
/* Compact vertical panel with a stable two-column control grid.
 * Unlike earlier versions, the open panel is fixed to the viewport, not
 * constrained to the space above the VLibras launcher. */
.local-ca-panel {
    position: fixed;
    top: var(--local-ca-panel-top, clamp(12px, 15vh, 126px));
    right: var(--local-ca-panel-right, 76px);
    bottom: auto;
    display: flex;
    flex-direction: column;
    width: 320px;
    max-width: calc(100vw - 20px);
    max-height: calc(100vh - var(--local-ca-panel-top, 126px) - 12px);
    max-height: calc(100dvh - var(--local-ca-panel-top, 126px) - 12px);
    min-height: 0;
    border: 1px solid #99aac5;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    color: #17263d;
    box-shadow: 0 14px 40px rgba(9, 21, 39, .28);
}
.local-ca-pos-right .local-ca-panel { right: var(--local-ca-panel-right, 76px); }
.local-ca-pos-left .local-ca-panel {
    right: auto;
    left: var(--local-ca-panel-left, 76px);
}
.local-ca-header {
    position: relative;
    display: flex;
    gap: 6px;
    justify-content: space-between;
    align-items: center;
    padding: 9px 10px;
    background: #f6f8fd;
    border-bottom: 1px solid #dee6f2;
}
.local-ca-header h2 {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 16px;
    line-height: 1.25;
    font-weight: 800;
    color: #14243c;
}
.local-ca-headingicon { color: #1964bc; font-size: 16px; }
.local-ca-close {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 8px;
    color: #162b4f;
    background: #fff;
    border: 1px solid #8198bf;
    border-radius: 8px;
    font-weight: 700;
    line-height: 1.35;
}
.local-ca-close:hover { background: #e8f0fc; }
/* Height is flexible: all controls fit when there is enough room, otherwise
 * only the panel body scrolls (header and close action remain visible). */
.local-ca-panel-body {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 9px 10px 10px;
    background: #fff;
    scrollbar-width: thin;
}
.local-ca-group { margin: 0 0 9px; }
.local-ca-group h3 {
    margin: 0 0 5px;
    font-size: 11.5px;
    color: #233249;
    font-weight: 800;
    letter-spacing: .02em;
}
.local-ca-size-row {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
    gap: 5px;
    align-items: center;
}
.local-ca-size-row output {
    display: inline-block;
    min-width: 40px;
    color: #152a4a;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
}
.local-ca-sizebtn, .local-ca-choice, .local-ca-reset {
    border: 1.5px solid #9aaccb;
    background: #fff;
    color: #1c2a42;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(20,43,79,.05);
    font-weight: 700;
}
.local-ca-sizebtn { padding: 5px 3px; min-height: 34px; font-size: 11.5px; }
.local-ca-sizebtn:hover, .local-ca-choice:hover, .local-ca-reset:hover {
    background: #edf4ff;
    border-color: #4c85d1;
}
.local-ca-sizebtn:disabled { cursor: not-allowed; opacity: .5; }
.local-ca-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
}
.local-ca-choice {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 5px 3px;
    gap: 4px;
    line-height: 1.2;
    text-align: center;
}
.local-ca-choice[aria-pressed="true"] {
    background: #142c4f;
    border-color: #142c4f;
    color: #fff;
}
.local-ca-choice[aria-pressed="true"]:hover { background: #245a9b; }
.local-ca-itemicon { flex: 0 0 auto; font-size: 13px; font-weight: 900; line-height: 1; }
.local-ca-itemtext { font-size: 11.5px; overflow-wrap: break-word; }
.local-ca-note { margin: 6px 0 8px; font-size: 10.5px; color: #53657f; }
.local-ca-reset {
    display: inline-flex;
    padding: 7px 9px;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
}

/* Persistent dark-mode control next to Restore defaults.
   The control area remains usable at 320px and on compact devices. */
.local-ca-bottom-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 7px;
    align-items: stretch;
}
.local-ca-bottom-actions .local-ca-reset,
.local-ca-bottom-actions .local-ca-darkmode-button {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 100%;
    min-width: 0;
    padding: 7px 5px;
    min-height: 37px;
    white-space: normal;
    line-height: 1.2;
    font-size: 11px;
    font-weight: 700;
    border-radius: 8px;
}
.local-ca-bottom-actions .local-ca-darkmode-button {
    color: #fff;
    background: #102447;
    border: 1px solid #102447;
}
.local-ca-bottom-actions .local-ca-darkmode-button:hover {
    color: #fff;
    background: #234b85;
}
.local-ca-bottom-actions .local-ca-darkmode-button[aria-pressed="true"] {
    color: #fff;
    background: #27569b;
    box-shadow: inset 0 0 0 2px #d4e7ff;
}
.local-ca-bottom-actions .local-ca-darkmode-button span { font-size: 17px; line-height: 1; }


/* v1.10: same expandable appearance for Text size and Colors as Custom colours. */
.local-ca-collapsible {
    margin: 0 0 7px;
    border: 1px solid #a2badc;
    border-radius: 9px;
    overflow: hidden;
}
.local-ca-accordion-heading { margin: 0 !important; font: inherit; letter-spacing: 0; }
.local-ca-accordion-heading .local-ca-section-toggle { font-size: 11.5px; }
.local-ca-collapsible-content { padding: 9px; background: #fff; }
.local-ca-collapsible-content .local-ca-options { margin: 0; }

/* v1.12: equal vertical spacing for every expandable section.
   Override legacy margins on both .local-ca-group and .local-ca-custom. */
.local-ca-panel-body > .local-ca-group,
.local-ca-panel-body > .local-ca-custom {
    margin-top: 0;
    margin-bottom: 9px;
}

/* Palette accordion: compact for a 320px panel, always keyboard accessible. */
.local-ca-custom { margin-top: 7px; border: 1px solid #a2badc; border-radius: 9px; overflow: hidden; }
.local-ca-custom-toggle {
    display: flex; width: 100%; min-height: 39px; align-items: center;
    justify-content: space-between; gap: 8px; padding: 7px 9px;
    background: #f0f5fe; color: #17305a; border: 0; text-align: left;
    font-weight: 700; font-size: 11.5px;
}
.local-ca-custom-toggle-title { display: flex; align-items: center; gap: 7px; }
.local-ca-custom-toggle-title span { font-size: 16px; }
.local-ca-custom-toggle[aria-expanded="true"] { background: #e7f0ff; border-bottom: 1px solid #c7d8f1; }
.local-ca-custom-chevron { font-size: 14px; transition: transform .15s ease; }
.local-ca-custom-toggle[aria-expanded="true"] .local-ca-custom-chevron { transform: rotate(180deg); }
.local-ca-custom-content { padding: 9px; background: #fff; }
.local-ca-custom-caption { margin: 0 0 7px; color: #4d627f; font-size: 10.5px; }
.local-ca-custom-tabs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4px; }
.local-ca-custom-tab { padding: 6px 2px; min-height: 34px; border: 1px solid #d4deea;
    background: #e8ecf3; color: #21344f; border-radius: 20px; font-size: 11px; font-weight: 700; }
.local-ca-custom-tab[aria-pressed="true"] { background: #132c50; color: #fff; border-color: #132c50; }
.local-ca-custom-range-label { display: block; margin: 8px 0 3px; font-size: 10.5px; font-weight: 700; color: #34496b; }
.local-ca-custom-hue {
    display: block; width: 100%; height: 17px; padding: 0; margin: 0 0 10px;
    appearance: none; -webkit-appearance: none; border-radius: 99px;
    border: 1px solid #b5c5dc; cursor: pointer;
    background: linear-gradient(to right, #ff0000 0%, #ffff00 16.67%, #00ff00 33.33%,
        #00ffff 50%, #0000ff 66.67%, #ff00ff 83.33%, #ff0000 100%);
}
.local-ca-custom-hue::-webkit-slider-thumb { -webkit-appearance: none; appearance: none;
    width: 20px; height: 20px; border-radius: 50%; background: #fff;
    border: 2px solid #203c68; box-shadow: 0 0 0 1px #fff; }
.local-ca-custom-hue::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%;
    background: #fff; border: 2px solid #203c68; }
.local-ca-custom-foot { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.local-ca-custom-swatch { position: relative; width: 27px; height: 27px; flex: 0 0 27px;
    border-radius: 50%; padding: 2px; border: 1px solid #506787; cursor: pointer;
    background-color: white; background-image: linear-gradient(45deg,#d7dfec 25%,transparent 25%),
        linear-gradient(-45deg,#d7dfec 25%,transparent 25%),
        linear-gradient(45deg,transparent 75%,#d7dfec 75%),
        linear-gradient(-45deg,transparent 75%,#d7dfec 75%);
    background-size: 8px 8px; background-position: 0 0,0 4px,4px -4px,-4px 0px;
}
.local-ca-custom-swatch input[type="color"] { opacity: 0; position: absolute; inset: 0;
    width: 100%; height: 100%; padding: 0; cursor: pointer; }
.local-ca-custom-swatch::after { content: ''; position: absolute; inset: 4px; border-radius: 50%;
    background: var(--local-ca-swatch-color,transparent); pointer-events: none; border: 1px solid rgba(0,0,0,.1); }
.local-ca-custom-foot output { flex: 1 1 84px; font-size: 10.5px; overflow-wrap: anywhere; color: #294c84; }
.local-ca-custom-reset { padding: 6px 7px; border: 1px solid #a9b9d1; border-radius: 7px;
    background: white; color: #274876; min-height: 32px; font-weight: 700; font-size: 10.5px; }
.local-ca-custom-reset:hover { background: #edf4ff; }
.local-ca-custom :is(button,input):focus-visible { outline: 3px solid #e6ad27 !important; outline-offset: 2px; }
/* Moodle page-specific colour changes. The toolbar lives outside #page and is not recoloured.
   Headings and body copy are separate; avoid recolouring form controls and media. */
html.local-ca-custom-bg body,
html.local-ca-custom-bg #page-wrapper,
html.local-ca-custom-bg #page,
html.local-ca-custom-bg #page-content,
html.local-ca-custom-bg #region-main,
html.local-ca-custom-bg .region-main-content {
    background-color: var(--local-ca-custom-background) !important;
}
html.local-ca-custom-title #page :is(h1,h2,h3,h4,h5,h6),
html.local-ca-custom-title #page-header :is(h1,h2,h3,h4,h5,h6),
html.local-ca-custom-title #region-main :is(h1,h2,h3,h4,h5,h6) {
    color: var(--local-ca-custom-title) !important;
}
html.local-ca-custom-content #page :is(p,li,dd,dt,blockquote,td,th),
html.local-ca-custom-content #region-main :is(p,li,dd,dt,blockquote,td,th) {
    color: var(--local-ca-custom-content) !important;
}

/* Night theme: apply ONLY to the Moodle page, never the floating widget.
   No global filter is used: images, icons, logos and media retain their colours.
   Colour presets supersede night mode when selected through the panel. */
html.local-ca-darkmode { background-color: #0d1728 !important; }
html.local-ca-darkmode body { background-color: #0d1728 !important; color: #e8effb !important; }
html.local-ca-darkmode body > :not(#local-ca-shell):not(#local-ca-readingbar) {
    background-color: #0d1728 !important;
    color: #e8effb !important;
}
html.local-ca-darkmode body > :not(#local-ca-shell):not(#local-ca-readingbar)
:is(#page-wrapper, #page, #page-content, #region-main, #page-header, #page-footer,
    #page-navbar, .region-main-content, .page-header-headings, .course-content,
    .courseindex, .courseindex-section, .content, .navbar, .navbar-light,
    .bg-white, .bg-light, .secondary-navigation, .moremenu, .drawer, .drawercontent,
    .drawerheader, .dropdown-menu, .popover, .modal-content, .modal-header,
    .modal-body, .modal-footer, .block, .card, .card-body, .card-header,
    .list-group-item, .tab-content, .table-responsive, .generalbox, .box, .well,
    .activity-item, .activity, .activity-information, .section, .alert, .notification) {
    background-color: #18283f !important;
    background-image: none !important;
    color: #e8effb !important;
    border-color: #425674 !important;
}
/* Main page canvases should be darker than the cards. */
html.local-ca-darkmode body > :not(#local-ca-shell):not(#local-ca-readingbar)
:is(#page-wrapper, #page, #page-content, #region-main, #page-header, .region-main-content) {
    background-color: #0d1728 !important;
}
html.local-ca-darkmode body > :not(#local-ca-shell):not(#local-ca-readingbar)
:is(h1,h2,h3,h4,h5,h6,p,li,dt,dd,label,legend,small,.text-dark,.text-muted,.dimmed_text) {
    color: #e8effb !important;
}
html.local-ca-darkmode body > :not(#local-ca-shell):not(#local-ca-readingbar)
:is(a, a:link) { color: #8bc5ff !important; }
html.local-ca-darkmode body > :not(#local-ca-shell):not(#local-ca-readingbar)
:is(a:hover,a:focus-visible) { color: #bee1ff !important; }
html.local-ca-darkmode body > :not(#local-ca-shell):not(#local-ca-readingbar)
:is(input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
    textarea, select, .form-control, .custom-select, .form-select, .input-group-text) {
    background-color: #22344e !important;
    border-color: #657893 !important;
    color: #fff !important;
    caret-color: #fff;
}
html.local-ca-darkmode body > :not(#local-ca-shell):not(#local-ca-readingbar)
:is(input,textarea)::placeholder { color: #bbcadb !important; opacity: 1; }
html.local-ca-darkmode body > :not(#local-ca-shell):not(#local-ca-readingbar)
:is(table, .generaltable, .table, thead, tbody, tr, th, td) {
    background-color: #18283f !important;
    color: #e8effb !important;
    border-color: #4d617b !important;
}
html.local-ca-darkmode body > :not(#local-ca-shell):not(#local-ca-readingbar)
:is(.btn-secondary, .btn-light, .btn-outline-secondary, .nav-link) {
    background-color: #263b56 !important;
    color: #f0f5ff !important;
    border-color: #617892 !important;
}
/* Preserve semantic button colours and in-page illustrations. */
html.local-ca-darkmode body > :not(#local-ca-shell):not(#local-ca-readingbar)
:is(.btn-primary, .btn-success, .btn-danger, .btn-warning, .btn-info) {
    color: #fff !important;
}
html.local-ca-darkmode .local-ca-shell { color-scheme: light; }

/* User-chosen page visual transformations: the panel is intentionally excluded. */
html.local-ca-fontzoom { font-size: var(--local-ca-fontzoom, 100%) !important; }
html.local-ca-grayscale body > :not(#local-ca-shell):not(#local-ca-readingbar) { filter: grayscale(1) !important; }
/* New Saturação preset: boost colours without altering the accessibility panel. */
html.local-ca-saturation body > :not(#local-ca-shell):not(#local-ca-readingbar):not(#local-ca-magnifier) {
    filter: saturate(1.9) contrast(1.08) !important;
}
html.local-ca-invert body > :not(#local-ca-shell):not(#local-ca-readingbar) { filter: invert(1) hue-rotate(180deg) !important; }
html.local-ca-highcontrast body { background: #000 !important; }
html.local-ca-highcontrast body > :not(#local-ca-shell):not(#local-ca-readingbar),
html.local-ca-highcontrast body > :not(#local-ca-shell):not(#local-ca-readingbar) * {
    background-color: #000 !important;
    background-image: none !important;
    color: #fff !important;
    border-color: #ffe600 !important;
}
html.local-ca-highcontrast body > :not(#local-ca-shell):not(#local-ca-readingbar) a { color: #ffe600 !important; }
/* Independent, stronger white/cyan high contrast choice (second Alto contraste button). */
html.local-ca-contrastplus body { background: #000 !important; }
html.local-ca-contrastplus body > :not(#local-ca-shell):not(#local-ca-readingbar):not(#local-ca-magnifier),
html.local-ca-contrastplus body > :not(#local-ca-shell):not(#local-ca-readingbar):not(#local-ca-magnifier) * {
    background-color: #000 !important;
    background-image: none !important;
    color: #fff !important;
    border-color: #fff !important;
    text-shadow: none !important;
}
html.local-ca-contrastplus body > :not(#local-ca-shell):not(#local-ca-readingbar):not(#local-ca-magnifier) a {
    color: #00e5ff !important;
    text-decoration: underline !important;
}
html.local-ca-contrastplus body > :not(#local-ca-shell):not(#local-ca-readingbar):not(#local-ca-magnifier) :focus-visible {
    outline: 3px solid #ffff00 !important;
    outline-offset: 2px;
}
html.local-ca-readable body > :not(#local-ca-shell):not(#local-ca-readingbar),
html.local-ca-readable body > :not(#local-ca-shell):not(#local-ca-readingbar) p,
html.local-ca-readable body > :not(#local-ca-shell):not(#local-ca-readingbar) li,
html.local-ca-readable body > :not(#local-ca-shell):not(#local-ca-readingbar) h1,
html.local-ca-readable body > :not(#local-ca-shell):not(#local-ca-readingbar) h2,
html.local-ca-readable body > :not(#local-ca-shell):not(#local-ca-readingbar) h3 {
    font-family: Arial, Verdana, Helvetica, sans-serif !important;
}
html.local-ca-spacing body > :not(#local-ca-shell):not(#local-ca-readingbar) p,
html.local-ca-spacing body > :not(#local-ca-shell):not(#local-ca-readingbar) li,
html.local-ca-spacing body > :not(#local-ca-shell):not(#local-ca-readingbar) label,
html.local-ca-spacing body > :not(#local-ca-shell):not(#local-ca-readingbar) h1,
html.local-ca-spacing body > :not(#local-ca-shell):not(#local-ca-readingbar) h2,
html.local-ca-spacing body > :not(#local-ca-shell):not(#local-ca-readingbar) h3 {
    letter-spacing: .06em !important;
    word-spacing: .1em !important;
    line-height: 1.75 !important;
}
html.local-ca-links body > :not(#local-ca-shell):not(#local-ca-readingbar) a {
    text-decoration: underline !important;
    text-decoration-thickness: 2px !important;
    text-underline-offset: 3px !important;
    outline: 1px dashed #df7a00 !important;
}
html.local-ca-focus body :is(a,button,input,textarea,select,[tabindex]):focus-visible {
    outline: 4px solid #f7a500 !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 2px #152c56 !important;
}
html.local-ca-bigcursor body,
html.local-ca-bigcursor body * {
    cursor: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="32" height="40" viewBox="0 0 32 40"%3E%3Cpath d="M3 2v31l8-8 6 12 6-3-7-12h12z" fill="%23fff" stroke="%23000" stroke-width="3" stroke-linejoin="round"/%3E%3C/svg%3E') 2 2, auto !important;
}
html.local-ca-pauseanimations body > :not(#local-ca-shell):not(#local-ca-readingbar) *,
html.local-ca-pauseanimations body > :not(#local-ca-shell):not(#local-ca-readingbar) *::before,
html.local-ca-pauseanimations body > :not(#local-ca-shell):not(#local-ca-readingbar) *::after {
    animation-play-state: paused !important;
    transition-duration: 0s !important;
    scroll-behavior: auto !important;
}
.local-ca-readingbar {
    position: fixed;
    z-index: 2147483400;
    left: 0;
    width: 100vw;
    height: 34px;
    background: rgba(254, 224, 88, .24);
    border-top: 2px solid rgba(45, 94, 165, .65);
    border-bottom: 2px solid rgba(45, 94, 165, .65);
    pointer-events: none;
    transform: translateY(-50%);
}
@media (max-width: 560px) {
    .local-ca-shell.local-ca-pos-right { right: 10px; }
    .local-ca-shell.local-ca-pos-right.local-ca-auto { right: 9px; }
    .local-ca-shell.local-ca-pos-left { left: 10px; }
    .local-ca-panel {
        top: 8px;
        right: 8px !important;
        left: auto !important;
        width: min(320px, calc(100vw - 16px));
        max-height: calc(100vh - 16px);
        max-height: calc(100dvh - 16px);
    }
    .local-ca-header { padding: 9px 10px; }
    .local-ca-panel-body { padding: 9px 10px 11px; }
}
@media (prefers-reduced-motion: reduce) {
    .local-ca-shell *, .local-ca-shell *::before, .local-ca-shell *::after { animation: none !important; transition: none !important; }
}

/* v1.9: independent magnifier; preserve original focus highlight. */
#local-ca-magnifier[hidden] { display: none !important; }
.local-ca-magnifier {
    position: fixed;
    z-index: 2147483490;
    width: 620px;
    max-width: calc(100vw - 16px);
    min-height: 94px;
    max-height: 165px;
    padding: 12px 13px;
    border: 3px solid #1c66c4;
    border-radius: 18px;
    background: #fff;
    color: #152b49;
    font: 400 19px/1.3 Arial, Helvetica, sans-serif;
    overflow: hidden;
    box-shadow: 0 5px 0 #e3f0ff, 0 12px 32px rgba(5,26,57,.38);
    pointer-events: none;
    color-scheme: light;
}
.local-ca-magnifier-heading {
    font-size: 12px;
    line-height: 1.2;
    font-weight: 800;
    color: #1457a6;
    letter-spacing: .02em;
    margin-bottom: 6px;
}
.local-ca-magnifier-text {
    font-size: 19px;
    line-height: 1.3;
    max-height: 86px;
    overflow: hidden;
    overflow-wrap: anywhere;
    font-weight: 600;
}
/* The lens does not re-colour the Moodle page, the accessibility panel or private inputs. */
html.local-ca-headings body > :not(#local-ca-shell):not(#local-ca-readingbar):not(#local-ca-magnifier)
:is(h1,h2,h3,h4,h5,h6) {
    box-decoration-break: clone;
    background-color: #fff0bb !important;
    color: #12294c !important;
    padding: .08em .15em;
    border-bottom: 3px solid #f4a72c !important;
    border-radius: 3px;
}
html.local-ca-keyboard body > :not(#local-ca-shell):not(#local-ca-readingbar):not(#local-ca-magnifier)
:is(a[href],button,input,select,textarea,[tabindex]):focus {
    outline: 4px solid #ffb000 !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 2px #132c50 !important;
}
html.local-ca-focus body > :not(#local-ca-shell):not(#local-ca-readingbar):not(#local-ca-magnifier)
:is(a,button,input,select,textarea,[tabindex]):focus-visible {
    outline: 4px solid #ffb000 !important;
    outline-offset: 3px !important;
}
@media (max-width: 560px) {
    .local-ca-magnifier { width: min(400px, calc(100vw - 16px)); }
    .local-ca-magnifier-text { font-size: 17px; }
}


/* v1.13 — optional text-to-speech tool in the expanded Leitura section. */
.local-ca-choice.local-ca-speech-choice {
    grid-column: 1 / -1;
    width: 100%;
    background: #eef5ff;
    color: #173258;
    border-color: #5d91d0;
}
.local-ca-choice.local-ca-speech-choice[aria-pressed="true"] {
    background: #142c4f;
    color: #fff;
}
.local-ca-choice.local-ca-speech-choice .local-ca-itemicon { font-size: 15px; }
.local-ca-speechbar[hidden] { display: none !important; }
.local-ca-speechbar {
    position: fixed;
    z-index: 2147483580;
    /* Center inside the available content area, avoiding the side panel. */
    left: calc((100vw - 350px) / 2);
    bottom: max(12px, env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 9px;
    width: min(850px, calc(100vw - 380px));
    max-height: min(46vh, 330px);
    max-height: min(46dvh, 330px);
    padding: 12px 14px;
    border: 2px solid #2273d5;
    border-radius: 13px;
    background: #f8fbff;
    color: #17263d;
    color-scheme: light;
    box-shadow: 0 12px 38px rgba(8,25,55,.29);
    overflow-y: auto;
    overscroll-behavior: contain;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    line-height: 1.35;
}
.local-ca-speechbar button, .local-ca-speechbar select, .local-ca-speechbar input {
    font-family: inherit;
    font-size: 12px;
}
.local-ca-speechbar button {
    border: 1px solid #829cc0;
    border-radius: 7px;
    padding: 8px 10px;
    min-height: 37px;
    background: #fff;
    color: #173258;
    font-weight: 700;
    cursor: pointer;
}
.local-ca-speechbar button:hover:not(:disabled) { background: #eaf3ff; }
.local-ca-speechbar button:disabled { opacity: .48; cursor: not-allowed; }
.local-ca-speechbar :is(button,select,input):focus-visible {
    outline: 3px solid #e6a51c !important;
    outline-offset: 2px;
}
.local-ca-speech-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.local-ca-speech-head strong { color: #12325a; font-size: 15px; }
.local-ca-speechbar .local-ca-speech-close { min-height: 29px; padding: 4px 8px; }
.local-ca-speech-controls { display: grid; grid-template-columns: 1.1fr 1.1fr 1fr .8fr; gap: 7px; }
.local-ca-speechbar .local-ca-speech-primary { color: #fff; background: #075db8; border-color: #075db8; }
.local-ca-speechbar .local-ca-speech-primary:hover:not(:disabled) { color: #fff; background: #104a86; }
/* v1.14: cores independentes e consistentes nos controles de leitura.
   Vale também para o estado Continuar do botão Pausar. */
.local-ca-speechbar button.local-ca-speech-page {
    color: #fff; background: #075db8; border-color: #075db8;
}
.local-ca-speechbar button.local-ca-speech-page:hover:not(:disabled) {
    color: #fff; background: #104a86; border-color: #104a86;
}
.local-ca-speechbar button.local-ca-speech-selection {
    color: #fff; background: #187444; border-color: #187444;
}
.local-ca-speechbar button.local-ca-speech-selection:hover:not(:disabled) {
    color: #fff; background: #105d36; border-color: #105d36;
}
.local-ca-speechbar button.local-ca-speech-pause {
    color: #fff; background: #7134a2; border-color: #7134a2;
}
.local-ca-speechbar button.local-ca-speech-pause:hover:not(:disabled) {
    color: #fff; background: #57267e; border-color: #57267e;
}
.local-ca-speechbar button.local-ca-speech-stop {
    color: #fff; background: #bb2028; border-color: #bb2028;
}
.local-ca-speechbar button.local-ca-speech-stop:hover:not(:disabled) {
    color: #fff; background: #971820; border-color: #971820;
}
.local-ca-speech-settings {
    display: grid;
    grid-template-columns: auto minmax(150px,1fr) auto minmax(90px,150px) auto;
    gap: 8px;
    align-items: center;
}
.local-ca-speech-settings label { color: #1b375d; font-weight: 700; margin: 0; }
.local-ca-speech-settings select {
    display: block;
    width: 100%;
    min-height: 34px;
    padding: 4px 6px;
    border: 1px solid #a3b4c9;
    border-radius: 6px;
    background: #fff;
    color: #122d4e;
}
.local-ca-speech-settings input[type=range] { width: 100%; margin: 0; accent-color: #075db8; }
.local-ca-speech-settings output { font-weight: 700; min-width: 30px; color: #173258; }
.local-ca-speech-status { margin: 0; font-size: 11px; color: #3e5575; }
/* When the launcher is on the left, reserve space on the other side. */
.local-ca-pos-left .local-ca-speechbar { left: calc((100vw + 350px) / 2); }
@media(max-width:760px) {
    .local-ca-speechbar, .local-ca-pos-left .local-ca-speechbar {
        left: 50%; width: calc(100vw - 16px); padding: 9px; max-height: 58dvh;
    }
    .local-ca-speech-controls { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .local-ca-speech-settings { grid-template-columns: auto minmax(0,1fr) auto; }
    .local-ca-speech-settings label[for="local-ca-speech-rate"] { grid-column: 1; }
    .local-ca-speech-settings #local-ca-speech-rate { grid-column: 2; }
    .local-ca-speech-settings #local-ca-speech-ratevalue { grid-column: 3; }
}

/* v1.15 — Support profiles are optional, reversible and scoped to the Moodle page. */
.local-ca-support-group .local-ca-support-options { gap: 6px; }
.local-ca-support-choice { min-height: 38px; }
.local-ca-support-choice .local-ca-itemicon { font-size: 16px; }
.local-ca-support-help { margin: 7px 1px 0; color: #354f74; font-size: 10.5px; line-height: 1.45; }
html.local-ca-support-lowvision body > :not(#local-ca-shell):not(#local-ca-readingbar) {
    font-size: 115% !important; line-height: 1.65 !important;
}
html.local-ca-support-lowvision body > :not(#local-ca-shell):not(#local-ca-readingbar) :is(a, button, input, select, textarea):focus-visible,
html.local-ca-support-blindness body > :not(#local-ca-shell):not(#local-ca-readingbar) :is(a, button, input, select, textarea):focus-visible {
    outline: 4px solid #e98e00 !important; outline-offset: 3px !important;
}
html.local-ca-support-lowvision body > :not(#local-ca-shell):not(#local-ca-readingbar) a,
html.local-ca-support-blindness body > :not(#local-ca-shell):not(#local-ca-readingbar) a,
html.local-ca-support-colorblind body > :not(#local-ca-shell):not(#local-ca-readingbar) a {
    text-decoration: underline !important; text-decoration-thickness: 2px !important;
    text-underline-offset: 3px !important;
}
html.local-ca-support-epilepsy { scroll-behavior: auto !important; }
html.local-ca-support-epilepsy body > :not(#local-ca-shell):not(#local-ca-readingbar) *,
html.local-ca-support-epilepsy body > :not(#local-ca-shell):not(#local-ca-readingbar) *::before,
html.local-ca-support-epilepsy body > :not(#local-ca-shell):not(#local-ca-readingbar) *::after {
    animation: none !important; transition: none !important; scroll-behavior: auto !important;
}
html.local-ca-support-dyslexia body > :not(#local-ca-shell):not(#local-ca-readingbar),
html.local-ca-support-dyslexia body > :not(#local-ca-shell):not(#local-ca-readingbar) * {
    font-family: Verdana, Arial, Helvetica, sans-serif !important;
}
html.local-ca-support-dyslexia body > :not(#local-ca-shell):not(#local-ca-readingbar) :is(p,li,blockquote),
html.local-ca-support-adhd body > :not(#local-ca-shell):not(#local-ca-readingbar) :is(p,li,blockquote) {
    line-height: 1.75 !important; letter-spacing: .025em !important; word-spacing: .08em !important;
}
html.local-ca-support-adhd body > :not(#local-ca-shell):not(#local-ca-readingbar) :is(p,li):hover {
    background: rgba(241, 219, 107, .17) !important;
}
html.local-ca-support-colorblind body > :not(#local-ca-shell):not(#local-ca-readingbar) [aria-pressed="true"],
html.local-ca-support-colorblind body > :not(#local-ca-shell):not(#local-ca-readingbar) [aria-current],
html.local-ca-support-colorblind body > :not(#local-ca-shell):not(#local-ca-readingbar) [aria-invalid="true"] {
    outline: 2px dashed currentColor !important; outline-offset: 2px !important;
}
@media (prefers-reduced-motion: reduce) {
    .local-ca-support-group .local-ca-custom-chevron { transition: none; }
}

/* v1.17.0 — Identidade visual dos cabeçalhos e alinhamento à proposta aprovada.
 * Todas as seções abertas recebem verde-claro; Suporte permanece no topo,
 * com azul-marinho quando recolhido. Escopo limitado à Central. */
#local-ca-panel .local-ca-custom-toggle[aria-expanded="true"] {
    background: #d8f8dc;
    border-bottom: 1px solid #8dcea0;
    color: #123e2b;
}
#local-ca-panel .local-ca-custom-toggle[aria-expanded="true"]:hover {
    background: #c8f1d0;
}
#local-ca-panel .local-ca-support-group .local-ca-custom-toggle[aria-expanded="false"] {
    background: #0b2350;
    color: #ffffff;
}
#local-ca-panel .local-ca-support-group .local-ca-custom-toggle[aria-expanded="false"]:hover {
    background: #16386f;
}
#local-ca-panel .local-ca-close {
    background: #0b2350;
    color: #ffffff;
    border-color: #0b2350;
}
#local-ca-panel .local-ca-close:hover {
    background: #194075;
    border-color: #194075;
    color: #ffffff;
}
#local-ca-panel .local-ca-close:focus-visible,
#local-ca-panel .local-ca-custom-toggle:focus-visible {
    outline: 3px solid #ffbd45;
    outline-offset: 2px;
}


/* v1.18.0 — The reading toolbar Close button uses the requested blue color.
   Scoped to the speech toolbar; the main panel Close button remains navy. */
#local-ca-speechbar #local-ca-speech-close {
    background: #0868c4;
    border-color: #0868c4;
    color: #ffffff;
    min-height: 32px;
}
#local-ca-speechbar #local-ca-speech-close:hover:not(:disabled) {
    background: #064f96;
    border-color: #064f96;
    color: #ffffff;
}


/* v1.19 — individually configurable autistic-user profile. No essential
   Moodle controls are hidden, and no activity timing or grading is changed. */
#local-ca-panel .local-ca-support-choice[data-ca-support="autism"] { grid-column: 1 / -1; }
#local-ca-panel .local-ca-autism-settings[hidden],
#local-ca-autism-helper[hidden] { display: none !important; }
#local-ca-panel .local-ca-autism-settings {
    border: 1px solid #bad0e9; border-radius: 9px; margin-top: 9px;
    padding: 10px; background: #f7faff; color: #183258;
}
#local-ca-panel .local-ca-autism-settings h4 {
    font-size: 12px; margin: 0 0 5px; font-weight: 800; color: #102e57;
}
#local-ca-panel .local-ca-autism-intro, #local-ca-panel .local-ca-autism-note {
    font-size: 10.5px; line-height: 1.45; margin: 3px 0 9px;
}
#local-ca-panel .local-ca-autism-level {
    border: 1px solid #d0dff0; border-radius: 7px; padding: 7px;
    margin: 0 0 8px; display: grid; gap: 6px;
}
#local-ca-panel .local-ca-autism-level legend { float:none; width:auto; font-size:10.5px; margin:0; padding:0 4px; font-weight:800; }
#local-ca-panel .local-ca-autism-level label { display:flex; gap:6px; align-items:center; font-size:11px; margin:0; }
#local-ca-panel .local-ca-autism-features { display:grid; gap:5px; }
#local-ca-panel .local-ca-autism-feature { display:flex; gap:8px; cursor:pointer; align-items:flex-start;
    background:#fff; padding:7px; border:1px solid #d9e4f2; border-radius:7px; margin:0; }
#local-ca-panel .local-ca-autism-feature input { flex: none; margin-top:3px; }
#local-ca-panel .local-ca-autism-feature strong { display:block; font-size:11px; line-height:1.3; }
#local-ca-panel .local-ca-autism-feature small { display:block; color:#405a7b; font-size:10px; line-height:1.45; }
#local-ca-panel .local-ca-autism-actions { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:5px; margin:8px 0; }
#local-ca-panel .local-ca-autism-actions button { background:#fff; border:1px solid #729cd0; border-radius:6px;
    color:#113863; padding:7px 4px; min-height:34px; font-size:10.5px; font-weight:700; }
#local-ca-panel .local-ca-autism-actions button:focus-visible,
#local-ca-autism-helper button:focus-visible { outline:3px solid #ed9b33; outline-offset:2px; }
#local-ca-panel .local-ca-autism-actions #local-ca-autism-showhelp { grid-column:1 / -1; }
html.local-ca-autism-motion { scroll-behavior:auto !important; }
html.local-ca-autism-motion body > :not(#local-ca-shell):not(#local-ca-readingbar):not(#local-ca-autism-helper) *,
html.local-ca-autism-motion body > :not(#local-ca-shell):not(#local-ca-readingbar):not(#local-ca-autism-helper) *::before,
html.local-ca-autism-motion body > :not(#local-ca-shell):not(#local-ca-readingbar):not(#local-ca-autism-helper) *::after {
    animation-duration:0.01ms !important; transition-duration:0.01ms !important; scroll-behavior:auto !important;
}
html.local-ca-autism-softcolors body > :not(#local-ca-shell):not(#local-ca-readingbar):not(#local-ca-autism-helper)
:is(main, #region-main, .card, .block, .generalbox, #page-content) {
    background-color:#f7faf8 !important; color:#203b4c !important;
}
html.local-ca-autism-reading body > :not(#local-ca-shell):not(#local-ca-readingbar):not(#local-ca-autism-helper)
:is(p,li,blockquote,dd) {
    font-family: Verdana, Arial, sans-serif !important; line-height:1.76 !important;
    letter-spacing:0.015em !important; word-spacing:0.06em !important;
}
html.local-ca-autism-focusmode body > :not(#local-ca-shell):not(#local-ca-readingbar):not(#local-ca-autism-helper)
:is(.drawer, .block, .secondary-navigation, #page-header) { opacity:.78; }
html.local-ca-autism-focusmode body > :not(#local-ca-shell):not(#local-ca-readingbar):not(#local-ca-autism-helper)
:is(.drawer, .block, .secondary-navigation, #page-header):is(:hover,:focus-within) { opacity:1; }
html.local-ca-autism-focusmode body > :not(#local-ca-shell):not(#local-ca-readingbar):not(#local-ca-autism-helper)
:is(main, #region-main, [role="main"]) { outline:2px solid #6e9fc3; outline-offset:3px; }
html.local-ca-autism-simpleui body > :not(#local-ca-shell):not(#local-ca-readingbar):not(#local-ca-autism-helper)
:is(.block, .drawer, .secondary-navigation, .page-footer, #page-footer) { opacity:.80; }
html.local-ca-autism-simpleui body > :not(#local-ca-shell):not(#local-ca-readingbar):not(#local-ca-autism-helper)
:is(.block, .drawer, .secondary-navigation, .page-footer, #page-footer):is(:hover,:focus-within) { opacity:1; }
html.local-ca-autism-quiet body > :not(#local-ca-shell):not(#local-ca-readingbar):not(#local-ca-autism-helper) :is(video,audio) {
    transition:none !important;
}
html.local-ca-autism-predictable body > :not(#local-ca-shell):not(#local-ca-readingbar):not(#local-ca-autism-helper)
:is(a,button,[role="button"]):focus-visible {
    outline:3px solid #176ab1 !important; outline-offset:3px !important;
}
html.local-ca-autism-predictable body > :not(#local-ca-shell):not(#local-ca-readingbar):not(#local-ca-autism-helper)
:is(.breadcrumb a, nav a, [aria-current="page"]) { text-decoration:underline !important; text-underline-offset:3px; }
.local-ca-autism-step-target { outline:3px solid #2b74aa !important; outline-offset:4px !important; }
#local-ca-autism-helper { position:fixed; z-index:2147483608; left:14px; bottom:16px;
    width:min(340px, calc(100vw - 28px)); padding:11px; background:#fff; color:#142b49;
    border:2px solid #2a6db5; border-radius:12px; box-shadow:0 7px 30px #152b4b44;
    font-family:Arial, sans-serif; font-size:12px; line-height:1.45; }
#local-ca-autism-helper .local-ca-autism-helperhead { display:flex; justify-content:space-between; align-items:center;
    gap:8px; margin-bottom:7px; }
#local-ca-autism-helper .local-ca-autism-helperhead strong { font-size:13px; }
#local-ca-autism-helper button { min-height:32px; border:1px solid #759bc7; border-radius:7px;
    background:#eaf2fb; color:#10305d; font-size:11px; font-weight:700; padding:6px; }
#local-ca-autism-helper button:disabled { opacity:.4; }
#local-ca-autism-helper .local-ca-autism-steprow { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; margin:6px 0; }
#local-ca-autism-helper p { margin:5px 0; }
@media(max-width:550px) { #local-ca-autism-helper { bottom:8px; left:8px; width:calc(100vw - 16px); } }

/* Administrator-only issuance history controls, v1.23.0. */
.ca-issuer-table thead th {
    background-color: #075bbb !important;
    color: #ffffff !important;
    font-weight: 700;
    white-space: nowrap;
    border-color: #075bbb;
}
.ca-issuer-table td {vertical-align: middle !important;}
.ca-issuer-table-wrapper {width: 100%;}
.ca-issuer-actions, .ca-issuer-actions-form {
    display: inline-flex;
    gap: 0.4rem;
    flex-wrap: nowrap;
    align-items: center;
}
.ca-issuer-action {font-size: .80rem; font-weight: 600; border-radius: .35rem; white-space: nowrap;}
.ca-issuer-action:disabled {opacity: .55; cursor: not-allowed;}
.ca-issuer-purple {background-color: #7132ab !important; color: #fff !important; border: 1px solid #7132ab !important;}
.ca-issuer-purple:hover, .ca-issuer-purple:focus {background-color: #59248c !important; border-color: #59248c !important; color: #fff !important;}


/* Responsive administrator license columns: 1, 6 and 12 months (v1.24.0). */
.ca-issuer-grid {
    display:grid; grid-template-columns:repeat(3,minmax(0,1fr));
    gap:14px; width:100%; margin-bottom:24px; align-items:start;
}
.ca-issuer-duration-card {
    min-width:0; border:1px solid #cedbf0; background:#fff;
    border-radius:9px; overflow:hidden; box-shadow:0 1px 2px #123c6622;
}
.ca-issuer-duration-heading {
    background:#075bbb; color:#fff; padding:12px 14px; font-size:1.05rem;
    line-height:1.35; margin:0; font-weight:700;
}
.ca-issuer-duration-body { padding:0 12px; }
.ca-issuer-license-entry { padding:14px 1px; border-bottom:1px solid #d9e2f0; }
.ca-issuer-license-entry:last-child {border-bottom:0;}
.ca-issuer-license-meta { font-size:.85rem; line-height:1.5; margin-bottom:5px;
    overflow-wrap:anywhere; color:#253851; }
.ca-issuer-license-meta strong { color:#0e315c; }
.ca-issuer-license-id { font-size:.76rem; white-space:normal; word-break:break-all;
    background:#f3e6f2; color:#9b166f; padding:2px 4px; border-radius:3px; }
.ca-issuer-license-entry .ca-issuer-actions { display:flex; flex-wrap:wrap; gap:5px; margin-top:10px; }
.ca-issuer-license-entry .ca-issuer-actions-form { display:inline-flex; flex-wrap:wrap; gap:5px; }
.ca-issuer-license-entry .ca-issuer-action { margin:0; padding:6px 10px; }
.ca-issuer-period-empty { padding:16px 2px; margin:0; color:#66778b; font-size:.875rem; }
@media(max-width:1050px) {
  .ca-issuer-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:680px) {
  .ca-issuer-grid {grid-template-columns:minmax(0,1fr);}
}

/* Three independent issuance forms, consistent with 1/6/12-month history (v1.25.0). */
.ca-issuer-new-grid { display:grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    gap:14px; width:100%; margin:16px 0 24px; align-items:stretch; }
.ca-issuer-new-card { min-width:0; overflow:hidden; border-radius:9px;
    border:1px solid #b8d0ee; background:#fff; box-shadow:0 1px 2px #123c6622; }
.ca-issuer-new-heading { margin:0; padding:12px 14px; background:#075bbb; color:#fff;
    font-size:1.05rem; line-height:1.35; font-weight:700; }
.ca-issuer-new-form { padding:14px; display:flex; flex-direction:column; gap:9px; height:calc(100% - 47px); }
.ca-issuer-new-form label {font-weight:600; margin:0; font-size:.92rem;}
.ca-issuer-new-form .form-control {min-width:0; width:100%;}
.ca-issuer-new-help {font-size:.80rem; color:#536477; line-height:1.4; margin:0 0 4px;}
.ca-issuer-new-submit {margin-top:auto; min-height:40px; width:100%; font-weight:600; white-space:normal;}
@media(max-width:1050px) {.ca-issuer-new-grid {grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:680px) {.ca-issuer-new-grid {grid-template-columns:minmax(0,1fr);}}

/* v1.27.0 — Períodos visuais: cabeçalhos das emissões e do histórico. */
/* As cores se aplicam APENAS aos cabeçalhos, sem mudar os botões de ação. */
.ca-issuer-new-card.ca-issuer-term-1 > .ca-issuer-new-heading,
.ca-issuer-duration-card.ca-issuer-term-1 > .ca-issuer-duration-heading {
    background-color: #ffdb00 !important;
    color: #18212c !important;
}
.ca-issuer-new-card.ca-issuer-term-6 > .ca-issuer-new-heading,
.ca-issuer-duration-card.ca-issuer-term-6 > .ca-issuer-duration-heading {
    background-color: #7824a0 !important;
    color: #ffffff !important;
}
.ca-issuer-new-card.ca-issuer-term-12 > .ca-issuer-new-heading,
.ca-issuer-duration-card.ca-issuer-term-12 > .ca-issuer-duration-heading {
    background-color: #008323 !important;
    color: #ffffff !important;
}


/* v1.30.0 - restore approved emitter UI, including on pages with theme overrides.
   Colors are used on each heading both for issuance forms and in the history. */
body .ca-issuer-new-grid,
body .ca-issuer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
body .ca-issuer-new-card.ca-issuer-term-1 > .ca-issuer-new-heading,
body .ca-issuer-duration-card.ca-issuer-term-1 > .ca-issuer-duration-heading {
    background: #ffdb00 !important;
    color: #18212c !important;
}
body .ca-issuer-new-card.ca-issuer-term-6 > .ca-issuer-new-heading,
body .ca-issuer-duration-card.ca-issuer-term-6 > .ca-issuer-duration-heading {
    background: #7824a0 !important;
    color: #ffffff !important;
}
body .ca-issuer-new-card.ca-issuer-term-12 > .ca-issuer-new-heading,
body .ca-issuer-duration-card.ca-issuer-term-12 > .ca-issuer-duration-heading {
    background: #008323 !important;
    color: #ffffff !important;
}
@media (max-width: 1050px) {
    body .ca-issuer-new-grid, body .ca-issuer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 680px) {
    body .ca-issuer-new-grid, body .ca-issuer-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}


/* v1.31.0: mobile VLibras coexistence and accessible touch targets.
   Desktop styling is deliberately unchanged. JS selects a safe position
   above or below VLibras, with a 12px gap and cookie-notice avoidance. */
@media (max-width: 600px) {
    #local-ca-shell.local-ca-shell.local-ca-pos-right {
        max-width: calc(100vw - 16px);
    }
    #local-ca-shell .local-ca-trigger {
        min-width: 44px;
        min-height: 44px;
        touch-action: manipulation;
    }
    #local-ca-shell .local-ca-panel {
        top: max(8px, env(safe-area-inset-top)) !important;
        right: max(8px, env(safe-area-inset-right)) !important;
        left: auto !important;
        max-height: calc(100dvh - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        max-width: calc(100vw - 16px);
    }
    /* Mobile placement is independent from the desktop setting. */
    #local-ca-shell[data-ca-mobile-side="left"] .local-ca-panel {
        right: auto !important;
        left: max(8px, env(safe-area-inset-left)) !important;
    }
    #local-ca-shell[data-ca-mobile-side="left"].local-ca-pos-right,
    #local-ca-shell[data-ca-mobile-side="left"].local-ca-pos-right.local-ca-auto {
        right: auto;
    }
    #local-ca-shell[data-ca-mobile-side="right"].local-ca-pos-left {
        left: auto;
    }
    /* Safe initial placement until the JS positioning/collision check runs. */
    #local-ca-shell[data-ca-mobile-vertical="top"] {
        top: max(18px, env(safe-area-inset-top));
        bottom: auto;
    }
    #local-ca-shell[data-ca-mobile-vertical="bottom"]:not(.local-ca-auto) {
        top: auto;
        bottom: var(--local-ca-bottom, 100px);
    }
}


/* v1.35 — User-controlled drag and drop. Clicking still opens the panel.
   This overrides mobile touch-action:manipulation only on the launcher. */
#local-ca-shell[data-ca-drag="1"] > #local-ca-trigger {
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}
#local-ca-shell.local-ca-dragging > #local-ca-trigger { cursor: grabbing; }
#local-ca-shell.local-ca-userplaced { transition: none !important; }
#local-ca-panel .local-ca-reset-position {
    display:block; width:100%; margin-top:7px; min-height:32px;
    border:1px solid #88a9d5; border-radius:7px; background:#f4f8ff;
    color:#103b72; font-size:11px; font-weight:700;
}
#local-ca-panel .local-ca-reset-position:hover { background:#e2efff; }
#local-ca-panel .local-ca-reset-position:focus-visible { outline:3px solid #eeaa25; outline-offset:2px; }
/* The positioned panel is still fixed and its coordinates are clamped by JS. */
#local-ca-shell.local-ca-userplaced > #local-ca-panel { z-index:2147483501; }
