/* =========================================================
   WIDGET DE ACESSIBILIDADE — Esporte Clube Bela Vista
   Construído de forma independente (sem serviços de terceiros)
   ========================================================= */

@font-face{
  font-family: 'OpenDyslexic';
  src: url('../assets/fonts/OpenDyslexic-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face{
  font-family: 'OpenDyslexic';
  src: url('../assets/fonts/OpenDyslexic-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --- link "pular para o conteúdo" (sempre presente, só visível no foco) --- */
.acc-skip-link{
  position: fixed;
  top: -60px;
  left: 12px;
  z-index: 10000;
  background: var(--amarelo, #f6c500);
  color: #0a0a0b;
  font-family: var(--font-cond, sans-serif);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 14px;
  padding: 12px 20px;
  border-radius: 3px;
  transition: top .2s ease;
}
.acc-skip-link:focus{ top: 12px; }

/* --- botão flutuante --- */
.acc-toggle{
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9998;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #0a0a0b;
  border: 2px solid #f6c500;
  color: #f6c500;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
  transition: transform .2s ease, background .2s ease;
}
.acc-toggle:hover{ transform: translateY(-3px); background: #1c1c1f; }
.acc-toggle:focus-visible{ outline: 3px solid #f6c500; outline-offset: 3px; }
.acc-toggle svg{ width: 30px; height: 30px; }

/* --- painel --- */
.acc-panel{
  position: fixed;
  right: 22px;
  bottom: 90px;
  z-index: 9999;
  width: min(360px, calc(100vw - 44px));
  max-height: min(640px, calc(100vh - 130px));
  overflow-y: auto;
  background: #131315;
  color: #fbf8ef;
  border: 1px solid rgba(251,248,239,0.14);
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.55);
  font-family: Arial, Helvetica, sans-serif;
  transform: translateY(12px) scale(0.98);
  opacity: 0;
  pointer-events: none;
  transition: transform .18s ease, opacity .18s ease;
}
.acc-panel.is-open{
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.acc-panel-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(251,248,239,0.14);
  position: sticky;
  top: 0;
  background: #131315;
}
.acc-panel-head h2{
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}
.acc-panel-close{
  background: none;
  border: none;
  color: #fbf8ef;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.acc-panel-close:hover{ background: rgba(251,248,239,0.1); }
.acc-panel-close:focus-visible{ outline: 2px solid #f6c500; outline-offset: 2px; }
.acc-panel-close svg{ width: 18px; height: 18px; }

.acc-group{
  padding: 16px 20px;
  border-bottom: 1px solid rgba(251,248,239,0.08);
}
.acc-group:last-of-type{ border-bottom: none; }
.acc-group-label{
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #f6c500;
  margin-bottom: 10px;
}
.acc-group-label svg{ width: 18px; height: 18px; flex: 0 0 auto; }

.acc-row{ display: flex; gap: 8px; flex-wrap: wrap; }
.acc-btn{
  flex: 1 1 auto;
  min-width: 64px;
  background: #1c1c1f;
  color: #fbf8ef;
  border: 1px solid rgba(251,248,239,0.18);
  border-radius: 6px;
  padding: 9px 10px;
  font-size: 13px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background .15s ease, border-color .15s ease;
}
.acc-btn:hover{ background: #26262a; }
.acc-btn:focus-visible{ outline: 2px solid #f6c500; outline-offset: 2px; }
.acc-btn[aria-pressed="true"]{
  background: #f6c500;
  color: #0a0a0b;
  border-color: #f6c500;
}
.acc-btn-wide{ flex-basis: 100%; }

.acc-fontsize-row{ display: flex; align-items: center; gap: 8px; }
.acc-fontsize-row .acc-btn{ flex: 0 0 auto; width: 42px; min-width: 42px; font-size: 16px; }
.acc-fontsize-value{
  flex: 1 1 auto;
  text-align: center;
  font-size: 13px;
  color: #9a988f;
}

.acc-reset{
  display: block;
  width: calc(100% - 40px);
  margin: 16px 20px 20px;
  background: transparent;
  color: #e2382b;
  border: 1px solid #e2382b;
  border-radius: 6px;
  padding: 10px;
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
}
.acc-reset:hover{ background: rgba(226,56,43,0.12); }
.acc-reset:focus-visible{ outline: 2px solid #f6c500; outline-offset: 2px; }

/* =========================================================
   EFEITOS APLICADOS AO SITE INTEIRO
   ========================================================= */

/* destaque de links */
html.acc-highlight-links a{
  text-decoration: underline !important;
  text-decoration-thickness: 2px !important;
  text-underline-offset: 3px !important;
  background-color: rgba(246,197,0,0.18) !important;
  border-radius: 2px;
}

/* fonte legível */
html.acc-font-arial, html.acc-font-arial *{
  font-family: Arial, Helvetica, sans-serif !important;
}
html.acc-font-dyslexic, html.acc-font-dyslexic *{
  font-family: 'OpenDyslexic', Arial, sans-serif !important;
}

/* espaçamento de texto */
html.acc-spacing body, html.acc-spacing p, html.acc-spacing li, html.acc-spacing a,
html.acc-spacing h1, html.acc-spacing h2, html.acc-spacing h3, html.acc-spacing h4{
  line-height: 1.9 !important;
  letter-spacing: 0.05em !important;
  word-spacing: 0.14em !important;
}

/* navegação por teclado: foco bem visível */
html.acc-keyboard-nav *:focus{
  outline: 3px solid #f6c500 !important;
  outline-offset: 3px !important;
}

/* desativar animações */
html.acc-no-motion *{
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
  scroll-behavior: auto !important;
}

/* --- contraste: alto contraste --- */
html.acc-contrast-high body{ background: #000 !important; color: #fff !important; }
html.acc-contrast-high *{
  background-color: #000 !important;
  color: #fff !important;
  border-color: #fff !important;
  text-shadow: none !important;
  box-shadow: none !important;
}
html.acc-contrast-high a{ color: #ffe000 !important; }
html.acc-contrast-high .btn-primary, html.acc-contrast-high .ig-btn{
  background: #ffe000 !important;
  color: #000 !important;
}
html.acc-contrast-high img,
html.acc-contrast-high .hero-bg,
html.acc-contrast-high .hero-overlay,
html.acc-contrast-high .hero-glow,
html.acc-contrast-high .grain{
  opacity: 0 !important;
  visibility: hidden !important;
}

/* --- contraste: escuro (reforça preto puro em toda a página) --- */
html.acc-contrast-dark body,
html.acc-contrast-dark section,
html.acc-contrast-dark .bg-creme,
html.acc-contrast-dark .bg-2{
  background: #000 !important;
  color: #fff !important;
}
html.acc-contrast-dark .bg-creme *{ color: #fff !important; }

/* --- contraste: invertido --- */
html.acc-contrast-invert{ filter: invert(1) hue-rotate(180deg); }
html.acc-contrast-invert img,
html.acc-contrast-invert video{
  filter: invert(1) hue-rotate(180deg);
}

@media (max-width: 480px){
  .acc-toggle{ right: 14px; bottom: 14px; width: 50px; height: 50px; }
  .acc-panel{ right: 12px; bottom: 76px; }
}
