/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

.collab-container {
  display: flex;
  gap: 1rem;
  height: calc(100vh - 200px);
  min-height: 400px;
}

.collab-editor-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.collab-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.collab-editor-wrapper {
  position: relative;
  flex: 1;
  overflow: hidden;
}

.collab-textarea {
  width: 100%;
  height: 100%;
  font-family: "SFMono-Regular", "Menlo", "Monaco", "Consolas", "Liberation Mono", monospace;
  font-size: 14px;
  line-height: 1.5;
  padding: 12px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  resize: none;
  tab-size: 2;
  box-sizing: border-box;
}

.collab-textarea:focus {
  outline: none;
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.collab-cursor-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  overflow: hidden;
}

.collab-remote-cursor {
  position: absolute;
  width: 2px;
  transition: top 0.1s ease, left 0.1s ease;
  z-index: 10;
}

.collab-remote-cursor-label {
  position: absolute;
  top: -18px;
  left: 0;
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
  padding: 2px 4px;
  border-radius: 2px;
  color: #fff;
  font-family: sans-serif;
}

.collab-sidebar {
  width: 220px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.collab-users-panel {
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 0.75rem;
}

.collab-users-panel h6 {
  margin-bottom: 0.5rem;
  color: #6c757d;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.collab-user-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0;
  font-size: 0.85rem;
}

.collab-user-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.collab-user-info {
  overflow: hidden;
}

.collab-user-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.collab-user-cursor-pos {
  font-size: 0.7rem;
  color: #6c757d;
  font-family: monospace;
}

.collab-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #6c757d;
}

.collab-save-status {
  transition: opacity 0.3s;
}

.collab-log-panel {
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 0.75rem;
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.collab-log-panel h6 {
  margin-bottom: 0.5rem;
  color: #6c757d;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.collab-log-entries {
  flex: 1;
  overflow-y: auto;
  font-size: 0.75rem;
  font-family: monospace;
  color: #6c757d;
}

.collab-log-entry {
  padding: 1px 0;
  border-bottom: 1px solid #f0f0f0;
}