/*
Theme Name: Docly Child
Theme URI: https://coletivotranscentrado.com.br/
Description: Child theme do Docly para o Coletivo Transcentrado. Gate de consentimento na primeira visita (CC BY-NC-SA + aviso medico). Nao modifica arquivos do tema-pai.
Author: Coletivo Transcentrado
Template: docly
Version: 4.0.0
Requires PHP: 7.4
Text Domain: docly-child
*/

/* ==========================================================================
   CORRECAO — Bug de box-shadow no hover "lg" do tema-pai
   ========================================================================== */
.h\:bs-lg:hover {
  box-shadow: var(--bs_lg) !important;
}

/* ==========================================================================
   GATE DE CONSENTIMENTO (primeira visita)
   ========================================================================== */

/* Visitante que ja consentiu: o gate nunca aparece (script anti-flash no head) */
html.tc-consent-done #tc-gate {
  display: none !important;
}

/* Overlay cobrindo a tela inteira */
#tc-gate {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #eef1f5;
  overflow-y: auto;
  opacity: 1;
  transition: opacity 0.6s ease;
}

#tc-gate.tc-fade-out {
  opacity: 0;
  pointer-events: none;
}

.tc-gate-inner {
  position: relative;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 200px 20px 60px;
  box-sizing: border-box;
}

/* ---- Logo girando no topo central ---- */
.tc-logo-wrap {
  position: absolute;
  top: 6%;
  left: 50%;
  transform: translateX(-50%);
  transition: top 0.8s ease, transform 0.8s ease, opacity 0.6s ease;
}

.tc-logo-disc {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  perspective: 800px;
}

.tc-logo-spin {
  width: 66%;
  height: auto;
  display: block;
  transform-style: preserve-3d;
  backface-visibility: visible;
  animation: tcSpinY 6s linear infinite;
}

@keyframes tcSpinY {
  from { transform: rotateY(0deg); }
  to   { transform: rotateY(360deg); }
}

/* Estado: logo desce ao centro */
#tc-gate.tc-logo-center .tc-logo-wrap {
  top: 50%;
  transform: translate(-50%, -50%);
}

/* ---- Corpo (barra + passos) ---- */
.tc-body {
  width: 100%;
  max-width: 640px;
  transition: opacity 0.4s ease;
}

#tc-gate.tc-verified .tc-body {
  opacity: 0;
  pointer-events: none;
}

/* Texto de boas-vindas (acima da barra) */
.tc-welcome {
  margin: 0 auto 26px;
  max-width: 540px;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--secondary_color, #1d2746);
}

/* Barra de progresso central */
.tc-progress {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}

.tc-bar-track {
  width: 320px;
  max-width: 80%;
  height: 10px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.tc-bar-fill {
  height: 100%;
  width: 0;
  background: #5bcefa;
  border-radius: 999px;
  transition: width 0.5s ease;
}

/* ---- Passos ---- */
.tc-steps {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.tc-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  cursor: pointer;
}

.tc-step input[type="checkbox"] {
  margin-top: 3px;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  accent-color: #5bcefa;
  cursor: pointer;
}

.tc-step-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--secondary_color, #1d2746);
}

.tc-step-text a {
  color: #f5a9b8;
  font-weight: 600;
  text-decoration: underline;
}

.tc-cc-img {
  display: block;
  height: 30px;
  width: auto;
  margin: 12px auto 0;
}

/* Bloco do captcha */
.tc-step-captcha {
  justify-content: center;
  cursor: default;
}

#tc-recaptcha {
  display: flex;
  justify-content: center;
}

.tc-config-warn {
  margin: 0;
  font-size: 13px;
  color: #b00020;
  text-align: center;
}

.tc-status {
  margin: 6px 0 0;
  min-height: 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--secondary_color, #1d2746);
  text-align: center;
}

.tc-error {
  margin: 4px auto 0;
  max-width: 520px;
  min-height: 18px;
  font-size: 13px;
  line-height: 1.5;
  color: #b00020;
  text-align: center;
}

/* ---- Responsivo ---- */
@media (max-width: 600px) {
  .tc-gate-inner { padding-top: 170px; }
  .tc-logo-disc { width: 104px; height: 104px; }
  .tc-step-text { font-size: 13px; }
}

/* Acessibilidade: reduzir movimento */
@media (prefers-reduced-motion: reduce) {
  .tc-logo-spin { animation: none; }
  .tc-logo-wrap,
  #tc-gate,
  .tc-body { transition: none; }
}
