/* Korin Cookies — banner de consentimento (canto inferior esquerdo) */
.kc-root {
  --kc-primary: #123526;
  --kc-primary-hover: #1d4d38;
  --kc-text: #34464c;
  --kc-muted: #6b7a7f;
  --kc-bg: #ffffff;
  --kc-line: #e6eaeb;
  --kc-radius: 14px;
  --kc-ease-out: cubic-bezier(.22, 1, .36, 1);
  --kc-ease-in: cubic-bezier(.55, 0, .75, .3);
  --kc-spring: cubic-bezier(.34, 1.56, .64, 1);
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--kc-text);
}

.kc-root *,
.kc-root *::before,
.kc-root *::after { box-sizing: border-box; }

.kc-root [hidden] { display: none !important; }

/* ---- Cartão ---- */
.kc-card {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 2147483000;
  width: 320px;
  max-width: calc(100vw - 32px);
  background: var(--kc-bg);
  border-radius: var(--kc-radius);
  box-shadow: 0 10px 34px rgba(18, 53, 38, .18), 0 1px 3px rgba(0, 0, 0, .08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform-origin: bottom left;
  transition: width .35s var(--kc-ease-out);
  animation: kc-card-in .5s var(--kc-ease-out) backwards;
}

.kc-card.kc-prefs { width: 380px; max-height: calc(100vh - 48px); }
.kc-card.kc-leaving { animation: kc-card-out .3s var(--kc-ease-in) both; pointer-events: none; }

@keyframes kc-card-in {
  from { opacity: 0; transform: translateY(24px) scale(.94); }
  to { opacity: 1; transform: none; }
}

@keyframes kc-card-out {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateY(16px) scale(.96); }
}

/* Conteúdo entra em sequência ao abrir ou trocar de tela */
.kc-body > *, .kc-actions { animation: kc-fade-up .4s var(--kc-ease-out) backwards; }
.kc-body > :nth-child(1) { animation-delay: .08s; }
.kc-body > :nth-child(2) { animation-delay: .13s; }
.kc-body > :nth-child(3) { animation-delay: .18s; }
.kc-body > :nth-child(4) { animation-delay: .23s; }
.kc-body > :nth-child(n+5) { animation-delay: .28s; }
.kc-actions { animation-delay: .2s; }

@keyframes kc-fade-up {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.kc-body { padding: 16px 18px 12px; }
.kc-scroll { overflow-y: auto; flex: 1 1 auto; }

.kc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.kc-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--kc-primary);
  outline: none;
}

.kc-icon { width: 20px; height: 20px; flex: none; color: #c98a3a; }
.kc-icon svg, .kc-fab svg { width: 100%; height: 100%; display: block; }
.kc-icon svg { animation: kc-wiggle 1.2s .45s var(--kc-ease-out) backwards; transform-origin: 50% 50%; }

@keyframes kc-wiggle {
  0% { transform: rotate(0); }
  20% { transform: rotate(-16deg); }
  40% { transform: rotate(12deg); }
  60% { transform: rotate(-6deg); }
  80%, 100% { transform: rotate(0); }
}

.kc-text { margin: 0 0 6px; }

.kc-links { margin: 0; font-size: 11.5px; }
.kc-links a {
  color: var(--kc-primary);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(18, 53, 38, .35);
  text-underline-offset: 2px;
  transition: text-decoration-color .2s;
}
.kc-links a:hover { text-decoration-color: currentColor; }

/* ---- Botões ---- */
.kc-actions {
  display: flex;
  border-top: 1px solid var(--kc-line);
  flex: none;
}

.kc-btn {
  flex: 1 1 0;
  min-height: 40px;
  padding: 8px 6px;
  border: 0;
  border-left: 1px solid var(--kc-line);
  background: var(--kc-bg);
  color: var(--kc-text);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .2s, color .2s, box-shadow .2s;
}

.kc-btn:first-child { border-left: 0; }
.kc-btn:hover { background: #f1f5f3; color: var(--kc-primary); }
.kc-btn:active { box-shadow: inset 0 2px 6px rgba(0, 0, 0, .08); }
.kc-btn.kc-primary { background: var(--kc-primary); color: #fff; border-left-color: var(--kc-primary); }
.kc-btn.kc-primary:hover { background: var(--kc-primary-hover); }
.kc-btn.kc-primary:active { box-shadow: inset 0 2px 8px rgba(0, 0, 0, .3); }

.kc-root button:focus-visible,
.kc-root a:focus-visible,
.kc-switch input:focus-visible + span {
  outline: 2px solid #f08a24;
  outline-offset: -2px;
}

/* ---- Preferências ---- */
.kc-cat { padding: 10px 0; border-top: 1px solid var(--kc-line); }
.kc-cat:first-of-type { border-top: 0; padding-top: 2px; }
.kc-cat p { margin: 4px 0 3px; color: var(--kc-muted); font-size: 11.5px; }

.kc-cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--kc-primary);
}

.kc-always { font-size: 11px; font-weight: 600; color: var(--kc-muted); }

.kc-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--kc-primary);
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}
.kc-more::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform .3s var(--kc-ease-out), margin .3s var(--kc-ease-out);
}
.kc-more[aria-expanded="true"]::after { transform: rotate(-135deg); margin-top: 3px; }

