/**
 * Guides article — comments & coffee support
 */

body.guides-reading-page .guides-article-layout > .guides-comments,
body.guides-reading-page .guides-article-layout > .guides-coffee {
  box-sizing: border-box;
  width: 85%;
  max-width: 100%;
  margin-inline: auto;
}

body.guides-reading-page .guides-article-layout > .guides-comments {
  margin-top: 2.5rem;
  margin-bottom: 1.75rem;
}

body.guides-reading-page .guides-article-layout > .guides-coffee {
  margin-bottom: 3rem;
}

/* ——— Comments ——— */
.guides-comments {
  padding: 1.75rem 1.85rem 1.5rem;
  border-radius: 1rem;
  background: var(--gt-surface, var(--pillar-surface, #fff));
  border: 1px solid var(--gt-border, rgba(0, 0, 0, 0.1));
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

html[data-theme="dark"] .guides-comments {
  --gt-surface: var(--pillar-surface-elevated, #23262d);
  --gt-border: rgba(255, 255, 255, 0.12);
  --gt-heading: #f3f4f6;
  --gt-muted: #9ca3af;
  --gt-btn-bg: #e5e7eb;
  --gt-btn-fg: #111827;
  --gt-btn-hover: #f3f4f6;
  --gt-surface-muted: #1b1e23;
  --gt-admin-accent: #34d399;
  --gt-admin-bg: rgba(52, 211, 153, 0.1);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

html[data-theme="light"] .guides-comments {
  --gt-admin-accent: #047857;
  --gt-admin-bg: #ecfdf5;
}

.guides-comments__header {
  margin-bottom: 1.35rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gt-border, rgba(0, 0, 0, 0.08));
}

.guides-comments__title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 0.4rem;
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--gt-heading, #333);
}

.guides-comments__title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.5rem;
  background: var(--gt-surface-muted, #f4f5f7);
  color: var(--gt-muted, #666);
  font-size: 1.1rem;
}

.guides-comments__count {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gt-muted, #666);
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: var(--gt-surface-muted, #f4f5f7);
}

.guides-comments__lead {
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.6;
  color: var(--gt-muted, #666);
}

.guides-comments__list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.guides-comments__item {
  padding: 1.1rem 1.2rem;
  border-radius: 0.75rem;
  background: var(--gt-surface-muted, #f8f9fa);
  border: 1px solid var(--gt-border, rgba(0, 0, 0, 0.08));
}

.guides-comments__item-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.guides-comments__avatar {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  font-size: 1rem;
}

.guides-comments__avatar--user {
  background: #e5e7eb;
  color: #4b5563;
}

html[data-theme="dark"] .guides-comments__avatar--user {
  background: #374151;
  color: #d1d5db;
}

.guides-comments__avatar--admin {
  background: var(--gt-admin-bg, #ecfdf5);
  color: var(--gt-admin-accent, #047857);
}

.guides-comments__meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 0.75rem;
}

.guides-comments__author-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
}

.guides-comments__author {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gt-heading, #333);
}

.guides-comments__author--admin {
  color: var(--gt-admin-accent, #047857);
}

.guides-comments__badge {
  display: inline-block;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--gt-admin-bg, #ecfdf5);
  color: var(--gt-admin-accent, #047857);
  border: 1px solid rgba(4, 120, 87, 0.2);
}

html[data-theme="dark"] .guides-comments__badge {
  border-color: rgba(52, 211, 153, 0.35);
}

.guides-comments__date {
  font-size: 1.1rem;
  color: var(--gt-muted, #888);
  white-space: nowrap;
}

.guides-comments__text {
  margin: 0;
  padding-right: 3.15rem;
  font-size: 14px;
  line-height: 1.7;
  color: var(--guides-read-text, var(--gt-heading, #333));
}

.guides-comments__replies {
  margin-top: 0.85rem;
  padding-top: 0.25rem;
}

.guides-comments__reply {
  padding: 0.85rem 1rem;
  border-radius: 0.65rem;
  background: var(--gt-surface, #fff);
  border: 1px solid var(--gt-border, rgba(0, 0, 0, 0.08));
}

.guides-comments__reply--admin {
  border-color: rgba(4, 120, 87, 0.25);
  background: var(--gt-admin-bg, #f0fdf4);
}

html[data-theme="dark"] .guides-comments__reply--admin {
  background: var(--gt-admin-bg, rgba(52, 211, 153, 0.08));
  border-color: rgba(52, 211, 153, 0.25);
}

.guides-comments__reply + .guides-comments__reply {
  margin-top: 0.65rem;
}

.guides-comments__reply .guides-comments__text {
  padding-right: 0;
}

.guides-comments__empty {
  margin: 0 0 1.25rem;
  padding: 1.25rem;
  font-size: 1.3rem;
  color: var(--gt-muted, #888);
  text-align: center;
  border-radius: 0.65rem;
  background: var(--gt-surface-muted, #f8f9fa);
  border: 1px dashed var(--gt-border, rgba(0, 0, 0, 0.12));
}

.guides-comments__form-wrap {
  padding: 1.15rem 1.2rem;
  border-radius: 0.75rem;
  background: var(--gt-surface-muted, #f8f9fa);
  border: 1px solid var(--gt-border, rgba(0, 0, 0, 0.08));
}

.guides-comments__form-title {
  margin: 0 0 0.75rem;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--gt-heading, #333);
}

.guides-comments__label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gt-muted, #666);
}

.guides-comments__textarea {
  width: 100%;
  min-height: 6.5rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--gt-border, #ddd);
  border-radius: 0.55rem;
  font-size: 14px;
  line-height: 1.6;
  font-family: inherit;
  background: var(--gt-surface, #fff);
  color: var(--gt-heading, #333);
  resize: vertical;
  margin-bottom: 0.75rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.guides-comments__textarea:focus {
  outline: none;
  border-color: var(--gt-admin-accent, #047857);
  box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.12);
}

.guides-comments__submit {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1.25rem;
  border: none;
  border-radius: 0.55rem;
  background: var(--gt-btn-bg, #374151);
  color: var(--gt-btn-fg, #fff);
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.guides-comments__submit:hover {
  background: var(--gt-btn-hover, #1f2937);
}

.guides-comments__submit:active {
  transform: scale(0.98);
}

.guides-comments__hint {
  margin: 0.65rem 0 0;
  font-size: 1.25rem;
}

.guides-comments__hint--error {
  color: #b02a37;
}

.guides-comments__hint--ok {
  color: #15803d;
}

.guides-comments__guest a {
  font-weight: 700;
  color: var(--gt-emphasis, #374151);
}

/* ——— Coffee Bede ——— */
.guides-coffee {
  padding: 1.5rem 1.75rem 1.25rem;
  border-radius: 1rem;
  text-align: center;
  background: linear-gradient(145deg, #fffbeb 0%, #fef3c7 55%, #fde68a 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.12);
}

html[data-theme="dark"] .guides-coffee {
  background: linear-gradient(145deg, #292524 0%, #44403c 50%, #57534e 100%);
  border-color: rgba(251, 191, 36, 0.35);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.guides-coffee__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: #92400e;
  letter-spacing: 0.02em;
}

html[data-theme="dark"] .guides-coffee__eyebrow {
  color: #fcd34d;
}

.guides-coffee__title {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  font-weight: 800;
  color: #78350f;
}

html[data-theme="dark"] .guides-coffee__title {
  color: #fef3c7;
}

.guides-coffee__lead {
  margin: 0 0 1.1rem;
  font-size: 1.25rem;
  line-height: 1.6;
  color: #a16207;
  max-width: 32rem;
  margin-inline: auto;
}

html[data-theme="dark"] .guides-coffee__lead {
  color: #fde68a;
}

.guides-coffee__link {
  display: inline-block;
  max-width: 100%;
  border-radius: 0.65rem;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.guides-coffee__link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.guides-coffee__banner {
  display: block;
  max-width: min(100%, 400px);
  height: auto;
  margin-inline: auto;
}

@media (max-width: 768px) {
  body.guides-reading-page .guides-article-layout > .guides-comments,
  body.guides-reading-page .guides-article-layout > .guides-coffee {
    width: 92%;
  }

  .guides-comments {
    padding: 1.25rem 1.1rem;
  }

  .guides-comments__text {
    padding-right: 0;
  }

  .guides-coffee {
    padding: 1.25rem 1rem;
  }
}

/* Admin panel (legacy in same file) */
.guides-admin__comment-body {
  max-width: 28rem;
  font-size: 1.3rem;
  line-height: 1.55;
}

.guides-admin__reply-form textarea {
  min-width: 14rem;
}
