/* Tiptap Editor Styles */

.trip-description-editor {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 0;
  margin-bottom: 1rem;
}

/* Toolbar */
.tiptap-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  padding: 6px 8px;
  border-bottom: 1px solid #ddd;
  background: #f8f9fa;
  border-radius: 4px 4px 0 0;
}

.tiptap-toolbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 3px;
  background: none;
  cursor: pointer;
  color: #555;
  font-size: 14px;
}

.tiptap-toolbar-btn:hover {
  background: #e9ecef;
  border-color: #ccc;
}

.tiptap-toolbar-btn.active {
  background: #d0d5db;
  border-color: #bbb;
  color: #000;
}

.tiptap-toolbar-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.tiptap-toolbar-divider {
  display: inline-block;
  width: 1px;
  height: 24px;
  background: #ddd;
  margin: 0 4px;
}

/* Editor Content Area */
.tiptap-editor-content {
  padding: 12px 16px;
  min-height: 120px;
}

.tiptap-editor-content .tiptap {
  outline: none;
  min-height: 100px;
}

.tiptap-editor-content .tiptap p.is-editor-empty:first-child::before {
  content: attr(data-placeholder);
  float: left;
  color: #adb5bd;
  pointer-events: none;
  height: 0;
}

/* Editor content typography */
.tiptap-editor-content .tiptap h1,
.tiptap-editor-content .tiptap h2,
.tiptap-editor-content .tiptap h3 {
  margin-top: 0.75em;
  margin-bottom: 0.5em;
}

.tiptap-editor-content .tiptap h2 {
  font-size: 1.5em;
}

.tiptap-editor-content .tiptap h3 {
  font-size: 1.25em;
}

.tiptap-editor-content .tiptap ul,
.tiptap-editor-content .tiptap ol {
  padding-left: 1.5em;
}

.tiptap-editor-content .tiptap blockquote {
  border-left: 3px solid #ddd;
  padding-left: 1em;
  margin-left: 0;
  color: #666;
}

.tiptap-editor-content .tiptap img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.tiptap-editor-content .tiptap a {
  color: #0d6efd;
  text-decoration: underline;
}

.tiptap-editor-content .tiptap pre {
  background: #f4f4f4;
  padding: 0.75em 1em;
  border-radius: 4px;
  overflow-x: auto;
}

.tiptap-editor-content .tiptap code {
  background: #f4f4f4;
  padding: 0.15em 0.3em;
  border-radius: 3px;
  font-size: 0.9em;
}

.tiptap-editor-content .tiptap pre code {
  background: none;
  padding: 0;
}

/* Actions bar */
.tiptap-editor-actions {
  padding: 8px 12px;
  border-top: 1px solid #eee;
}

/* View mode description content (inherits page styles) */
.trip-description-viewer img {
  max-width: 100%;
  height: auto;
}

/* ===================== */
/* Emoji Reaction Styles */
/* ===================== */

.reaction-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  background: #f8f9fa;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.4;
  color: #555;
  transition: background 0.15s, border-color 0.15s;
}

.reaction-pill:hover {
  background: #e9ecef;
  border-color: #ccc;
}

.reaction-pill-active {
  background: #e8f4ff;
  border-color: #90c8f8;
  color: #0066cc;
}

.reaction-pill-active:hover {
  background: #d0e8ff;
}

.reaction-pill:disabled {
  cursor: default;
  opacity: 0.7;
}

.reaction-pill-add {
  background: none;
  border: 1px dashed #ccc;
  color: #999;
  font-size: 14px;
  padding: 2px 8px;
}

.reaction-pill-add:hover {
  background: #f0f0f0;
  border-color: #aaa;
  color: #666;
}

.reaction-picker-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: none;
  cursor: pointer;
  font-size: 18px;
  transition: background 0.15s;
}

.reaction-picker-btn:hover {
  background: #e9ecef;
}

/* ======================== */
/* Comment Editor + Mention */
/* ======================== */

.comment-editor {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 10px 12px;
  min-height: 100px;
  max-height: 300px;
  overflow-y: auto;
}

.comment-editor .comment-editor-tiptap {
  outline: none;
  min-height: 80px;
}

.comment-editor .comment-editor-tiptap p {
  margin: 0 0 0.4em 0;
}

.comment-editor .comment-editor-tiptap p:last-child {
  margin-bottom: 0;
}

.comment-editor .comment-editor-tiptap p.is-editor-empty:first-child::before {
  content: attr(data-placeholder);
  float: left;
  color: #adb5bd;
  pointer-events: none;
  height: 0;
}

.comment-mention {
  background: #e8f4ff;
  color: #0066cc;
  border-radius: 3px;
  padding: 1px 4px;
  font-weight: 500;
}

.comment-body-html p {
  margin: 0 0 0.4em 0;
}

.comment-body-html p:last-child {
  margin-bottom: 0;
}

.mention-suggestion-list {
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  overflow: hidden;
  max-width: 280px;
}

.mention-suggestion-item {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 14px;
}

.mention-suggestion-item:hover,
.mention-suggestion-item.selected {
  background: #f0f6ff;
}

/* ========================= */
/* Entity Reference Styles   */
/* ========================= */

.entity-ref {
  background: #f0f7ee;
  color: #2d6a30;
  border-radius: 3px;
  padding: 1px 4px;
  font-weight: 500;
  text-decoration: none;
}

.entity-ref:hover {
  background: #e0eedd;
  text-decoration: underline;
}

/* =================== */
/* Poll Styles         */
/* =================== */

.poll-display {
  margin: 8px 0;
  padding: 10px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: #fafbfc;
}

.poll-question {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 8px;
}

.poll-options {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.poll-option-row {
  width: 100%;
}

.poll-option-btn {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  font-size: 13px;
  text-align: left;
  overflow: hidden;
  transition: border-color 0.15s;
}

.poll-option-btn:hover {
  border-color: #bbb;
}

.poll-option-voted {
  border-color: #90c8f8;
  background: #f0f8ff;
}

.poll-option-static {
  cursor: default;
}

.poll-option-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: #e8f0fe;
  border-radius: 3px;
  transition: width 0.3s ease;
  z-index: 0;
}

.poll-option-voted .poll-option-bar {
  background: #c8e0ff;
}

.poll-option-text {
  position: relative;
  z-index: 1;
  flex: 1;
}

.poll-option-pct {
  position: relative;
  z-index: 1;
  font-weight: 600;
  margin-left: 8px;
  color: #555;
  font-size: 12px;
}

.poll-footer {
  margin-top: 6px;
  font-size: 12px;
  color: #888;
}

/* =================== */
/* Poll Creator Styles */
/* =================== */

.poll-creator {
  margin: 8px 0;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fafbfc;
}

/* =================== */
/* Pinned Comment      */
/* =================== */

.pinned-comments-section {
  margin-bottom: 16px;
  padding: 10px 12px;
  background: #fffde7;
  border: 1px solid #f0e68c;
  border-radius: 6px;
}

/* ========================== */
/* Login / Permission Prompts */
/* ========================== */

.trip-login-prompt {
  font-size: 13px;
  color: #666;
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 10px 14px;
}

.trip-login-prompt a {
  color: #0066cc;
  font-weight: 500;
  text-decoration: none;
}

.trip-login-prompt a:hover {
  text-decoration: underline;
}

/* Comment action links (Reply, Edit, Pin, Delete) */
.comment-actions a {
  color: #666;
  text-decoration: none;
}
.comment-actions a:hover {
  color: #333;
  text-decoration: underline;
}
