/**
 * Styling for the default SilverStripe Forum. To override these styles include
 * your own CSS file in your PageController.php or Page.ss
 */

.forum__topics {
  width: 100%;
}

.forum__container table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--color-grey);
}



/**
 * Admin features at the bottom of the page
 */
.forum__admin-features {
  border: 1px dashed #e0ded9;
  padding: 12px;
  margin-bottom: 12px;
  font-family: monospace;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.5;
  margin: 32px 0;
  opacity: 0.8;
}

.forum__admin-features .field {
  margin-bottom: 12px;
  width: 100%;
  font-size: 12px;
  line-height: 1.5;
}

.forum__admin-features .field label {
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 4px;
}

.forum__admin-features .forum__admin-features-title {
  font-size: 14px;
  font-weight: bold;
  margin-top: 0;
  margin-bottom: 12px;
  color: var(--color-dark);
}

.forum__delete-thread-link {
  display: inline-block;
  margin-top: 12px;
  padding: 6px 12px;
  font-size: 12px;
  color: #b91c1c;
  border: 1px solid #b91c1c;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
}

.forum__delete-thread-link:hover {
  background-color: #b91c1c;
  color: #fff;
}

.forum__subscribe-link--hidden {
  display: none;
}

/**
 * Post edit and delete links
 */
.forum__post-modifiers {
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: bold;
  color: var(--color-dark);
  position: absolute;
  right: 0;
  top: 0;
  z-index: 1;
  border: 1px solid #f4f4f4;
  box-shadow: 0 1px 8px 0px rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  display: flex;
  gap: 8px;
  padding: 4px 8px;
}

.forum__post-modifiers a {
  text-decoration: none;
}

/**
 * Preview content
 */
.forum__previous-posts {
  margin-bottom: 32px;
  margin-top: 32px;
  padding: 20px;
  border: 1px dashed var(--color-grey, "#d1d2d6");
  border-radius: 12px;
}
.forum__previous-posts .forum__post {
  padding-left: 12px;
}

.forum__previous-posts h2 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 18px;
  line-height: 24px;
  color: var(--color-dark);
}

/**
 * Post list
 */
.forum__posts {
  list-style: none;
  padding: 0;
  margin: 0;
}

.forum__posts li {
  list-style: none;
  margin-bottom: 12px;
}

.forum__features tbody tr:nth-child(even) {
  background-color: #f4f4f4;
}

/**
 * Individual post format
 */

.forum__post {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px;
  padding-left: 12px;
  position: relative;
}

.forum__post-date {
  font-size: 12px;
  line-height: 20px;
  margin-bottom: 0;
}

.forum__user-content {
  flex: 1;
}

.forum__user-content .forum__post-title {
  margin-top: 0;
}

.forum__user-info {
  width: 100%;
  max-width: 200px;
}

@media (min-width: 768px) {
  .forum__post {
    flex-direction: row;
  }
}

.forum__reply-button {
  display: flex;
  justify-content: space-between;
}

/**
 * Formatting help accordion (details/summary)
 */
.forum-formatting-help {
  margin: 8px 0 16px;
}

.forum-formatting-help__accordion {
  border: 1px solid var(--color-grey, #d1d2d6);
  border-radius: 6px;
  overflow: hidden;
  background: #f8f9fa;
}

.forum-formatting-help__summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  cursor: pointer;
  list-style: none;
  font-weight: 500;
  color: var(--color-dark, #1a1a1a);
  user-select: none;
  transition: background-color 0.15s ease;
}

.forum-formatting-help__summary::-webkit-details-marker,
.forum-formatting-help__summary::marker {
  display: none;
}

/* Information icon (circle with i) */
.forum-formatting-help__summary::before {
  content: "\2139";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-size: 14px;
  font-weight: bold;
  font-style: italic;
  color: #2563eb;
  background: #eff6ff;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Chevron (points right when closed, down when open) */
.forum-formatting-help__summary::after {
  content: "";
  margin-left: auto;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 6px solid currentColor;
  transition: transform 0.2s ease;
}

.forum-formatting-help__accordion[open] .forum-formatting-help__summary::after {
  transform: rotate(90deg);
}

.forum-formatting-help__summary:hover {
  background: #eef1f5;
}

.forum-formatting-help__accordion pre {
  margin: 0;
  padding: 14px;
  border-top: 1px solid var(--color-grey, #d1d2d6);
  background: #fff;
  font-size: 13px;
  line-height: 1.5;
  overflow-x: auto;
}
