/* 
 * Hub Inklusiva Acessibilidade - Drawer Styles V5
 */
@import url('https://fonts.cdnfonts.com/css/opendyslexic');

:root {
    --hi-bg-panel: #f4f4f4;
    --hi-text-main: #333333;
    --hi-border: #e0e0e0;
    --hi-hover: #ffffff;
    --hi-shadow: rgba(0, 0, 0, 0.15);
}

/* O wrapper agora cobre a tela inteira, mas deixa os cliques passarem direto pro site */
#hi-acessibilidade-wrapper {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 2147483647;
    pointer-events: none; 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Somente o botao e o painel recebem cliques */
#hi-acesso-toggle, #hi-acesso-panel {
    pointer-events: auto;
}

/* Container de Botões (Empilhados) */
.hi-toggles-container {
    position: absolute;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Posições Absolutas do Container */
#hi-acessibilidade-wrapper.pos-right-middle .hi-toggles-container { top: calc(50% + 70px); right: 30px; transform: translateY(-50%); }
#hi-acessibilidade-wrapper.pos-left-middle .hi-toggles-container { top: calc(50% + 70px); left: 30px; transform: translateY(-50%); }
#hi-acessibilidade-wrapper.pos-right-bottom .hi-toggles-container { bottom: 30px; right: 30px; }
#hi-acessibilidade-wrapper.pos-left-bottom .hi-toggles-container { bottom: 30px; left: 30px; }

/* O botão redondo de acessibilidade */
#hi-acesso-toggle {
    background-color: var(--hi-acesso-color, #1b2d42);
    color: #ffffff;
    border: 3px solid #ffffff;
    border-radius: 50%;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px var(--hi-shadow);
    transition: transform 0.2s;
    pointer-events: auto;
}

/* Tamanho do ícone dentro dos botões flutuantes */
#hi-acesso-toggle svg, #hi-acesso-toggle i {
    width: 34px;
    height: 34px;
}

#hi-acesso-toggle:focus { outline: 3px solid #ffcc00; }

#hi-acessibilidade-wrapper.hi-is-open .hi-toggles-container {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.5);
    transition: all 0.3s;
}


/* 
 * O NOVO PAINEL (SIDEBAR GIGANTE)
 */
#hi-acesso-panel {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 420px;
    max-width: 100vw; 
    background: var(--hi-bg-panel);
    box-shadow: -5px 0 40px var(--hi-shadow);
    z-index: 1; 
    display: flex;
    flex-direction: column;
    visibility: hidden;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), visibility 0.4s;
}

/* Fixar na direita ou esquerda (oculto por padrão) */
.pos-right-bottom #hi-acesso-panel,
.pos-right-middle #hi-acesso-panel { 
    right: 0; 
    transform: translateX(100%); 
}
.pos-left-bottom #hi-acesso-panel,
.pos-left-middle #hi-acesso-panel { 
    left: 0; 
    transform: translateX(-100%); 
}

#hi-acesso-panel.hi-panel-open {
    visibility: visible;
    transform: translateX(0) !important;
}

/* Cabeçalho Gigante */
.hi-panel-header {
    background: var(--hi-acesso-color, #1b2d42);
    color: #fff;
    padding: 30px 20px;
    text-align: center;
    position: relative;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.hi-header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.hi-header-actions {
    display: flex;
    gap: 10px;
}

.hi-header-icon {
    width: 60px;
    height: 60px;
    background: #fff;
    color: var(--hi-acesso-color, #1b2d42);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hi-panel-header h2 { 
    margin: 0; 
    font-size: 24px; 
    color: #fff; 
    font-weight: bold;
}

#hi-acesso-close, .hi-darkmode-btn { 
    background: rgba(255,255,255,0.2); 
    border: none; 
    color: #fff; 
    font-size: 20px; 
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer; 
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
}
#hi-acesso-close:hover, .hi-darkmode-btn:hover { 
    background: rgba(255,255,255,0.4); 
    transform: scale(1.05);
}

/* Área de Rolagem do Conteúdo */
.hi-panel-content {
    padding: 25px 20px;
    overflow-y: auto;
    flex-grow: 1; 
    background-color: transparent; /* O fundo agora é o Glassmorphism do painel */
}

.hi-panel-content::-webkit-scrollbar { width: 6px; }
.hi-panel-content::-webkit-scrollbar-track { background: transparent; }
.hi-panel-content::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.2); border-radius: 10px; }
.hi-panel-content::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.4); }

