/*
 * CSC JAZZ — tokens compartilhados (webmail + painel Postal).
 * Fonte: Automacao-rh/DESIGN-SYSTEM.md. Prefixo --csc- para não colidir
 * com o CSS da aplicação hospedeira (Elastic / Postal).
 */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400..800&family=Instrument+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* marca */
  --csc-ink: #060435;
  --csc-blue: #1B0DAE;
  --csc-blue-light: #4B3BE0;
  --csc-blue-dark: #0A0660;
  --csc-blue-50: #EDEBFA;
  --csc-blue-100: #D8D3F5;
  --csc-blue-200: #B5ADEC;

  /* acento — preenche (--csc-acc) × escreve (--csc-acc-ink) */
  --csc-acc: #00D2FF;
  --csc-acc-ink: #0B6C8C;
  --csc-acc-deep: #3A7BD5;
  --csc-acc-50: #E4F8FF;

  /* superfícies */
  --csc-paper: #F4F6FB;
  --csc-paper-2: #FAFBFE;
  --csc-white: #FFFFFF;

  /* neutros slate */
  --csc-gray-50: #F7F8FC;
  --csc-gray-100: #EEF0F7;
  --csc-gray-150: #E5E8F2;
  --csc-gray-200: #DADEEC;
  --csc-gray-300: #BDC3DA;
  --csc-gray-400: #8A92B0;
  --csc-gray-500: #616A89;
  --csc-gray-600: #454D69;
  --csc-gray-700: #323952;
  --csc-gray-900: #151929;
  --csc-gray-950: #0B0E1B;

  /* semânticas */
  --csc-success: #0E7A57; --csc-success-bg: #E3F6EF; --csc-success-border: #A6DFCB;
  --csc-warning: #8A5B0A; --csc-warning-bg: #FBF1DC; --csc-warning-border: #E9D2A2;
  --csc-danger: #C22B44;  --csc-danger-bg: #FCE8EC;  --csc-danger-border: #F2BEC8;

  /* tipografia */
  --csc-display: 'Bricolage Grotesque', 'Instrument Sans', system-ui, sans-serif;
  --csc-sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --csc-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;

  /* sombras tingidas de tinta */
  --csc-shadow-xs: 0 1px 2px rgba(10,6,60,.05);
  --csc-shadow-sm: 0 1px 3px rgba(10,6,60,.06), 0 1px 2px rgba(10,6,60,.04);
  --csc-shadow-md: 0 4px 12px -2px rgba(10,6,60,.09), 0 2px 6px -2px rgba(10,6,60,.06);
  --csc-shadow-lg: 0 16px 40px -8px rgba(10,6,60,.14), 0 6px 14px -6px rgba(10,6,60,.08);
  --csc-shadow-xl: 0 40px 80px -24px rgba(10,6,60,.22), 0 12px 28px -12px rgba(10,6,60,.12);

  /* raios */
  --csc-radius: 14px;
  --csc-radius-lg: 20px;
  --csc-radius-sm: 10px;
  --csc-radius-xs: 8px;

  /* foco — ciano, nunca azul (azul sobre botão azul some) */
  --csc-ring: 0 0 0 3px rgba(0,210,255,.5);

  /* assinatura: três segmentos SÓLIDOS */
  --csc-compasso: linear-gradient(90deg,
    var(--csc-blue-dark) 0 33.34%, var(--csc-blue-light) 33.34% 66.67%, var(--csc-acc) 66.67% 100%);

  /* movimento */
  --csc-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --csc-ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --csc-dur-fast: 160ms;
  --csc-dur: 320ms;
  --csc-dur-slow: 720ms;
  --csc-dur-enter: 900ms;
  --csc-stagger: 70ms;
}

/* ── Keyframes ─────────────────────────────────────────────────────────── */
@keyframes csc-fade-up {
  from { opacity: 0; transform: translate3d(0, 14px, 0); }
  to   { opacity: 1; transform: none; }
}
@keyframes csc-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes csc-draw {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
@keyframes csc-shimmer {
  0%, 62% { transform: translateX(-120%) skewX(-18deg); }
  100%    { transform: translateX(260%) skewX(-18deg); }
}
@keyframes csc-shake {
  0%, 100% { transform: none; }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}

/* ── Utilitários de entrada ───────────────────────────────────────────────
   <el class="csc-enter csc-d2">  →  entra no 3º tempo.
   Classes .csc-d0…d9 em vez de style="" inline: o CSP do Postal pode
   bloquear atributos style. */
.csc-enter {
  animation: csc-fade-up var(--csc-dur-enter) var(--csc-ease) both;
  animation-delay: calc(var(--csc-i, 0) * var(--csc-stagger) + 120ms);
}

.csc-d0 { --csc-i: 0; }
.csc-d1 { --csc-i: 1; }
.csc-d2 { --csc-i: 2; }
.csc-d3 { --csc-i: 3; }
.csc-d4 { --csc-i: 4; }
.csc-d5 { --csc-i: 5; }
.csc-d6 { --csc-i: 6; }
.csc-d7 { --csc-i: 7; }
.csc-d8 { --csc-i: 8; }
.csc-d9 { --csc-i: 9; }

/* O compasso: filete de 3px que se desenha da esquerda para a direita */
.csc-compasso {
  display: block;
  height: 3px;
  border-radius: 2px;
  background: var(--csc-compasso);
  transform-origin: left center;
  animation: csc-draw 1100ms var(--csc-ease) both;
  animation-delay: calc(var(--csc-i, 0) * var(--csc-stagger) + 260ms);
}

/* Brilho único que atravessa o botão primário (aplicar num ::after) */
.csc-shimmer { position: relative; overflow: hidden; isolation: isolate; }
.csc-shimmer::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent);
  transform: translateX(-120%) skewX(-18deg);
  animation: csc-shimmer 5.5s var(--csc-ease-in-out) 1.8s infinite;
  pointer-events: none;
  z-index: -1;
}

.csc-focus:focus-visible,
.csc-focus-within:focus-within {
  outline: none;
  box-shadow: var(--csc-ring);
}

/* ── Movimento reduzido: tudo parado, tudo visível ───────────────────── */
@media (prefers-reduced-motion: reduce) {
  .csc-enter,
  .csc-compasso,
  .csc-shimmer::after {
    animation: none !important;
  }
  .csc-shimmer::after { display: none; }
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}
