/* User-created guides — editor, viewer, listings */

.tg-guides-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.tg-guides-section-title {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--hub-accent);
  margin: 2rem 0 0.75rem;
}

.tg-guide-editor {
  max-width: 720px;
}

.tg-guide-editor .tg-field span {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--hub-text-muted);
  margin-bottom: 0.375rem;
}

.tg-guide-editor input[type="text"],
.tg-guide-editor textarea,
.tg-guide-editor select {
  width: 100%;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--hub-text);
  background: var(--hub-surface);
  border: 1px solid var(--hub-border);
  border-radius: 8px;
  resize: vertical;
}

.tg-guide-editor input[type="text"]:focus,
.tg-guide-editor textarea:focus,
.tg-guide-editor select:focus {
  outline: none;
  border-color: rgba(233, 187, 115, 0.45);
}

.tg-guide-editor .tg-field { margin-bottom: 1.125rem; }

.tg-guide-section-card {
  margin-bottom: 1rem;
  padding: 1.125rem;
  background: var(--hub-card);
  border: 1px solid var(--hub-border);
  border-radius: 10px;
}

.tg-guide-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.tg-guide-section-head h3 {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--hub-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tg-guide-section-remove {
  border: none;
  background: transparent;
  color: var(--hub-text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.tg-guide-section-remove:hover {
  color: #e07070;
  background: rgba(224, 112, 112, 0.1);
}

.tg-guide-images {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.tg-guide-image-item {
  position: relative;
  width: 140px;
}

.tg-guide-image-item img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--hub-border);
  display: block;
}

.tg-guide-image-item input {
  width: 100%;
  margin-top: 0.375rem;
  padding: 0.375rem 0.5rem;
  font-size: 0.6875rem;
  background: var(--hub-surface);
  border: 1px solid var(--hub-border);
  border-radius: 6px;
  color: var(--hub-text);
}

.tg-guide-image-remove {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  width: 1.375rem;
  height: 1.375rem;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 0.875rem;
  line-height: 1;
  cursor: pointer;
}

.tg-guide-image-upload {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--hub-accent);
  background: var(--hub-accent-dim, rgba(233, 187, 115, 0.08));
  border: 1px dashed rgba(233, 187, 115, 0.35);
  border-radius: 8px;
  cursor: pointer;
}

.tg-guide-image-upload input { display: none; }

.tg-guide-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--hub-border);
}

.tg-guide-status-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--hub-text-muted);
}

.tg-guide-status-badge--pending { background: rgba(233, 187, 115, 0.15); color: var(--hub-accent); }
.tg-guide-status-badge--published { background: rgba(96, 180, 120, 0.15); color: #7ecf96; }
.tg-guide-status-badge--mod { background: rgba(96, 160, 220, 0.15); color: #7eb8e0; }
.tg-guide-status-badge--rejected { background: rgba(224, 112, 112, 0.15); color: #e07070; }

.tg-guide-view-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--hub-border);
}

.tg-guide-view-meta {
  font-size: 0.8125rem;
  color: var(--hub-text-muted);
  margin-top: 0.5rem;
}

.tg-guide-view-meta strong { color: var(--hub-text); }

.tg-guide-view-section {
  margin-bottom: 2rem;
}

.tg-guide-view-section h2 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.tg-guide-view-section p {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--hub-text);
  margin-bottom: 0.75rem;
  white-space: pre-wrap;
}

.tg-guide-view-figure {
  margin: 1rem 0;
}

.tg-guide-view-figure img {
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid var(--hub-border);
}

.tg-guide-view-figure figcaption {
  margin-top: 0.375rem;
  font-size: 0.75rem;
  color: var(--hub-text-muted);
  font-style: italic;
}

.tg-guide-page-item--community .tg-guide-author {
  font-size: 0.6875rem;
  color: var(--hub-accent);
  margin-top: 0.25rem;
}

.tg-guide-admin-preview {
  margin: 0.75rem 0;
  padding: 0.75rem;
  background: var(--hub-surface);
  border-radius: 8px;
  border: 1px solid var(--hub-border);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.tg-guide-admin-preview img {
  max-width: 120px;
  max-height: 80px;
  object-fit: cover;
  border-radius: 6px;
  margin: 0.375rem 0.375rem 0 0;
  vertical-align: middle;
}

.tg-guide-reject-note {
  margin-top: 0.75rem;
  padding: 0.625rem 0.75rem;
  background: rgba(224, 112, 112, 0.1);
  border: 1px solid rgba(224, 112, 112, 0.25);
  border-radius: 8px;
  font-size: 0.8125rem;
  color: #e07070;
}

.tg-guide-notice {
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--hub-text-muted);
  background: var(--hub-surface);
  border: 1px solid var(--hub-border);
  border-radius: 8px;
}

@media (max-width: 640px) {
  .tg-guides-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .tg-guides-toolbar .btn { width: 100%; }

  .tg-guide-section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .tg-guide-editor-actions {
    flex-direction: column;
  }

  .tg-guide-editor-actions .btn { width: 100%; }

  .tg-guide-image-item { width: 100%; max-width: 200px; }
}
