:root {
  --bs-body-font-family: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --bs-border-radius: 0.6rem;
  --bs-border-radius-sm: 0.45rem;
  --bs-border-radius-lg: 0.85rem;

  /* warm, calm blue — friendly rather than corporate */
  --bs-primary: #2f6690;
  --bs-primary-rgb: 47, 102, 144;
  --bs-link-color: #2f6690;
  --bs-link-color-rgb: 47, 102, 144;
  --bs-link-hover-color: #1f4a68;
  --bs-link-hover-color-rgb: 31, 74, 104;
}

[data-bs-theme="dark"] {
  --bs-primary: #7fb2d1;
  --bs-primary-rgb: 127, 178, 209;
  --bs-link-color: #7fb2d1;
  --bs-link-color-rgb: 127, 178, 209;
  --bs-link-hover-color: #a3c9e0;
  --bs-link-hover-color-rgb: 163, 201, 224;
}

.navbar-brand {
  font-weight: 800;
  letter-spacing: -0.01em;
}

.card {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

main.overlay-mode {
  outline: 3px solid var(--bs-danger);
  outline-offset: -3px;
}

.overlay-controls form {
  margin-right: 0.25rem;
}

/* theme toggle icon swap: only one of the two is shown, based on the
   active data-bs-theme set on <html> by the inline script in base.html */
.theme-toggle {
  border: none;
  background: transparent;
  color: var(--bs-navbar-color);
}

[data-bs-theme="dark"] .theme-icon-to-dark {
  display: none;
}

[data-bs-theme="light"] .theme-icon-to-light {
  display: none;
}

/* rich text editor (Quill) — themed to match the surrounding form, including dark mode */
.rich-editor {
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  overflow: hidden;
}

.rich-toolbar.ql-toolbar.ql-snow {
  border: none;
  border-bottom: 1px solid var(--bs-border-color);
  background: var(--bs-tertiary-bg);
}

.rich-content.ql-container.ql-snow {
  border: none;
  min-height: 120px;
  font-family: var(--bs-body-font-family);
  font-size: 1rem;
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
}

.ql-snow .ql-stroke {
  stroke: var(--bs-body-color);
}

.ql-snow .ql-fill {
  fill: var(--bs-body-color);
}

.ql-snow.ql-toolbar button:hover .ql-stroke,
.ql-snow.ql-toolbar button.ql-active .ql-stroke {
  stroke: var(--bs-primary);
}

.rich-emoji-toggle {
  border: none;
  background: transparent;
  font-size: 1rem;
  line-height: 1;
  padding: 3px 5px;
}

.rich-emoji-panel {
  position: absolute;
  z-index: 20;
  top: 100%;
  left: 0;
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-sm);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 0.4rem;
}

.rich-emoji-grid {
  display: grid;
  grid-template-columns: repeat(6, 1.8rem);
  gap: 0.15rem;
}

.rich-emoji-item {
  border: none;
  background: transparent;
  font-size: 1.1rem;
  border-radius: 0.3rem;
  cursor: pointer;
}

.rich-emoji-item:hover {
  background: var(--bs-tertiary-bg);
}

/* read-only rendering of sanitized rich-text content (posts, diary, events, profile) */
.rich-content-view p:last-child {
  margin-bottom: 0;
}

/* discussion thread: one visual indent level for replies, kept compact */
.post-reply {
  margin-left: 2rem;
  border-left: 3px solid var(--bs-border-color);
}

.post-reply-ref {
  border-left: 2px solid var(--bs-border-color);
  padding-left: 0.5rem;
}

.post-actions form {
  margin: 0;
}

/* more compact discussion feed — tighter than the default .card padding */
.post-card .card-body {
  padding: 0.5rem 0.75rem;
}

.post-card .rich-content-view {
  font-size: 0.95rem;
}

/* color-coded section cards on the group page — a quick visual "filing
   system" so Fotogalerie/Deníček/Hodnocení/Události/Komerční don't all
   blend into the same button color */
.section-card {
  border-top: 3px solid transparent;
  color: var(--bs-body-color);
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.section-card:hover {
  transform: translateY(-2px);
  color: var(--bs-body-color);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.section-card-gallery { border-top-color: #d9922f; }
.section-card-gallery i { color: #d9922f; }

.section-card-diary { border-top-color: #3f8f82; }
.section-card-diary i { color: #3f8f82; }

.section-card-grading { border-top-color: #4a8b5c; }
.section-card-grading i { color: #4a8b5c; }

.section-card-events { border-top-color: #7952b3; }
.section-card-events i { color: #7952b3; }

.section-card-commerce { border-top-color: #b3524a; }
.section-card-commerce i { color: #b3524a; }

.section-icon-discussions {
  color: var(--bs-primary);
}

.section-icon-commerce {
  color: #b3524a;
}

.section-list-discussions.list-group-item-action {
  border-left: 3px solid var(--bs-primary);
}