/* Seções e Grid - Design BENTO BOX (Moderno) */
.hi-section { 
    background: transparent;
    padding: 0;
    margin-bottom: 30px; 
}
.hi-section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--hi-text-main);
    margin-top: 0;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.hi-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 15px; }
.hi-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

/* Botões de Ação (Estilo OneTap / HandTalk) */
.hi-action-btn {
    background: #f0f2f5;
    border: 2px solid transparent;
    border-radius: 14px;
    padding: 20px 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--hi-text-main);
    cursor: pointer;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}
.hi-action-btn:hover, .hi-action-btn:focus { 
    background: #ffffff !important;
    border-color: var(--hi-acesso-color) !important;
    color: var(--hi-text-main) !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08); 
    transform: translateY(-4px); 
}
.hi-action-btn.hi-active {
    border-color: var(--hi-acesso-color) !important;
    background: #ffffff !important;
    color: var(--hi-text-main) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
}

.hi-btn-icon {
    font-size: 22px;
    background: #ffffff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px auto;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.hi-action-btn:hover .hi-btn-icon {
    transform: scale(1.05);
}
.hi-action-btn.hi-active .hi-btn-icon {
    background: var(--hi-acesso-color);
    color: #ffffff;
    transform: scale(1.05);
}

/* Perfis Inteligentes - Destaque visual */
.hi-profile-btn {
    background: #f0f2f5;
    border: 2px solid #e0e0e0;
}
.hi-profile-btn:hover {
    border-color: var(--hi-acesso-color) !important;
    background: #ffffff !important;
}
.hi-profile-btn.hi-active {
    border-color: var(--hi-acesso-color) !important;
    background: #ffffff !important;
}

/* Botões de + e - (Estilo idêntico aos Action Buttons) */
.hi-control-btn {
    background: #f0f2f5;
    border: 2px solid transparent;
    border-radius: 14px;
    padding: 15px 10px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}
.hi-control-btn span { 
    display: block; 
    font-size: 13px; 
    margin-bottom: 15px; 
    font-weight: 600;
    color: var(--hi-text-main);
}
.hi-control-actions { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    width: 100%;
    background: #ffffff;
    border-radius: 30px;
    padding: 2px;
    box-shadow: inset 0 0 0 1px #eef1f5;
}
.hi-control-actions button {
    background: var(--hi-acesso-color);
    color: #ffffff;
    border: none;
    width: 38px;
    height: 38px;
    min-width: 38px;
    flex-shrink: 0;
    padding: 0 !important;
    border-radius: 50%;
    cursor: pointer;
    font-size: 28px;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: all 0.2s;
}
.hi-control-actions button:hover { 
    filter: brightness(0.9);
}
.hi-control-status { 
    font-size: 13px; 
    font-weight: 500; 
    color: var(--hi-text-main);
    flex-grow: 1;
    text-align: center;
}

