/* Clubhouse Message Board (talk_smack) -- ported from legacy's clubhouse_modern.css. Each message gets its own
   bordered, rounded box, sized consistently to match the compose box above (no single bounding box around the
   whole list). */

.talkSmackPage #pageTitle {
  margin-bottom: 16px;
}

.talkSmackPage .smackForm .form-group {
  max-width: 850px;
  margin-bottom: 8px;
}

.talkSmackPage .smackForm textarea.form-control {
  width: 100%;
  max-width: 100%;
  min-height: 90px;
  border: 1px solid var(--ptfg-input-border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  box-sizing: border-box;
}

.talkSmackPage .smackForm textarea.form-control:focus {
  outline: none;
  border-color: var(--ptfg-info);
  box-shadow: 0 0 0 3px rgba(28, 91, 196, 0.15);
}

.talkSmackPage .smackForm #smackSubmit {
  border-radius: 6px;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(11, 26, 103, 0.2);
  padding: 6px 18px;
}

.talkSmackPage .smackCharsRemaining {
  margin-left: 12px;
  font-size: 12px;
  color: var(--ptfg-text-muted);
}

.talkSmackPage .smackCharsRemaining input {
  border: 1px solid var(--ptfg-input-border);
  border-radius: 4px;
  padding: 3px 4px;
  width: 44px;
  box-sizing: border-box;
}

.talkSmackPage .smackFormErrors {
  max-width: 850px;
  margin-bottom: 12px;
}

.talkSmackPage .smackEditCancelLink {
  margin-top: 14px;
}

.talkSmackPage .talkSmackHr hr {
  width: 100%;
  height: 1px;
  background-color: var(--ptfg-border);
  border: none;
  margin: 18px 0 12px;
}

.talkSmackPage .smackTip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
  max-width: 850px;
  box-sizing: border-box;
}

.talkSmackPage .smackTipIcon {
  font-size: 16px;
  line-height: 1;
}

.talkSmackPage .smackMessageTable {
  width: 100%;
  margin: 0;
  border: none;
}

/* The plain <td style="vertical-align: top"> wrapping #smackMessageInnerTable has no class of its own, so it was
   falling through to application.css's global `th, td { border: 1px solid #ccc; }` default -- which is exactly
   what was drawing a rectangle around the whole message list even after every table/list-level border was
   already set to none above. The direct-child combinator scopes this to that one wrapper td only, so it doesn't
   also strip the deliberate per-message borders on .smackMessageAuthor/.smackMessageContent nested inside it. */
.talkSmackPage .smackMessageTable > tr > td {
  border: none;
}

.talkSmackPage #smackMessageInnerTable {
  width: 100%;
  max-width: 850px;
  border: none;
  empty-cells: show;
}

/* Overriding the row to flex (rather than relying on the table's own column-width algorithm, which is shared
   across every row) lets every message use the same column width, matching the compose box above, while still
   shrinking with the viewport instead of overflowing it at a narrow browser width. */
.talkSmackPage #smackMessageInnerTable tr {
  display: flex;
  width: 100%;
  max-width: 850px;
  margin-bottom: 10px;
}

.talkSmackPage #smackMessageInnerTable tr:last-child {
  margin-bottom: 0;
}

.talkSmackPage .smackMessageAuthor,
.talkSmackPage .smackMessageContent {
  display: block;
  border-style: solid;
  border-color: var(--ptfg-border);
  margin: 0;
}

.talkSmackPage .smackMessageAuthor {
  flex: 0 0 160px;
  border-width: 1px 0 1px 1px;
  border-radius: 10px 0 0 10px;
  padding: 10px 12px;
  font-size: 11px;
  vertical-align: top;
}

.talkSmackPage .smackMessageContent {
  flex: 1 1 690px; /* 690 + the 160px author column = 850px, matching the compose box's own max-width above --
                       grows to fill so a short, single-line message still fills the same column width as a long,
                       wrapped one, but still shrinks (rather than a rigid fixed size) so it doesn't overflow the
                       page at a narrow browser width. */
  min-width: 0;
  border-width: 1px 1px 1px 0;
  border-radius: 0 10px 10px 0;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.6;
  color: #333;
}

.talkSmackPage .smackMessageAuthorRow {
  margin-bottom: 2px;
}

.talkSmackPage .smackAuthorName {
  font-weight: 700;
  color: var(--ptfg-navy);
  font-size: 12px;
}

.talkSmackPage .smackMessageRemoved {
  font-style: italic;
  color: var(--ptfg-text-muted);
}

.talkSmackPage tr.smackMessageRowEven td {
  background: #fff;
}

.talkSmackPage tr.smackMessageRowOdd td {
  background: #eef0f5;
}

.talkSmackPage tr.highlightRow td {
  background-color: var(--ptfg-highlight);
}

.talkSmackPage .smackMessageActionLink {
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  margin-right: 6px;
}

.talkSmackPage .smackMessageActionLink:hover {
  text-decoration: underline;
}

.talkSmackPage .smackMessageEditLink {
  color: var(--ptfg-green);
}

.talkSmackPage .smackMessageDeleteLink {
  color: var(--ptfg-red);
}

.talkSmackPage .smackPagination {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  font-size: 13px;
}

.talkSmackPage .smackPagination a {
  display: inline-block;
  border: 1px solid var(--ptfg-border);
  border-radius: 6px;
  padding: 5px 11px;
  color: var(--ptfg-navy);
  text-decoration: none;
}

.talkSmackPage .smackPagination a:hover {
  background: var(--ptfg-bg-tint);
}
