/* ================================================================
   POLYGLOTS — onboarding.css
   Sistema de onboarding: tooltip sequencial + modal de boas-vindas
   Zero dependências. Funciona com o styles.css existente.
   ================================================================ */

/* ── Overlay de foco (escurece o resto da tela) ── */
.pg-onboard-overlay {
  position: fixed;
  inset: 0;
  z-index: 8000;
  pointer-events: none; /* o overlay em si não captura cliques */
  transition: opacity 0.3s ease;
}

/* Buraco transparente recortado via clip-path — criado via JS */
.pg-onboard-spotlight {
  position: fixed;
  z-index: 8001;
  border-radius: 10px;
  box-shadow:
    0 0 0 4px rgba(74, 144, 226, 0.5),
    0 0 0 9999px rgba(0, 0, 0, 0.55);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

/* ── Tooltip flutuante ── */
.pg-tooltip {
  position: fixed;
  z-index: 8100;
  width: min(320px, calc(100vw - 32px));
  background: #ffffff;
  border-radius: 14px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.18),
    0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 0;
  overflow: hidden;
  animation: pg-tooltip-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

@keyframes pg-tooltip-in {
  from { opacity: 0; transform: scale(0.88) translateY(8px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}

/* Seta do tooltip */
.pg-tooltip::before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  background: #ffffff;
  transform: rotate(45deg);
  z-index: -1;
  transition: all 0.35s ease;
}

.pg-tooltip[data-arrow="top"]::before {
  top: -7px;
  left: 28px;
  box-shadow: -2px -2px 4px rgba(0,0,0,0.06);
}

.pg-tooltip[data-arrow="bottom"]::before {
  bottom: -7px;
  left: 28px;
  box-shadow: 2px 2px 4px rgba(0,0,0,0.06);
}

.pg-tooltip[data-arrow="left"]::before {
  left: -7px;
  top: 20px;
  box-shadow: -2px 2px 4px rgba(0,0,0,0.06);
}

/* Barra colorida no topo do tooltip */
.pg-tooltip-bar {
  height: 4px;
  background: linear-gradient(90deg, #4a90e2, #67b26f);
  width: 100%;
}

.pg-tooltip-body {
  padding: 16px 18px 14px;
}

.pg-tooltip-step {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.pg-tooltip-step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4a90e2, #67b26f);
  color: white;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pg-tooltip-step-label {
  font-size: 11px;
  font-weight: 600;
  color: #718096;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.pg-tooltip-title {
  font-size: 15px;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 6px;
  line-height: 1.3;
}

.pg-tooltip-text {
  font-size: 13px;
  color: #4a5568;
  line-height: 1.55;
  margin-bottom: 14px;
}

.pg-tooltip-emoji {
  font-size: 32px;
  line-height: 1;
  margin-bottom: 10px;
  display: block;
}

/* Footer do tooltip: dots + botões */
.pg-tooltip-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px 14px;
  border-top: 1px solid #f0f0f0;
}

.pg-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.pg-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e2e8f0;
  transition: background 0.2s ease, width 0.2s ease;
}

.pg-dot.active {
  background: #4a90e2;
  width: 18px;
  border-radius: 4px;
}

.pg-tooltip-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.pg-btn-skip {
  background: none;
  border: none;
  font-size: 12px;
  color: #a0aec0;
  cursor: pointer;
  padding: 6px 4px;
  min-height: auto;
  font-family: inherit;
  transition: color 0.15s;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pg-btn-skip:hover {
  color: #718096;
  background: none;
}

.pg-btn-next {
  background: linear-gradient(135deg, #4a90e2, #357abd);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  cursor: pointer;
  min-height: auto;
  font-family: inherit;
  transition: opacity 0.15s, transform 0.1s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.pg-btn-next:hover {
  opacity: 0.9;
  background: linear-gradient(135deg, #4a90e2, #357abd);
}

.pg-btn-next:active {
  transform: scale(0.96);
}

/* ── Modal de boas-vindas (primeiro acesso) ── */
.pg-welcome-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: pg-fade-in 0.25s ease both;
}

@keyframes pg-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.pg-welcome-modal {
  width: min(420px, 100%);
  background: #ffffff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.2),
    0 4px 16px rgba(0, 0, 0, 0.1);
  animation: pg-modal-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes pg-modal-in {
  from { opacity: 0; transform: scale(0.85) translateY(24px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}

.pg-welcome-hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  padding: 36px 28px 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Estrelas decorativas no hero */
.pg-welcome-hero::before {
  content: '✦ ✧ ✦ ✧ ✦';
  position: absolute;
  top: 14px;
  left: 0; right: 0;
  text-align: center;
  font-size: 10px;
  color: rgba(255,255,255,0.2);
  letter-spacing: 16px;
}

.pg-welcome-logo {
  font-size: 48px;
  line-height: 1;
  margin-bottom: 12px;
  display: block;
  animation: pg-pulse 2s ease-in-out infinite;
}

@keyframes pg-pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.06); }
}

.pg-welcome-hero h2 {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.pg-welcome-hero p {
  font-size: 14px;
  color: rgba(255,255,255,0.65);
  line-height: 1.5;
  margin: 0;
}

.pg-welcome-content {
  padding: 24px 28px;
}

.pg-welcome-content h3 {
  font-size: 15px;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 16px;
}

.pg-steps-preview {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.pg-step-preview {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e8edf3;
  transition: border-color 0.15s;
}

.pg-step-preview:hover {
  border-color: #4a90e2;
}

.pg-step-icon {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
}

.pg-step-info strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 2px;
}

.pg-step-info span {
  font-size: 12px;
  color: #718096;
  line-height: 1.4;
}

.pg-welcome-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pg-btn-start {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #4a90e2, #357abd);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s, transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pg-btn-start:hover {
  opacity: 0.92;
}

.pg-btn-start:active {
  transform: scale(0.98);
}

.pg-btn-dismiss {
  width: 100%;
  padding: 10px;
  background: transparent;
  color: #a0aec0;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s;
}

.pg-btn-dismiss:hover {
  color: #718096;
  background: transparent;
}

/* ── Indicador persistente no campo URL ── */
.pg-url-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #ebf8ff, #e6f3ff);
  border: 1.5px dashed #4a90e2;
  border-radius: 8px;
  margin-top: 6px;
  font-size: 12px;
  color: #2b6cb0;
  font-weight: 500;
  animation: pg-hint-pulse 2s ease-in-out infinite;
}

@keyframes pg-hint-pulse {
  0%, 100% { border-color: #4a90e2; background: #ebf8ff; }
  50%       { border-color: #67b26f; background: #f0fff4; }
}

.pg-url-hint::before {
  content: '💡';
  font-size: 14px;
}

/* ── Badge "Novo" no botão Local Videos ── */
.pg-new-badge {
  display: inline-block;
  background: #e53e3e;
  color: white;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 99px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  vertical-align: super;
  margin-left: 3px;
  animation: pg-badge-bounce 1s ease-in-out 3;
}

@keyframes pg-badge-bounce {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.2); }
}

/* ── Highlight pulsante no elemento destacado ── */
.pg-highlight {
  position: relative;
  z-index: 8050;
  border-radius: 8px;
  outline: 2px solid rgba(74, 144, 226, 0.6);
  outline-offset: 3px;
  animation: pg-highlight-pulse 1.4s ease-in-out infinite;
}

@keyframes pg-highlight-pulse {
  0%, 100% { outline-color: rgba(74, 144, 226, 0.6); }
  50%       { outline-color: rgba(103, 178, 111, 0.9); }
}

/* Responsivo */
@media (max-width: 480px) {
  .pg-welcome-hero {
    padding: 28px 20px 22px;
  }
  .pg-welcome-content {
    padding: 20px;
  }
  .pg-tooltip {
    width: calc(100vw - 24px);
  }
}
