/* ==================== AUTH BAR ==================== */
.auth-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sp-3);
  padding: var(--sp-2) 0;
}

.auth-user {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.auth-avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: var(--text-sm);
  flex-shrink: 0;
}

.auth-name {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text);
}

.auth-btn {
  font-size: var(--text-xs) !important;
  padding: 6px 16px !important;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  max-width: 400px;
  margin: 0 auto;
}

.auth-error {
  color: #ef4444;
  font-size: var(--text-sm);
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-sm);
}

.auth-switch {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.auth-switch a {
  color: var(--accent);
  font-weight: 600;
}

.auth-switch a:hover {
  text-decoration: underline;
}

.auth-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--accent);
}

.auth-role-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--gradient);
  color: white;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.auth-divider-inline {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.auth-google-btn {
  display: flex;
  justify-content: center;
}

.auth-or-divider {
  text-align: center;
  position: relative;
  margin: var(--sp-3) 0;
}

.auth-or-divider::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--border);
}

.auth-or-divider span {
  position: relative;
  background: var(--bg-soft);
  padding: 0 var(--sp-4);
  color: var(--text-muted);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ==================== COMMENTS ==================== */
.comments-section {
  margin-top: var(--sp-8);
  border-top: 1px solid var(--border);
  padding-top: var(--sp-6);
}

.comments-title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--sp-5);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--text);
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
}

.comments-empty {
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-style: italic;
}

.comment-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-4);
}

.comment-header {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-2);
}

.comment-avatar-placeholder {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: var(--text-xs);
  flex-shrink: 0;
}

.comment-author {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
}

.comment-time {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-left: auto;
}

.comment-delete {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
  display: flex;
  align-items: center;
}

.comment-delete:hover {
  color: #ef4444;
}

.comment-text {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.6;
}

.comment-compose {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.comment-input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text);
  font-size: var(--text-sm);
  resize: vertical;
  font-family: var(--font-sans);
  transition: border-color var(--transition-fast);
}

.comment-input::placeholder {
  color: var(--text-muted);
}

.comment-input:focus {
  border-color: var(--accent);
  outline: none;
}

.comment-submit {
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}

.comment-signin-prompt {
  color: var(--text-muted);
  font-size: var(--text-sm);
  text-align: center;
  padding: var(--sp-4);
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border);
}

/* ==================== EDITOR SECTIONS ==================== */
.editor-section {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  backdrop-filter: blur(var(--blur));
  padding: var(--sp-8);
  margin-bottom: var(--sp-10);
  display: none;
}

.editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}

.editor-title {
  font-size: var(--text-xl);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  color: var(--text);
}

.editor-toggle {
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.editor-toggle.open {
  transform: rotate(180deg);
}

.editor-body {
  margin-top: var(--sp-6);
}

.editor-body.collapsed {
  display: none;
}

.editor-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

.editor-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-5);
}

.editor-form textarea {
  min-height: 150px;
}

/* ==================== COMMUNITY CONTENT DIVIDER ==================== */
.community-divider {
  text-align: center;
  margin: var(--sp-12) 0 var(--sp-8);
  position: relative;
}

.community-divider::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--border);
}

.community-divider span {
  position: relative;
  background: var(--bg);
  padding: 0 var(--sp-6);
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ==================== BLOG CARD ACTIONS ==================== */
.blog-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}

.blog-author-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  color: var(--accent);
  font-weight: 500;
}

.course-author-tag {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  color: var(--accent);
  font-weight: 500;
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border);
}

/* ==================== DANGER BUTTON ==================== */
.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.5);
}

/* ==================== MODAL COMMENTS ==================== */
.modal-comments {
  margin-top: var(--sp-6);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  .editor-form .form-row {
    grid-template-columns: 1fr;
  }

  .auth-bar {
    justify-content: center;
    flex-wrap: wrap;
  }

  .editor-section {
    padding: var(--sp-5);
  }
}

@media (max-width: 480px) {
  .blog-card-actions {
    flex-direction: column;
    align-items: flex-start;
  }
}