.hi-panel-footer { margin-top: 10px; text-align: center; padding-bottom: 20px;}
#hi-acesso-reset {
    background: var(--hi-acesso-color);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 15px;
    width: 100%;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.hi-footer-branding {
    margin-top: 15px;
    font-size: 12px;
    color: #777;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}
.hi-footer-branding a {
    color: var(--hi-acesso-color);
    text-decoration: none;
    font-size: 14px;
}
.hi-footer-branding a:hover {
    text-decoration: underline;
}

/* EFEITOS V2 */
.hi-force-focus *:focus { outline: 3px solid #ffcc00 !important; outline-offset: 2px !important; }
body.hi-text-size-1 p, body.hi-text-size-1 h1, body.hi-text-size-1 h2, body.hi-text-size-1 h3, body.hi-text-size-1 h4, body.hi-text-size-1 h5, body.hi-text-size-1 h6, body.hi-text-size-1 li, body.hi-text-size-1 a, body.hi-text-size-1 button, body.hi-text-size-1 input, body.hi-text-size-1 label { font-size: 110% !important; }
body.hi-text-size-2 p, body.hi-text-size-2 h1, body.hi-text-size-2 h2, body.hi-text-size-2 h3, body.hi-text-size-2 h4, body.hi-text-size-2 h5, body.hi-text-size-2 h6, body.hi-text-size-2 li, body.hi-text-size-2 a, body.hi-text-size-2 button, body.hi-text-size-2 input, body.hi-text-size-2 label { font-size: 120% !important; }
body.hi-text-size-3 p, body.hi-text-size-3 h1, body.hi-text-size-3 h2, body.hi-text-size-3 h3, body.hi-text-size-3 h4, body.hi-text-size-3 h5, body.hi-text-size-3 h6, body.hi-text-size-3 li, body.hi-text-size-3 a, body.hi-text-size-3 button, body.hi-text-size-3 input, body.hi-text-size-3 label { font-size: 130% !important; }
body.hi-text-size-4 p, body.hi-text-size-4 h1, body.hi-text-size-4 h2, body.hi-text-size-4 h3, body.hi-text-size-4 h4, body.hi-text-size-4 h5, body.hi-text-size-4 h6, body.hi-text-size-4 li, body.hi-text-size-4 a, body.hi-text-size-4 button, body.hi-text-size-4 input, body.hi-text-size-4 label { font-size: 140% !important; }
body[class*="hi-text-size-"] span, body[class*="hi-text-size-"] strong, body[class*="hi-text-size-"] em, body[class*="hi-text-size-"] b, body[class*="hi-text-size-"] i { font-size: inherit !important; }
body.hi-line-height-1 * { line-height: 1.5 !important; }
body.hi-line-height-2 * { line-height: 1.75 !important; }
body.hi-line-height-3 * { line-height: 2.0 !important; }
body.hi-line-height-4 * { line-height: 2.25 !important; }
body.hi-letter-spacing-1 * { letter-spacing: 1px !important; }
body.hi-letter-spacing-2 * { letter-spacing: 2px !important; }
body.hi-font-weight * { font-weight: 700 !important; }
body.hi-align-left * { text-align: left !important; }
body.hi-align-center * { text-align: center !important; }
body.hi-align-right * { text-align: right !important; }

/* MODO ESCURO NATIVO E EFEITOS GLOBAIS DE COR */
/* Removemos os overlays de mix-blend-mode que causam bugs em telas (tela preta/branca) em alguns temas */
#hi-dark-mode-overlay, #hi-filter-overlay { display: none !important; }

/* Aplicar filtros diretamente aos filhos do body (exceto VLibras e nosso plugin) para garantir compatibilidade universal */
body.hi-dark-mode > *:not([vw]):not(#hi-acessibilidade-wrapper) {
    filter: invert(1) hue-rotate(180deg) !important;
}
body.hi-dark-mode { background: #111 !important; }

body.hi-high-contrast > *:not([vw]):not(#hi-acessibilidade-wrapper) {
    filter: contrast(150%) brightness(80%) !important;
}

body.hi-grayscale > *:not([vw]):not(#hi-acessibilidade-wrapper) {
    filter: grayscale(100%) !important;
}

body.hi-light-contrast { background: #fff !important; color: #000 !important; }
body.hi-light-contrast *:not(#hi-acessibilidade-wrapper):not(#hi-acessibilidade-wrapper *) { color: #000 !important; border-color: #000 !important; }

body.hi-hide-images img:not(#hi-acessibilidade-wrapper *), body.hi-hide-images .elementor-image:not(#hi-acessibilidade-wrapper *), body.hi-hide-images .gb-container-image:not(#hi-acessibilidade-wrapper *) { visibility: hidden !important; }
body.hi-highlight-links a:not(#hi-acessibilidade-wrapper *), body.hi-highlight-links button:not(#hi-acessibilidade-wrapper *) { text-decoration: underline !important; text-decoration-color: #ffcc00 !important; background-color: rgba(255, 204, 0, 0.2) !important; color: #000 !important; }
body.hi-large-cursor, body.hi-large-cursor *:not(#hi-acessibilidade-wrapper):not(#hi-acessibilidade-wrapper *) { cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path d="M7 2l12 11.2-5.8.5 3.3 7.3-2.2 1-3.2-7.4-4.4 4.8z" fill="%23000" stroke="%23fff" stroke-width="1.5"/></svg>'), auto !important; }
body.hi-stop-animations *:not(#hi-acessibilidade-wrapper):not(#hi-acessibilidade-wrapper *) { transition: none !important; animation: none !important; }
body.hi-readable-font *:not(#hi-acessibilidade-wrapper):not(#hi-acessibilidade-wrapper *) { font-family: Arial, Helvetica, sans-serif !important; }
body.hi-dyslexic-font *:not(#hi-acessibilidade-wrapper):not(#hi-acessibilidade-wrapper *) { font-family: 'OpenDyslexic', sans-serif !important; }
#hi-reading-guide { position: fixed; left: 0; right: 0; height: 4px; background: #ffcc00; z-index: 2147483646; pointer-events: none; display: none; }
#hi-reading-mask-top, #hi-reading-mask-bottom { position: fixed; left: 0; right: 0; background: rgba(0,0,0,0.7); z-index: 2147483645; pointer-events: none; display: none; }
body.hi-reading-line #hi-reading-guide { display: block; }
body.hi-reading-mask #hi-reading-mask-top { display: block; top: 0; }
body.hi-reading-mask #hi-reading-mask-bottom { display: block; bottom: 0; }

/* =========================================
   AJUSTES DE BOTÕES APENAS PARA CELULAR (MINI)
   ========================================= */
@media (max-width: 768px) {
    /* Encolhe o container e alinha no TOPO */
    html body #hi-acessibilidade-wrapper .hi-toggles-container {
        transform: scale(0.75) !important; 
        bottom: auto !important; 
        top: 140px !important; /* Fica fixo um pouco mais abaixo do cabeçalho */
        margin-top: 0 !important;
    }
    
    /* Aumenta os bonequinhos (SVG) lá dentro para preencher melhor a bola */
    html body #hi-acessibilidade-wrapper #hi-acesso-toggle svg {
        transform: scale(2.2) !important; 
        transform-origin: center center !important;
    }
    
    /* Ajuste de tamanho do ícone nativo do VLibras no celular a pedido do cliente */
    html body div[vw] [vw-access-button] {
        transform: scale(1.2) !important;
        transform-origin: center center !important;
        margin-right: 15px !important;
    }
    
    /* Margens para não ficar colado nas bordas */
    html body #hi-acessibilidade-wrapper.pos-right-middle .hi-toggles-container,
    html body #hi-acessibilidade-wrapper.pos-right-bottom .hi-toggles-container {
        transform-origin: right top !important;
        right: 10px !important; 
    }
    
    html body #hi-acessibilidade-wrapper.pos-left-middle .hi-toggles-container,
    html body #hi-acessibilidade-wrapper.pos-left-bottom .hi-toggles-container {
        transform-origin: left top !important;
        left: 10px !important; 
    }
    
    /* Voltar ao Topo (MINI) continua embaixo */
    html body a.generate-back-to-top {
        padding: 5px 8px !important;
        font-size: 9px !important; 
        bottom: 15px !important;
        right: 15px !important;
        line-height: 1.1 !important;
    }
}

/* =========================================
   Correção AMAWeb: Labels Ocultos do Fluent Forms
   ========================================= */
/* Quando o usuário oculta labels no Fluent Forms, o plugin nativamente aplica display:none.
   Isso reprova no AMAWeb. Nós sobrescrevemos para um formato visível apenas para leitores de tela (sr-only). */
.ff-el-is-label-hidden label, 
.ff-form-has-hidden-labels label,
label[style*="display: none"] {
    display: inline-block !important;
    border: 0 !important;
    clip: rect(1px, 1px, 1px, 1px) !important;
    -webkit-clip-path: inset(50%) !important;
    clip-path: inset(50%) !important;
    height: 1px !important;
    margin: -1px !important;
    overflow: hidden !important;
    padding: 0 !important;
    position: absolute !important;
    width: 1px !important;
    white-space: nowrap !important;
}

/* =========================================
   Correção AMAWeb: Contraste do Botão "Diagnóstico Gratuito" (Menu)
   ========================================= */
/* A cor do botão original tem baixo contraste com o texto branco.
   Ao invés de escurecer o fundo, trocamos o texto para escuro, garantindo aprovação WCAG AA imediata. */
html body header nav a[href*="auditoria-gratuita"] {
    color: #111111 !important;
    font-weight: 700 !important;
}
