.video-flutuante-reabrir {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9998;
  background: var(--cor-primaria);
  color: #fff;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
}

#video-floating-container.floating {
  position: fixed;
  width: 300px;
  height: 170px;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}

/* transição aplicada só em momentos pontuais (snap nos cantos e expandir),
   nunca durante o arraste/resize livre, para não ficar travado */
#video-floating-container.animar {
  transition: top 0.25s ease, left 0.25s ease, width 0.25s ease, height 0.25s ease;
}

/* ancorado no documento: rola junto com a página */
#video-floating-container.ancorado {
  box-shadow: 0 0 0 2px var(--cor-primaria), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.video-handle {
  height: 28px;
  line-height: 28px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 12px;
  padding: 0 8px;
  user-select: none;
  cursor: move;
  display: flex;
  align-items: center;
  gap: 6px;
}

.video-handle-arraste {
  white-space: nowrap;
}

.video-handle-aulas {
  display: flex;
  gap: 3px;
}

.video-handle-aulas button {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  border-radius: 3px;
  width: 18px;
  height: 18px;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}

.video-handle-aulas button.ativo {
  background: var(--cor-primaria);
}

#video-floating-anchor-btn,
#video-floating-resize-btn,
#video-floating-close-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  padding: 0 2px;
}

#video-floating-anchor-btn {
  margin-left: auto;
}

#video-floating-container iframe {
  display: block;
  width: 100%;
  height: calc(100% - 28px);
  border: 0;
}

.video-resizer {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 20px;
  height: 20px;
  cursor: nwse-resize;
  z-index: 3;
  background: linear-gradient(135deg, transparent 45%, rgba(255, 255, 255, 0.55) 45%, rgba(255, 255, 255, 0.55) 60%, transparent 60%, transparent 70%, rgba(255, 255, 255, 0.55) 70%, rgba(255, 255, 255, 0.55) 85%, transparent 85%);
}
