/* ==========================================================
   DGtec — camada de conformidade (LGPD / Marco Civil)
   Modal de documentos legais + banner de cookies
   ========================================================== */

/* ---------- Link de pular para o conteúdo --------------- */

.dgl-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100000;
  background: #f36403;
  color: #ffffff;
  padding: 14px 22px;
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 4px 0;
}
.dgl-skip:focus {
  left: 0;
  outline: 3px solid #ffffff;
  outline-offset: -6px;
}

/* ---------- Modal ---------------------------------------- */

.dgl-overlay {
  position: fixed;
  inset: 0;
  z-index: 99990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(6, 9, 20, 0.78);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.dgl-overlay.dgl-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease, visibility 0s;
}

.dgl-modal {
  position: relative;
  width: 100%;
  max-width: 820px;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  background: #fefff5;
  border-radius: 4px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.45);
  transform: translateY(18px) scale(0.985);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.dgl-overlay.dgl-open .dgl-modal { transform: none; }

.dgl-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 32px 20px;
  border-bottom: 1px solid rgba(14, 18, 36, 0.14);
  background: #0e1224;
  border-radius: 4px 4px 0 0;
}
.dgl-modal-head h2 {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 700;
  color: #fefff5;
}
.dgl-modal-head .dgl-kicker {
  display: block;
  margin-bottom: 6px;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: #f36403;
}

