/* Feedback Overlay Styles */

/* Sin zoom del navegador: permite scroll (pan) pero no pellizco ni doble-tap */
html { touch-action: pan-x pan-y; }

/* Aislamiento: el overlay es UI propia, NO debe heredar color/tipografía del
   mockup (algunos tienen tema oscuro o fuentes display que rompen los campos).
   Fijamos una base segura en los contenedores; los hijos heredan de aquí. */
.fb-modal-content,
.fb-popup,
.fb-notice {
  color: #1f2937;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Botón flotante */
/* Cluster flotante: + siempre visible, herramientas al hover/focus */
.fb-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

/* Al arrastrar el botón a la mitad superior/izquierda, reorientar el cluster
   para que la toolbar quede dentro de pantalla. */
.fb-fab.fb-fab--top { flex-direction: column-reverse; }
.fb-fab.fb-fab--left { align-items: flex-start; }

/* Mientras se arrastra: sin toolbar, sin lag y cursor de agarre. */
.fb-fab.dragging { cursor: grabbing; }
.fb-fab.dragging .fb-tools { display: none !important; }
.fb-fab.dragging .fb-button { transition: none; }

.fb-button {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #000;
  color: white;
  border: none;
  font-size: 32px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  touch-action: none; /* táctil: permite arrastrar el botón sin hacer scroll */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Centrado óptico del glifo "+"/"×": el alto de línea del símbolo lo deja
     ligeramente bajo respecto al círculo */
  padding-bottom: 2px;
  box-sizing: border-box;
}

/* Animación de atención la primera vez */
.fb-button.attention {
  animation: fbPulse 1.6s ease-out 3;
}

@keyframes fbPulse {
  0% {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 0 rgba(0, 0, 0, 0.5);
  }
  70% {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 18px rgba(0, 0, 0, 0);
  }
  100% {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 0 rgba(0, 0, 0, 0);
  }
}

/* Aviso de feedback para el cliente */
.fb-notice {
  position: fixed;
  bottom: 160px;
  right: 24px;
  width: 300px;
  max-width: calc(100vw - 48px);
  background: #000;
  color: #fff;
  padding: 20px;
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  z-index: 9997;
  transform-origin: bottom right;
  animation: fbNoticeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.fb-notice::after {
  content: "";
  position: absolute;
  bottom: -7px;
  right: 28px;
  width: 16px;
  height: 16px;
  background: #000;
  border-radius: 3px;
  transform: rotate(45deg);
}

.fb-notice-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  margin-bottom: 12px;
}

.fb-notice-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.fb-notice-text {
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 1.55;
  color: #c7cbd1;
}

.fb-notice-text strong {
  color: #fff;
  font-weight: 600;
}

.fb-notice-close {
  width: 100%;
  padding: 10px 12px;
  background: #fff;
  border: none;
  border-radius: 10px;
  color: #000;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.12s ease;
}

.fb-notice-close:hover {
  background: #e5e7eb;
}

.fb-notice-close:active {
  transform: scale(0.97);
}

@keyframes fbNoticeIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.fb-button:hover {
  background: #1f2937;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  transform: scale(1.1);
}

.fb-button.active {
  background: #fff;
  color: #000;
  border: 2px solid #000;
}

.fb-button:focus {
  outline: 2px solid #000;
  outline-offset: 2px;
}

/* Barra de herramientas (Lista | Ver-ocultar) — pill segmentado, desplegable */
.fb-tools {
  display: inline-flex;
  align-items: stretch;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  /* Oculto por defecto; se revela al pasar por el cluster */
  opacity: 0;
  transform: translateY(10px) scale(0.96);
  transform-origin: bottom right;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.fb-fab:hover .fb-tools,
.fb-fab:focus-within .fb-tools {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.fb-tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  padding: 0 15px;
  border: none;
  background: transparent;
  color: #111;
  font: 600 13px/1 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}
.fb-tool:hover { background: #f1f3f5; }
.fb-tool:focus-visible { outline: 2px solid #111; outline-offset: -2px; }
.fb-tool.active { background: #111; color: #fff; }
.fb-tool-sep { width: 1px; background: #e5e7eb; align-self: stretch; margin: 9px 0; }
.fb-tool-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: #111; color: #fff; font-size: 11px; font-weight: 700;
}
.fb-tool.active .fb-tool-count { background: #fff; color: #111; }

/* Ocultar pins */
.fb-pins-hidden .fb-pin { display: none !important; }

/* Toast efímero */
.fb-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  z-index: 10003;
  background: #111;
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  font: 500 14px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: calc(100vw - 32px);
}
.fb-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.fb-toast.error { background: #b91c1c; }

/* Estado resuelto (lectura) en el popup */
.fb-popup-status {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  background: #f3f4f6;
  border-radius: 8px;
  padding: 4px 10px;
  margin-bottom: 12px;
}

/* Edición inline en el popup */
.fb-edit-textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 92px;
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: #1f2937;
  background: #fff;
  resize: vertical;
}
.fb-edit-textarea:focus { outline: none; border-color: #000; box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1); }
.fb-popup-edit, .fb-popup-cancel-edit {
  flex: 1; padding: 10px 12px; background: #f3f4f6; border: none; border-radius: 8px;
  color: #1f2937; font-weight: 600; font-size: 14px; cursor: pointer; transition: background 0.2s ease;
}
.fb-popup-edit:hover, .fb-popup-cancel-edit:hover { background: #e5e7eb; }
.fb-popup-save-edit {
  flex: 1; padding: 10px 12px; background: #000; border: none; border-radius: 8px;
  color: #fff; font-weight: 600; font-size: 14px; cursor: pointer; transition: background 0.2s ease;
}
.fb-popup-save-edit:hover { background: #1f2937; }
.fb-popup-save-edit:disabled { opacity: 0.5; cursor: default; }

/* Panel "mis comentarios" */
.fb-mine-panel {
  position: fixed;
  bottom: 156px;
  right: 24px;
  z-index: 10001;
  width: 320px;
  max-width: calc(100vw - 32px);
  max-height: 60vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  animation: fbNoticeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.fb-mine-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid #eef0f3; font-size: 14px;
}
.fb-mine-close { background: none; border: none; font-size: 22px; line-height: 1; color: #6b7280; cursor: pointer; }
.fb-mine-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 8px; }
.fb-mine-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 10px; border: none; background: none; border-radius: 10px; cursor: pointer;
  font: 400 13.5px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1f2937;
}
.fb-mine-item:hover { background: #f5f7fa; }
.fb-mine-num {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%; background: #111; color: #fff; font-size: 11px; font-weight: 700;
}
.fb-mine-num.done { background: #9ca3af; }
.fb-mine-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-mine-tag { flex: none; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #2563eb; background: #eff6ff; border-radius: 6px; padding: 2px 6px; }
.fb-mine-state { flex: none; font-size: 10.5px; font-weight: 600; border-radius: 6px; padding: 2px 7px; }
.fb-mine-state.pending { color: #92400e; background: #fef3c7; }
.fb-mine-state.done { color: #15803d; background: #dcfce7; }
.fb-mine-empty { padding: 18px 14px; margin: 0; color: #6b7280; font-size: 13.5px; }

/* ===== Categorías (selector en el modal) ===== */
.fb-cat-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 20px 14px; }
.fb-cat-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 11px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid #e5e7eb; background: #fff; color: #374151;
  font: 600 12.5px/1 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.fb-cat-chip:hover { border-color: var(--cat); }
.fb-cat-chip.selected { border-color: var(--cat); background: var(--cat); color: #fff; }

/* Categoría en el popup */
.fb-popup-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.fb-popup-cat {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; color: #fff; background: var(--cat, #111);
  border-radius: 8px; padding: 4px 10px;
}
.fb-popup-vp {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; color: #374151; background: #f3f4f6;
  border-radius: 8px; padding: 4px 10px;
}

/* ===== Hilo de respuestas ===== */
.fb-thread { margin: 4px 0 12px; display: flex; flex-direction: column; gap: 8px; }
.fb-reply { background: #f9fafb; border: 1px solid #f1f3f5; border-radius: 10px; padding: 10px 12px; }
.fb-reply.team { background: #eff6ff; border-color: #dbeafe; }
.fb-reply-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.fb-reply-author { font-size: 12.5px; font-weight: 700; color: #1f2937; }
.fb-reply.team .fb-reply-author { color: #1e40af; }
.fb-reply-date { font-size: 11px; color: #9ca3af; }
.fb-reply-text { margin: 0; font-size: 13.5px; line-height: 1.45; color: #374151; white-space: pre-wrap; word-break: break-word; }

.fb-reply-box { display: flex; gap: 8px; align-items: flex-end; margin-bottom: 14px; }
.fb-reply-input {
  flex: 1; box-sizing: border-box; min-height: 40px; max-height: 120px; resize: vertical;
  padding: 9px 11px; border: 1px solid #e5e7eb; border-radius: 8px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 13.5px; color: #1f2937; background: #fff;
}
.fb-reply-input:focus { outline: none; border-color: #000; box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1); }
.fb-reply-send {
  flex: none; padding: 9px 14px; border: none; border-radius: 8px; background: #000; color: #fff;
  font-weight: 600; font-size: 13px; cursor: pointer; transition: background 0.2s ease;
}
.fb-reply-send:hover { background: #1f2937; }
.fb-reply-send:disabled { opacity: 0.5; cursor: default; }

/* Resaltado del bloque señalado en modo comentario */
.fb-hover-box {
  position: absolute;
  z-index: 9990;
  pointer-events: none;
  border: 2px solid #2563eb;
  background: rgba(37, 99, 235, 0.1);
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5);
  display: none;
  transition: left 0.08s ease, top 0.08s ease, width 0.08s ease, height 0.08s ease;
}

.fb-hover-label {
  position: absolute;
  top: -24px;
  left: -2px;
  background: #2563eb;
  color: #fff;
  font: 600 11px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Cuando el bloque toca el borde superior, la etiqueta va por dentro */
.fb-hover-box.label-inside .fb-hover-label {
  top: 2px;
  left: 2px;
}

/* Pin numerado — anclado al documento (scrollea con el contenido) */
.fb-pin {
  position: absolute;
  width: 32px;
  height: 32px;
  background: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: white;
  font-size: 12px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  z-index: 9999;
  transform: translate(-50%, -50%);
  cursor: grab;
  touch-action: none;
}

.fb-pin:hover {
  transform: translate(-50%, -50%) scale(1.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.fb-pin.dragging {
  cursor: grabbing;
  transition: none;
  transform: translate(-50%, -50%) scale(1.15);
  z-index: 10001;
}

.fb-pin.existing {
  background: #fff;
  color: #000;
  border: 2px solid #000;
}

.fb-pin.resolved {
  background: #9ca3af;
  color: #fff;
  border: none;
}

/* Pin enfocado vía deep-link desde el admin */
.fb-pin.focus {
  z-index: 10002;
  animation: fbPinFocus 1.4s ease-out 2;
}

@keyframes fbPinFocus {
  0% { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), 0 0 0 0 rgba(37, 99, 235, 0.55); }
  70% { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), 0 0 0 16px rgba(37, 99, 235, 0); }
  100% { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), 0 0 0 0 rgba(37, 99, 235, 0); }
}

/* Modal de comentario */
.fb-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.fb-modal-content {
  background: white;
  border-radius: 12px;
  width: 100%;
  max-width: 560px;
  box-shadow: 0 20px 25px rgba(0, 0, 0, 0.15);
}

.fb-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e5e7eb;
}

.fb-modal-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
}

.fb-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #6b7280;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.fb-modal-close:hover {
  color: #1f2937;
}

.fb-textarea {
  width: calc(100% - 40px);
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: #1f2937;
  background-color: #fff;
  resize: vertical;
  min-height: 100px;
  margin: 20px;
  margin-bottom: 12px;
  box-sizing: border-box;
}

.fb-textarea:focus {
  outline: none;
  border-color: #000;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

/* Adjuntar ficheros en el modal */
.fb-attach-row { margin: 0 20px 14px; }
.fb-attach-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border: 1px dashed #d1d5db; border-radius: 999px;
  background: #fff; color: #374151; font: 600 13px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease;
}
.fb-attach-btn:hover { border-color: #111; background: #f9fafb; }
.fb-attach-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.fb-attach-item {
  position: relative; width: 64px; height: 64px; border-radius: 10px; overflow: hidden;
  background: #f1f3f5; display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.fb-attach-item img { width: 100%; height: 100%; object-fit: cover; }
.fb-attach-item.loading { color: #9ca3af; }
.fb-attach-rm {
  position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%;
  border: none; background: rgba(0,0,0,0.65); color: #fff; font-size: 14px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

/* Adjuntos en el popup */
.fb-atts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.fb-att { position: relative; width: 84px; height: 84px; border-radius: 10px; overflow: hidden; background: #000; display: block; cursor: pointer; }
.fb-att img, .fb-att video { width: 100%; height: 100%; object-fit: cover; display: block; }
.fb-att-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 22px; background: rgba(0,0,0,0.25); pointer-events: none;
}
.fb-att-rm {
  position: absolute; top: 3px; right: 3px; z-index: 1; width: 20px; height: 20px; border-radius: 50%;
  border: none; background: rgba(0, 0, 0, 0.65); color: #fff; font-size: 14px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.fb-att-add {
  width: 84px; height: 84px; border-radius: 10px; border: 1px dashed #d1d5db; background: #fff;
  color: #6b7280; font-size: 26px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.fb-att-add:hover { border-color: #111; background: #f9fafb; }

/* "Comentando como …" en el modal de comentario */
.fb-as {
  margin: 0 20px 16px;
  font-size: 13px;
  color: #6b7280;
}
.fb-as-name { color: #1f2937; }
.fb-as-change {
  margin-left: 6px;
  padding: 0;
  border: none;
  background: none;
  color: #2563eb;
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

/* Ayuda del modal "¿Cómo te llamas?" */
.fb-name-help {
  margin: 0 20px 12px;
  font-size: 13px;
  line-height: 1.5;
  color: #6b7280;
}
.fb-input-error { border-color: #dc2626 !important; box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12) !important; }

.fb-author-input {
  width: calc(100% - 40px);
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: #1f2937;
  background-color: #fff;
  margin: 0 20px 20px;
  box-sizing: border-box;
}

/* Placeholder legible (sin esto hereda el color de texto del mockup) */
.fb-textarea::placeholder,
.fb-author-input::placeholder {
  color: #9ca3af;
  opacity: 1;
}

.fb-author-input:focus {
  outline: none;
  border-color: #000;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.fb-modal-actions {
  display: flex;
  gap: 12px;
  padding: 20px;
  border-top: 1px solid #e5e7eb;
}

.fb-btn-cancel,
.fb-btn-submit {
  flex: 1;
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
}

.fb-btn-cancel {
  background: #f3f4f6;
  color: #1f2937;
}

.fb-btn-cancel:hover {
  background: #e5e7eb;
}

.fb-btn-submit {
  background: #000;
  color: white;
}

.fb-btn-submit:hover {
  background: #1f2937;
}

/* Popup de comentario existente */
.fb-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 25px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  width: calc(100vw - 40px);
  max-width: 560px;
  animation: slideUp 0.2s ease;
}

.fb-popup-content {
  padding: 20px;
}

.fb-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.fb-popup-author {
  font-weight: 600;
  color: #1f2937;
  font-size: 14px;
}

.fb-popup-date {
  color: #9ca3af;
  font-size: 12px;
}

.fb-popup-text {
  color: #374151;
  font-size: 14px;
  line-height: 1.5;
  margin: 12px 0;
  padding: 14px 16px;
  background: #f9fafb;
  border: 1px solid #f3f4f6;
  border-radius: 10px;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Indicador del elemento al que apunta la nota */
.fb-popup-anchor {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 12px;
  padding: 8px 10px;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  font-size: 12.5px;
  color: #1e40af;
}

.fb-popup-anchor.missing {
  background: #fef2f2;
  border-color: #fee2e2;
  color: #b91c1c;
}

.fb-popup-anchor-icon {
  flex: none;
  font-size: 13px;
  line-height: 1;
}

.fb-popup-anchor-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fb-popup-resolve {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: #f3f4f6;
  border: none;
  border-radius: 8px;
  color: #000;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s ease;
}

.fb-popup-resolve:hover {
  background: #e5e7eb;
}

.fb-popup-resolve:disabled {
  opacity: 0.5;
  cursor: default;
}

.fb-popup-actions {
  display: flex;
  gap: 8px;
}

.fb-popup-close {
  flex: 1;
  padding: 10px 12px;
  background: #f3f4f6;
  border: none;
  border-radius: 8px;
  color: #1f2937;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s ease;
}

.fb-popup-close:hover {
  background: #e5e7eb;
}

.fb-popup-delete {
  flex: 1;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #000;
  border-radius: 8px;
  color: #000;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s ease;
}

.fb-popup-delete:hover {
  background: #f3f4f6;
}

.fb-popup-delete:disabled {
  opacity: 0.5;
  cursor: default;
}

/* Animaciones */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translate(-50%, -40%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

/* Responsive */
@media (max-width: 640px) {
  .fb-modal {
    padding: 16px;
  }

  .fb-modal-content {
    max-width: 100%;
  }

  .fb-fab {
    bottom: 16px;
    right: 16px;
  }

  .fb-button {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }

  .fb-pin {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }
}

/* ============================================================
   Botones unificados del overlay — estilo "pill" coherente
   (modal de creación, popup de la nota, respuestas, edición).
   Se define al final para imponer el estilo común sobre las
   reglas previas.
   ============================================================ */
.fb-btn-cancel, .fb-btn-submit,
.fb-popup-resolve, .fb-popup-edit, .fb-popup-delete, .fb-popup-close,
.fb-popup-cancel-edit, .fb-popup-save-edit, .fb-reply-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1 1 auto;
  width: auto;
  margin: 0;
  padding: 10px 16px;
  border: none;
  border-radius: 999px;
  font: 600 13.5px/1 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #f1f3f5;
  color: #1f2937;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s ease, transform 0.1s ease, box-shadow 0.18s ease;
}
.fb-btn-cancel:hover,
.fb-popup-resolve:hover, .fb-popup-edit:hover, .fb-popup-close:hover,
.fb-popup-cancel-edit:hover { background: #e5e7eb; }

.fb-btn-cancel:active, .fb-btn-submit:active,
.fb-popup-resolve:active, .fb-popup-edit:active, .fb-popup-delete:active,
.fb-popup-cancel-edit:active, .fb-popup-save-edit:active, .fb-reply-send:active { transform: translateY(1px); }

.fb-btn-cancel:focus-visible, .fb-btn-submit:focus-visible,
.fb-popup-resolve:focus-visible, .fb-popup-edit:focus-visible, .fb-popup-delete:focus-visible,
.fb-popup-close:focus-visible, .fb-popup-cancel-edit:focus-visible,
.fb-popup-save-edit:focus-visible, .fb-reply-send:focus-visible { outline: 2px solid #111; outline-offset: 2px; }

.fb-popup-resolve:disabled, .fb-popup-delete:disabled,
.fb-popup-save-edit:disabled, .fb-reply-send:disabled { opacity: 0.5; cursor: default; }

/* Variante primaria (oscura): enviar, guardar, responder */
.fb-btn-submit, .fb-popup-save-edit, .fb-reply-send { background: #111; color: #fff; }
.fb-btn-submit:hover, .fb-popup-save-edit:hover, .fb-reply-send:hover { background: #1f2937; }

/* Variante peligro: eliminar */
.fb-popup-delete { background: #fff; color: #dc2626; box-shadow: inset 0 0 0 1px #fecaca; }
.fb-popup-delete:hover { background: #fef2f2; }

/* La caja de respuesta: el botón no se estira */
.fb-reply-send { flex: 0 0 auto; }

/* Barra de acciones del popup: pills en fila, que envuelven si no caben */
.fb-popup-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fb-popup-actions > button { flex: 1 1 auto; min-width: max-content; }
