/* Aviso de cookies, preferências e aviso de privacidade dos cadastros. Usado nos dois layouts. */

.ck-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60;
  max-width: 1120px; margin: 0 auto; display: flex; align-items: center; gap: 28px; padding: 20px 24px;
  max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto;
  background: #fff; color: #16241b; border: 1px solid #dfe2d8; border-top: 4px solid #0b5d34; border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .28); text-align: left;
}
.ck-banner-text { flex: 1; min-width: 0; }
.ck-banner h2 { margin: 0 0 4px; font-size: 16px; line-height: 1.3; letter-spacing: 0; text-transform: none; color: #102016; }
.ck-banner p { margin: 0; font-size: 13px; line-height: 1.6; color: #43524a; }
.ck-banner-text a, .ck-dialog-links a { color: #0b5d34; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.ck-banner .ck-actions { flex: none; max-width: 440px; }

.ck-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.ck-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 18px;
  border: 2px solid #0b5d34; border-radius: 10px; background: #0b5d34; color: #fff;
  font-family: inherit; font-size: 13px; font-weight: 800; line-height: 1.2; text-align: center; cursor: pointer;
}
.ck-btn:hover { background: #084627; border-color: #084627; }
.ck-btn-ghost { background: #fff; color: #0b5d34; }
.ck-btn-ghost:hover { background: #eef3e9; color: #084627; }
.ck-btn:focus-visible, .ck-close:focus-visible, .ck-switch:focus-visible { outline: 3px solid #c99a00; outline-offset: 2px; }
.ck-status { flex-basis: 100%; margin: 0; font-size: 13px; font-weight: 700; color: #0b5d34; }
.ck-status:empty { display: none; }
.ck-banner .ck-status { color: #8c1d1d; }

/* enquanto o aviso está na tela, ele ocupa o lugar dos botões flutuantes */
.has-consent-banner { padding-bottom: var(--ck-height, 0px); }
.has-consent-banner .mobile-bar, .has-consent-banner .help-widget { visibility: hidden; }

/* telas de login: no computador o aviso fica à direita, sem cobrir o painel */
@media (min-width: 901px) {
  .auth-body .ck-banner { left: auto; right: 20px; bottom: 52px; width: 420px; margin: 0; flex-direction: column; align-items: stretch; gap: 16px; }
  .auth-body.has-consent-banner { padding-bottom: 0; }
}

/* janela de preferências */
.ck-dialog {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto;
  padding: 24px; border: 0; border-radius: 18px; background: #fff; color: #16241b; text-align: left;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .4);
}
.ck-dialog::backdrop { background: rgba(8, 22, 14, .65); }
.ck-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.ck-dialog-head h2 { margin: 0; font-size: 19px; line-height: 1.3; letter-spacing: 0; color: #102016; }
.ck-close { flex: none; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 10px; background: #eef3e9; color: #102016; cursor: pointer; }
.ck-dialog-links { margin: 16px 0 0; font-size: 13px; }

.ck-cat { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 16px; margin-bottom: 10px; border: 1px solid #dfe2d8; border-radius: 12px; }
label.ck-cat { cursor: pointer; }
.ck-cat-text { display: block; min-width: 0; }
.ck-cat-text strong { display: block; margin-bottom: 3px; font-size: 14px; color: #102016; }
.ck-cat-text span { display: block; font-size: 12.5px; font-weight: 400; line-height: 1.55; color: #556459; }
.ck-always { flex: none; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #0b5d34; }
.ck-switch {
  flex: none; appearance: none; -webkit-appearance: none; position: relative; width: 46px; height: 26px; margin: 0;
  border-radius: 26px; background: #8a968d; cursor: pointer; transition: background .2s ease;
}
.ck-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s ease; }
.ck-switch:checked { background: #0b5d34; }
.ck-switch:checked::after { transform: translateX(20px); }
.ck-form .ck-note { margin: 4px 0 12px; font-size: 12.5px; line-height: 1.55; color: #556459; }
.ck-form .ck-gpc { padding: 10px 12px; border-radius: 10px; background: #eef3e9; color: #16241b; }
.ck-form .ck-actions { margin-top: 16px; }

/* preferências dentro da página /cookies */
.ck-inline { margin: 24px 0 8px; padding: 22px; border: 1px solid #dfe2d8; border-radius: 16px; background: #fff; scroll-margin-top: 100px; }
.legal-text .ck-inline h2 { margin: 0 0 14px; }
.legal-text .ck-form p { margin-bottom: 0; }
.legal-text .ck-form .ck-note { margin-bottom: 10px; }

/* aviso de privacidade acima da declaração nos cadastros */
.privacy-notice { margin: 28px 0 18px; padding: 18px 20px; border: 1px solid #cfdcc8; border-left: 4px solid #0b5d34; border-radius: 12px; background: #f3f7ef; color: #16241b; }
.privacy-notice h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 14px; color: #0b5d34; }
.privacy-notice dl { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 6px 14px; margin: 0; font-size: 12.5px; line-height: 1.6; }
.privacy-notice dt { font-weight: 800; }
.privacy-notice dd { margin: 0; color: #43524a; overflow-wrap: anywhere; }
.privacy-notice p { margin: 10px 0 0; font-size: 12.5px; }
.privacy-notice a { color: #0b5d34; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* links legais nas telas de login */
.auth-legal { position: fixed; right: 20px; bottom: 14px; z-index: 5; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; padding: 7px 14px; border-radius: 10px; background: rgba(10, 30, 20, .6); font-size: 12px; font-weight: 700; }
.auth-legal a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 900px) {
  .auth-legal { position: static; border-radius: 0; padding: 14px; }
}

@media (max-width: 920px) {
  .ck-banner { flex-direction: column; align-items: stretch; gap: 14px; }
  .ck-banner .ck-actions { max-width: none; }
}

@media (max-width: 640px) {
  .ck-banner { left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); padding: 16px; }
  .ck-banner p { font-size: 12.5px; line-height: 1.5; }
  .ck-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .ck-actions .ck-btn { padding: 10px 8px; }
  .ck-banner .ck-btn-ghost, .ck-form .ck-btn-ghost, .ck-status { grid-column: 1 / -1; }
  .ck-form .ck-btn-ghost { order: 3; }
  .ck-dialog { padding: 18px; }
  .ck-inline { padding: 16px; }
  .privacy-notice dl { grid-template-columns: 1fr; gap: 2px; }
  .privacy-notice dd { margin-bottom: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .ck-switch, .ck-switch::after { transition: none; }
}