.dgl-close {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(254, 255, 245, 0.35);
  border-radius: 2px;
  color: #fefff5;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.dgl-close:hover { background: #f36403; border-color: #f36403; }
.dgl-close:focus-visible { outline: 3px solid #f36403; outline-offset: 2px; }

.dgl-modal-body {
  overflow-y: auto;
  padding: 28px 32px 34px;
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  line-height: 1.68;
  color: #23262f;
  -webkit-overflow-scrolling: touch;
}
.dgl-modal-body h3 {
  margin: 30px 0 10px;
  font-size: 16px;
  font-weight: 700;
  color: #0e1224;
}
.dgl-modal-body h3:first-child { margin-top: 0; }
.dgl-modal-body p { margin: 0 0 14px; }
.dgl-modal-body ul { margin: 0 0 16px; padding-left: 20px; }
.dgl-modal-body li { margin-bottom: 8px; }
.dgl-modal-body a { color: #b34400; text-decoration: underline; }
.dgl-modal-body a:hover { color: #f36403; }
.dgl-modal-body strong { font-weight: 700; color: #0e1224; }
.dgl-jump {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: #b34400;
  text-decoration: underline;
  cursor: pointer;
}
.dgl-jump:hover { color: #f36403; }

.dgl-meta {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid rgba(14, 18, 36, 0.14);
  font-size: 13px;
  color: #4a4f5c;
}

.dgl-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 18px;
  font-size: 13.5px;
}
.dgl-table th,
.dgl-table td {
  border: 1px solid rgba(14, 18, 36, 0.16);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.dgl-table th {
  background: rgba(14, 18, 36, 0.05);
  font-weight: 700;
  color: #0e1224;
}

/* ---------- Banner de cookies ---------------------------- */

.dgl-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99980;
  background: #0e1224;
  border-top: 3px solid #f36403;
  padding: 22px 28px;
  transform: translateY(110%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.dgl-banner.dgl-show { transform: none; }

.dgl-banner-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.dgl-banner-text {
  flex: 1 1 420px;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: #fefff5;
  margin: 0;
}
.dgl-banner-text a { color: #ffa15e; text-decoration: underline; }
.dgl-banner-text a:hover { color: #ffffff; }

.dgl-banner-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.dgl-btn {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  padding: 14px 22px;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  min-height: 44px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.dgl-btn:focus-visible { outline: 3px solid #ffa15e; outline-offset: 2px; }
.dgl-btn-primary { background: #f36403; color: #ffffff; }
.dgl-btn-primary:hover { background: #ff7a1f; }
.dgl-btn-ghost { background: transparent; color: #fefff5; border-color: rgba(254, 255, 245, 0.45); }
.dgl-btn-ghost:hover { background: rgba(254, 255, 245, 0.12); }
.dgl-btn-dark { background: #0e1224; color: #fefff5; }
.dgl-btn-dark:hover { background: #1c2242; }

/* ---------- Preferências granulares ---------------------- */

.dgl-prefs { margin: 4px 0 0; }
.dgl-pref {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid rgba(14, 18, 36, 0.12);
}
.dgl-pref:last-of-type { border-bottom: 0; }
.dgl-pref-copy { flex: 1; }
.dgl-pref-copy strong { display: block; margin-bottom: 3px; font-size: 15px; }
.dgl-pref-copy span { font-size: 13.5px; color: #4a4f5c; line-height: 1.55; }

.dgl-switch {
  flex: 0 0 auto;
  position: relative;
  width: 52px;
  height: 30px;
  margin-top: 2px;
}
.dgl-switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.dgl-track {
  position: absolute;
  inset: 0;
  background: #9aa0ae;
  border-radius: 999px;
  transition: background 0.2s ease;
  pointer-events: none;
}
.dgl-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.2s ease;
}
.dgl-switch input:checked + .dgl-track { background: #1f7a4d; }
.dgl-switch input:checked + .dgl-track::after { transform: translateX(22px); }
.dgl-switch input:disabled + .dgl-track { background: #1f7a4d; opacity: 0.55; }
.dgl-switch input:focus-visible + .dgl-track { outline: 3px solid #f36403; outline-offset: 3px; }

.dgl-modal-foot {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  padding: 18px 32px 24px;
  border-top: 1px solid rgba(14, 18, 36, 0.14);
  background: rgba(14, 18, 36, 0.035);
  border-radius: 0 0 4px 4px;
}

/* ---------- Rodapé legal --------------------------------- */

.dgl-footer-legal {
  max-width: 1180px;
  margin: 0 auto;
  padding: 4px 0 0;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(254, 255, 245, 0.82);
  text-align: center;
}
.dgl-footer-legal p { margin: 0 0 6px; }
.dgl-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  margin-top: 12px;
}
.dgl-footer-links a,
.dgl-footer-links button {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #ffa15e;
  background: none;
  border: 0;
  padding: 6px 0;
  cursor: pointer;
  text-decoration: underline;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.dgl-footer-links a:hover,
.dgl-footer-links button:hover { color: #ffffff; }
.dgl-footer-links a:focus-visible,
.dgl-footer-links button:focus-visible { outline: 3px solid #f36403; outline-offset: 3px; }

/* ---------- Consentimento no formulário ------------------ */

.dgl-form-consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 4px 0 18px;
  font-family: 'Montserrat', sans-serif;
  font-size: 13.5px;
  line-height: 1.6;
}
.dgl-form-consent input[type="checkbox"] {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  accent-color: #f36403;
  cursor: pointer;
}
.dgl-form-consent label { cursor: pointer; margin: 0; }
.dgl-form-consent button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.dgl-form-consent input[type="checkbox"]:focus-visible { outline: 3px solid #f36403; outline-offset: 2px; }

/* ---------- Foco visível global -------------------------- */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #f36403;
  outline-offset: 2px;
}

/* ---------- Responsivo ----------------------------------- */

@media (max-width: 767px) {
  .dgl-banner { padding: 18px 16px; }
  .dgl-banner-actions { width: 100%; }
  .dgl-btn { flex: 1 1 auto; }
  .dgl-modal-head,
  .dgl-modal-body,
  .dgl-modal-foot { padding-left: 20px; padding-right: 20px; }
  .dgl-modal { max-height: 92vh; }
  .dgl-overlay { padding: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .dgl-overlay,
  .dgl-modal,
  .dgl-banner { transition: none !important; }
}
