/* ══════════════════════════════════════════════════════
   HEADER UX — NOVO MENU DO USUÁRIO
   Adicionar ao final do analise.css
══════════════════════════════════════════════════════ */

/* Área do usuário */
.user-menu-wrapper {
  position: relative;
}

.user-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f4f7f4;
  border: 1.5px solid #e2ebe2;
  border-radius: 999px;
  padding: 6px 14px 6px 6px;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
  user-select: none;
}

.user-trigger:hover,
.user-trigger:focus-visible {
  background: #eaf2ea;
  border-color: #c5dbc5;
  outline: none;
}

/* Avatar com inicial do nome */
.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #163300 0%, #2d5a27 100%);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.5px;
}

.user-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.2;
}

.user-nome {
  font-size: 0.82rem;
  font-weight: 700;
  color: #1a1a1a;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Créditos com ícone */
.user-creditos {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #2d5a27;
}

.user-creditos-num {
  font-weight: 800;
}

/* Seta do dropdown */
.user-chevron {
  width: 14px;
  height: 14px;
  color: #64748b;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.user-menu-wrapper.aberto .user-chevron {
  transform: rotate(180deg);
}

/* Dropdown */
.user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  z-index: 200;
  animation: dropdownIn 0.18s ease-out;
}

@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.user-menu-wrapper.aberto .user-dropdown {
  display: block;
}

/* Cabeçalho do dropdown */
.dropdown-header {
  padding: 14px 16px 12px;
  border-bottom: 1px solid #f1f5f1;
}

.dropdown-header-nome {
  font-size: 0.88rem;
  font-weight: 800;
  color: #1a1a1a;
}

.dropdown-header-creditos {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: #2d5a27;
  font-weight: 600;
  margin-top: 4px;
}

/* Badge do plano */
.plano-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  margin-top: 6px;
  letter-spacing: 0.3px;
}

.plano-badge.free    { background: #f1f5f9; color: #64748b; }
.plano-badge.basico  { background: #eff6ff; color: #1d4ed8; }
.plano-badge.premium {
  background: linear-gradient(90deg, #163300, #2d5a27);
  color: #ffffff;
}

/* Itens do dropdown */
.dropdown-items {
  padding: 6px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: none;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.dropdown-item:hover {
  background: #f4f7f4;
}

.dropdown-item.danger {
  color: #b91c1c;
}

.dropdown-item.danger:hover {
  background: #fef2f2;
}

.dropdown-item-icon {
  font-size: 1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.dropdown-divider {
  height: 1px;
  background: #f1f5f1;
  margin: 4px 6px;
}

/* Esconde os botões antigos do header */
.nav-actions-legacy {
  display: none !important;
}

/* ══════════════════════════════════════
   MEDIA SLOT (unificado com photo-slot)
══════════════════════════════════════ */
.media-slot {
  aspect-ratio: 1 / 1;
  background: #f1f5f9;
  border: 2px dashed #cbd5e1;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.media-slot:hover {
  border-color: var(--primary);
  background: #f0fdf4;
}

.media-slot.empty .plus {
  font-size: 1.5rem;
  color: #94a3b8;
  line-height: 1;
}

.media-slot.empty small {
  font-size: 0.62rem;
  color: #94a3b8;
  font-weight: 600;
  margin-top: 4px;
}

.media-slot img,
.media-slot video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.55rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  text-transform: uppercase;
}

/* ══════════════════════════════════════
   MODAL DE MÍDIA
══════════════════════════════════════ */
.modal-sm {
  max-width: 360px;
}

.modal-title {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 4px;
  color: var(--secondary);
}

.modal-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.media-option-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.media-option-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
  text-align: left;
  width: 100%;
}

.media-option-btn:hover {
  border-color: var(--primary);
  background: #f0fdf4;
}

.media-option-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.media-option-btn strong {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--secondary);
  display: block;
}

.media-option-btn small {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: block;
  margin-top: 1px;
}

.premium-option {
  border-color: #ddd6fe;
  background: #faf5ff;
}

.premium-option:hover {
  border-color: #7c3aed;
  background: #f5f3ff;
}

.premium-badge {
  font-size: 0.55rem;
  font-weight: 800;
  background: #7c3aed;
  color: #fff;
  padding: 2px 6px;
  border-radius: 6px;
  margin-left: 4px;
  vertical-align: middle;
  text-transform: uppercase;
}

/* ══════════════════════════════════════
   MODAL DE VÍDEO
══════════════════════════════════════ */
.modal-video {
  max-width: 480px;
}

.video-status-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.video-status-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--text-muted);
}

.video-status-pill.timer {
  background: #fef2f2;
  color: var(--danger);
  font-variant-numeric: tabular-nums;
}

.video-preview-shell {
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  margin-bottom: 14px;
  position: relative;
}

.video-preview-shell video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hidden-preview {
  display: none;
}

.video-actions-row {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.hidden-actions {
  display: none !important;
}

.video-action-btn {
  flex: 1;
  padding: 12px;
  font-size: 0.8rem;
  border-radius: 14px;
}

.video-main-btn {
  flex: 2;
  font-size: 0.85rem;
}

.danger-solid {
  background: var(--danger) !important;
  color: white !important;
  border-color: var(--danger) !important;
}

/* ══════════════════════════════════════
   MEDIA HELPER
══════════════════════════════════════ */
.media-header-block {
  margin-bottom: 14px;
}

.media-helper-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 4px;
}

/* ══════════════════════════════════════
   TOP USER BOX (compatibilidade)
══════════════════════════════════════ */
.top-user-box {
  display: none; /* substituído pelo user-menu-wrapper */
}

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 480px) {
  .user-info {
    display: none;
  }

  .user-trigger {
    padding: 5px;
  }

  .user-dropdown {
    right: -10px;
    min-width: 200px;
  }
}