/* ===== Layout geral da página de emojis ===== */

/* sobrescreve o alinhamento padrão das ferramentas só aqui */
/* só dentro da página de emojis */
.emoji-page .content {
  padding: 100px 10px 50px;
  text-align: left;
}

/* layout: sidebar à esquerda + conteúdo à direita */
.emoji-layout {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

/* ===== Sidebar (sticky, respeita rodapé) ===== */

.emoji-sidebar {
  position: sticky;
  top: 90px;  /* logo abaixo do header de 80px das tools */
  align-self: flex-start;
  width: 220px;
  padding: 10px 12px;
  background-color: #f7f7f7;
  border-right: 1px solid #ddd;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  z-index: 1;
}

/* coluna principal */
.emoji-main {
  flex: 1;
  padding: 0 10px 50px; /* sem padding-top extra */
  text-align: left;
}

/* ===== Caixa de copiados ===== */

.copied-box {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 8px 10px;
  background-color: #fafafa;
}

.copied-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.copied-header h3 {
  font-size: 13px;
  margin: 0;
}

#btn-copiar-tudo {
  padding: 3px 6px;
  font-size: 11px;
  border-radius: 4px;
  border: 1px solid #ccc;
  background-color: #fff;
  cursor: pointer;
}

#btn-copiar-tudo:hover {
  border-color: #ff9900;
}

.copied-list {
  padding: 4px 6px;
  border-radius: 4px;
  background-color: #fff;
  border: 1px solid #ccc;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 20px;
}

.copied-placeholder {
  color: #999;
  font-size: 12px;
}

.copied-tag {
  border-radius: 10px;
  border: 1px solid #ddd;
  padding: 1px 6px;
  font-size: 12px;
  background-color: #f5f5f5;
  white-space: nowrap;
}

/* ===== Menu compacto 5x2 ===== */

.emoji-menu-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.emoji-menu-grid .menu-categoria {
  border: 1px solid #ccc;
  background-color: #fff;
  border-radius: 4px;
  font-size: 20px;
  padding: 4px 0;
  cursor: pointer;
}

.emoji-menu-grid .menu-categoria:hover {
  border-color: #ff9900;
}

/* Link extra */
.sidebar-extra-link {
  margin-top: 6px;
  font-size: 12px;
  color: #007bff;
  text-decoration: none;
}

.sidebar-extra-link:hover {
  text-decoration: underline;
}

/* ===== Conteúdo de emojis ===== */

.emojis-section h1 {
  margin-bottom: 8px;
}

.emojis-section h2 {
  margin-top: 18px;
  margin-bottom: 6px;
}

.emojis-section p {
  margin-bottom: 10px;
}

/* Grid dos emojis (desktop/tablet) */
.emoji-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 18px;
}

.emoji-item {
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 4px 6px;
  background-color: #fff;
  cursor: pointer;
  font-size: 22px;
  min-width: 40px;
  text-align: center;
  flex: 0 0 auto;
}
/* --- Tooltip global para emojis (robusto) --- */
.emoji-item { position: relative; } /* já existente, reforce */

.emoji-tooltip {
  position: fixed;
  pointer-events: none;
  z-index: 99999;
  background: #111;
  color: #fff;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 13px;
  white-space: nowrap;
  transform: translate(-50%, -8px);
  opacity: 0;
  transition: opacity .12s ease, transform .12s ease;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}

/* seta visível */
.emoji-tooltip.show {
  opacity: 1;
  transform: translate(-50%, -12px);
}

/* pequeno triângulo */
.emoji-tooltip::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: #111 transparent transparent transparent;
}

/* destaque visual ao copiar */
.emoji-item.copiado {
  animation: copiedFlash .6s ease;
}
@keyframes copiedFlash {
  0% { transform: scale(1); box-shadow: none; }
  40% { transform: scale(1.06); box-shadow: 0 10px 24px rgba(255,153,0,0.18); }
  100% { transform: scale(1); box-shadow: none; }
}

.emoji-item:hover {
  border-color: #ff9900;
}

/* ===== Toast "Copiado!" ===== */

.toast-copiado {
  position: fixed;
  top: 90px;  /* logo abaixo do header fixo das tools */
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: #333;
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s;
  z-index: 9999;
}

.toast-copiado.ativo {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== Responsivo (mobile) ===== */

@media (max-width: 768px) {
  .emoji-layout {
    display: block;
  }

  .emoji-sidebar {
    display: none; /* mobile sem sidebar nem caixa fixa */
  }

  .emoji-main {
    padding: 20px 10px 50px;
  }

  .emoji-grid {
    justify-content: flex-start;
  }

  .emoji-item {
    flex: 0 0 16.6%;  /* ~6 emojis por linha em mobile */
    text-align: center;
  }
}
