/* ===========================================================
   Liberty's Flame - Latest Comments Page Styles
   =========================================================== */

/* -----------------------------------------------------------
   Main frame layout
   ----------------------------------------------------------- */
body.latest-comments-page .content-wrapper {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: flex-start;
  width: 100%;
  margin: 0;
  padding-left: var(--page-indent);
  padding-right: var(--page-indent);
  box-sizing: border-box;
}

/* ---- MAIN CONTENT FRAME ---- */
body.latest-comments-page main.article-frame {
  background-color: #f8f8ff;
  border: 1px solid #aaaacc;
  border-radius: 6px;
  box-shadow: 0 0 8px rgba(0,0,0,0.08);
  padding: 1.2rem 2rem;
  margin-left: 0;
  margin-right: 14px;
  margin-top: 0;
  margin-bottom: 2rem;
  flex: 1;
  box-sizing: border-box;
}

body.latest-comments-page main.article-frame h2 {
  margin-top: 0.2rem;
  margin-bottom: 1rem;
  font-size: 1.5em;
  color: #000000;
  font-weight: bold;
}

/* ===========================================================
   Sidebar (title bar)
   =========================================================== */
body.latest-comments-page aside.title-bar {
  width: 185px;
  min-width: 185px;
  background-color: var(--titlebox-bg);
  border: 1px solid #b0b0c8;
  border-radius: 6px;
  padding: 8px 10px;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.08);
  flex-shrink: 0;
  height: auto !important;
  max-height: none !important;
  align-self: flex-start;
}

.title-bar-header {
  border-bottom: 2px solid var(--link-color);
  margin-bottom: 0.6em;
  padding-bottom: 0.3em;
}

.title-bar-header h3 {
  font-size: 0.9em;
  color: #000000;
  margin: 0;
}

.title-bar ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.title-bar li {
  margin: 8px 0;
  line-height: 1.3;
  font-size: 0.85em;
}

.title-bar a {
  text-decoration: none;
  color: var(--link-color);
  font-weight: bold;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.85em;
}

.title-bar a:hover {
  text-decoration: underline;
}

.title-bar a:visited {
  color: var(--link-visited);
}

/* ===========================================================
   Filter form
   =========================================================== */
#filter-form {
  display: flex;
  align-items: center;
  gap: 1em;
  flex-wrap: wrap;
  margin-bottom: 1.2em;
}

#filter-form label {
  font-weight: bold;
  margin-right: 0.3em;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.9em;
}

#filter-form input[type="text"] {
  padding: 4px 8px;
  border: 1px solid #aaaacc;
  border-radius: 3px;
  font-size: 0.95em;
}

#filter-form button {
  padding: 5px 14px;
  background-color: #333399;
  color: #ffffff;
  border: 1px solid #000080;
  border-radius: 3px;
  font-weight: bold;
  font-family: Arial, Helvetica, sans-serif;
  cursor: pointer;
  transition: background-color 0.2s;
}

#filter-form button:hover {
  background-color: #0000cc;
}

/* Autocomplete dropdowns */
.autocomplete-container {
  position: relative;
  display: inline-block;
}

.autocomplete-suggestions {
  position: absolute;
  z-index: 1000;
  background: #ffffff;
  border: 1px solid #aaaacc;
  max-height: 200px;
  overflow-y: auto;
  width: 100%;
  display: none;
}

/* ===========================================================
   Comments list
   =========================================================== */
.comment-data {
  font-size: 1.0em;
  line-height: 1.35;
  margin-bottom: 0.35em;
  padding: 0.25em 0.4em;
  font-weight: bold;
}

.comment-data:hover {
  background-color: #e8e8f8;
}

.comment-meta {
  font-size: 0.9em;
  color: #555555;
  font-weight: normal;
  font-family: Arial, Helvetica, sans-serif;
}

.comment-data a {
  color: var(--link-color);
}

.comment-data a:visited {
  color: var(--link-visited);
}

.comment-data a:hover {
  text-decoration: underline;
}

/* ===========================================================
   Pagination
   =========================================================== */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 1rem 0 0.5rem 0;
  padding-top: 0.75rem;
  border-top: 1px solid #aaaacc;
}

.page-link {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid #aaaacc;
  border-radius: 3px;
  color: var(--link-color);
  font-size: 0.9em;
  font-weight: bold;
  font-family: Arial, Helvetica, sans-serif;
  text-decoration: none;
  background-color: #f0f0ff;
  transition: background 0.2s;
}

.page-link:hover {
  background-color: #d0d0f0;
}

.page-link.active {
  background-color: #333399;
  color: #ffffff;
  border-color: #000080;
  pointer-events: none;
}

.page-ellipsis {
  padding: 4px 4px;
  color: var(--text-color);
  font-weight: bold;
}

.no-comments {
  color: #888888;
  font-style: italic;
  margin-top: 1rem;
  font-family: Arial, Helvetica, sans-serif;
}

/* ===========================================================
   Responsive
   =========================================================== */
@media (max-width: 900px) {
  body.latest-comments-page .content-wrapper {
    flex-direction: column;
  }
  body.latest-comments-page main.article-frame,
  body.latest-comments-page aside.title-bar {
    width: auto;
    margin: 10px 10px;
  }
}