/* Page Comments Widget */

.comment-anchor {
  cursor: pointer;
  margin-left: 8px;
  position: relative;
  display: inline-block;
}
.comment-anchor .comment-icon {
  color: #999;
  font-size: 0.85em;
}
.comment-anchor:hover .comment-icon {
  color: #337ab7;
}
.comment-anchor .comment-count {
  font-size: 0.7em;
  color: white;
  background: #337ab7;
  border-radius: 50%;
  padding: 1px 5px;
  margin-left: 2px;
  display: none;
}
.comment-anchor .comment-count.has-comments {
  display: inline;
}

/* Floating button for pages without section anchors */
#page-comment-fab {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #337ab7;
  color: white;
  border: none;
  font-size: 1.4em;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  z-index: 9998;
  display: none;
}
#page-comment-fab:hover {
  background: #286090;
}
#page-comment-fab .fab-count {
  position: absolute;
  top: -4px;
  right: -4px;
  font-size: 0.55em;
  background: crimson;
  border-radius: 50%;
  padding: 2px 6px;
  display: none;
}
#page-comment-fab .fab-count.has-comments {
  display: inline;
}

/* Comment panel */
#page-comment-panel {
  display: none;
  position: fixed;
  bottom: 0;
  right: 0;
  width: 420px;
  height: 50%;
  background: #f9f9f9;
  border-left: 2px solid #ccc;
  border-top: 2px solid #ccc;
  box-shadow: -3px -3px 12px rgba(0,0,0,0.15);
  border-radius: 8px 0 0 0;
  z-index: 9999;
  overflow-y: auto;
  padding: 15px;
  font-size: 0.9em;
}
#page-comment-panel.open {
  display: block;
}
#page-comment-panel .panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ccc;
  padding-bottom: 10px;
  margin-bottom: 10px;
}
#page-comment-panel .panel-header h3 {
  margin: 0;
  font-size: 1.1em;
}
#page-comment-panel .panel-close {
  cursor: pointer;
  font-size: 1.3em;
  color: #999;
  border: none;
  background: none;
}
#page-comment-panel .panel-close:hover {
  color: #333;
}

/* Individual comment */
.pc-comment {
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 10px;
  margin-bottom: 10px;
}
.pc-comment.resolved {
  opacity: 0.55;
}
.pc-comment .pc-meta {
  font-size: 0.8em;
  color: #888;
  margin-bottom: 5px;
}
.pc-comment .pc-meta .pc-name {
  font-weight: bold;
  color: #555;
}
.pc-comment .pc-meta .pc-edited {
  color: darkorange;
  font-style: italic;
}
.pc-comment .pc-body {
  margin-bottom: 5px;
  white-space: pre-wrap;
}
.pc-comment .pc-original {
  font-size: 0.8em;
  color: #999;
  font-style: italic;
  margin-bottom: 5px;
  display: none;
}
.pc-comment .pc-manager-note {
  background: #eef6ff;
  border-left: 3px solid #337ab7;
  padding: 5px 8px;
  margin-top: 5px;
  font-size: 0.9em;
}
.pc-comment .pc-manager-note .pc-mgr-name {
  font-weight: bold;
  color: #337ab7;
}
.pc-comment .pc-actions {
  margin-top: 5px;
  font-size: 0.8em;
}
.pc-comment .pc-actions a {
  color: #337ab7;
  cursor: pointer;
  margin-right: 10px;
}
.pc-comment .pc-actions a:hover {
  text-decoration: underline;
}

/* New comment form */
.pc-new-comment {
  margin-top: 10px;
  border-top: 1px solid #ddd;
  padding-top: 10px;
}
.pc-new-comment textarea {
  width: 100%;
  height: 60px;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 6px;
  font-size: 0.95em;
  resize: vertical;
  box-sizing: border-box;
}
.pc-new-comment button {
  margin-top: 5px;
  padding: 5px 15px;
  background: #337ab7;
  color: white;
  border: none;
  border-radius: 3px;
  cursor: pointer;
}
.pc-new-comment button:hover {
  background: #286090;
}

/* Section label in panel */
.pc-section-label {
  font-size: 0.8em;
  color: #888;
  margin-bottom: 3px;
}