/* Expansão suave da tabela de cookies */
.kc-details {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .35s var(--kc-ease-out);
}
.kc-details > div {
  min-height: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s, visibility 0s .35s;
}
.kc-details.kc-open { grid-template-rows: 1fr; }
.kc-details.kc-open > div { overflow-x: auto; opacity: 1; visibility: visible; transition: opacity .3s .05s, visibility 0s; }

.kc-table { width: 100%; margin-top: 6px; border-collapse: collapse; font-size: 11px; }
.kc-table th { text-align: left; font-weight: 600; color: var(--kc-muted); }
.kc-table th, .kc-table td { padding: 4px 6px 4px 0; border-bottom: 1px solid var(--kc-line); vertical-align: top; }
.kc-table code { font-size: 10.5px; color: var(--kc-text); background: #f3f6f5; padding: 1px 4px; border-radius: 4px; white-space: nowrap; }

/* Interruptor */
.kc-switch { position: relative; display: inline-block; width: 34px; height: 19px; flex: none; cursor: pointer; }
.kc-switch input { position: absolute; z-index: 1; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.kc-switch span {
  position: absolute;
  inset: 0;
  border-radius: 19px;
  background: #c4cdd0;
  transition: background-color .3s var(--kc-ease-out), box-shadow .3s;
  pointer-events: none;
}
.kc-switch span::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 15px;
  height: 15px;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transition: transform .35s var(--kc-spring), width .2s var(--kc-ease-out);
}
.kc-switch:hover span { box-shadow: 0 0 0 4px rgba(18, 53, 38, .08); }
.kc-switch input:checked + span { background: var(--kc-primary); }
.kc-switch input:checked + span::after { transform: translateX(15px); }
/* "Estica" a bolinha enquanto o botão está pressionado */
.kc-switch input:active + span::after { width: 19px; }
.kc-switch input:checked:active + span::after { transform: translateX(11px); }

/* ---- Botão flutuante (reabre as preferências) ---- */
.kc-fab {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 2147483000;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 0;
  border-radius: 50%;
  background: var(--kc-primary);
  color: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .9), 0 4px 14px rgba(18, 53, 38, .3);
  cursor: pointer;
  opacity: .88;
  transition: opacity .2s, transform .3s var(--kc-spring), box-shadow .2s;
  animation: kc-fab-in .5s .2s var(--kc-spring) backwards;
}

.kc-fab:hover { opacity: 1; transform: scale(1.08) rotate(-12deg); box-shadow: 0 0 0 2px #fff, 0 6px 18px rgba(18, 53, 38, .35); }
.kc-fab:active { transform: scale(.94); }
.kc-fab.kc-leaving { animation: kc-fab-out .2s var(--kc-ease-in) both; pointer-events: none; }

@keyframes kc-fab-in {
  from { opacity: 0; transform: scale(.3) rotate(-90deg); }
  to { opacity: .88; transform: none; }
}

@keyframes kc-fab-out {
  to { opacity: 0; transform: scale(.4); }
}

@media (max-width: 480px) {
  .kc-card, .kc-card.kc-prefs { left: 12px; right: 12px; bottom: 12px; width: auto; max-width: none; }
  .kc-fab { left: 12px; bottom: 12px; width: 40px; height: 40px; padding: 9px; }
}

/* Com "reduzir movimento" ligado no sistema (ex.: Windows com "Efeitos de animação" desativado):
   sem deslizar, girar ou balançar; ficam os esmaecimentos e as transições pequenas
   dos interruptores e da lista de cookies. */
@media (prefers-reduced-motion: reduce) {
  .kc-card { animation: kc-fade .35s ease-out backwards; transition: none; }
  .kc-card.kc-leaving { animation: kc-fade-out .25s ease-in both; }
  .kc-body > *, .kc-actions { animation-name: kc-fade; }
  .kc-fab { animation: kc-fade .35s .15s ease-out backwards; }
  .kc-fab.kc-leaving { animation: kc-fade-out .2s ease-in both; }
  .kc-fab:hover { transform: none; }
  .kc-icon svg { animation: none; }
  .kc-switch span::after { transition-timing-function: ease-out; }
}

@keyframes kc-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes kc-fade-out { to { opacity: 0; } }
