/* Force no underline on nav links */
#top nav a.title {
  text-decoration: none !important;
}

/* Override search bar width for simplified header */
header .search {
  width: calc(100% - 350px) !important;
  right: 25px !important;
}

header .donate {
  display: none;
}

/* Active nav tab indicator */
#top nav > ul > li.active > a.title {
  color: #5ad9a4 !important;
}

#top nav > ul > li.active > a.title:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #5ad9a4;
}

/* Source badge */
.source-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
}

.source-badge.tracker {
  background: #5ad9a4;
}

.source-badge.forum {
  background: #59d4db;
}

/* Search highlight */
mark {
  background: #5ad9a466;
  color: inherit;
  padding: 1px 3px;
  border-radius: 2px;
}

/* Pagination */
.pagination-wrapper {
  text-align: center;
  padding: 15px 0;
}

.pagination-wrapper a,
.pagination-wrapper span {
  display: inline-block;
  padding: 6px 12px;
  margin: 0 2px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: #2a313a;
  text-decoration: none;
}

.pagination-wrapper span.current {
  background: #5ad9a4;
  color: #2a313c;
}

.pagination-wrapper a:hover {
  background: #3a4350;
}

/* Stats bar */
.stats-bar {
  background: #2a313a;
  color: #8998b0;
  padding: 12px 20px;
  border-radius: 3px;
  margin-bottom: 15px;
  font-size: 13px;
}

.stats-bar strong {
  color: #5ad9a4;
}

/* Body font weight boost */
html, body {
  font-weight: 500 !important;
}

/* Table styling - softer borders */
table.inbox {
  border: none !important;
  border-collapse: collapse;
}

table.inbox thead th {
  border: none !important;
  border-bottom: 2px solid #1a1f26 !important;
}

table.inbox td {
  border-left: none !important;
  border-right: none !important;
  border-top: none !important;
  border-bottom: 1px solid #eaeaea !important;
}

table.inbox tbody tr:last-child td {
  border-bottom: none !important;
}

/* Table row hover */
table.inbox tbody tr:hover td {
  background: #f0f0f0 !important;
  cursor: pointer;
}

/* Content blocks - no outer border */
#middle .default {
  border: none !important;
  box-shadow: none !important;
}

#middle .content {
  border: none !important;
}

/* ===== MOBILE RESPONSIVE ===== */

/* Keep nav visible on mobile (override master.css sidebar behavior) */
@media screen and (max-width: 800px) {
  #top {
    width: 100% !important;
    position: relative !important;
    left: auto !important;
    height: auto !important;
    z-index: 100;
  }

  #top .ct {
    padding: 0;
  }

  #top nav > ul > li {
    width: 25% !important;
    height: 40px;
    border-bottom: none !important;
  }

  #top nav > ul > li a.title {
    font-size: 9px;
    text-align: center;
    padding-left: 0;
    width: 100%;
    line-height: 40px;
  }

  /* Header: stack logo + search */
  header {
    height: auto !important;
    min-height: 60px;
    padding: 10px 0 !important;
  }

  header .logotype {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    display: block !important;
    text-align: center;
    margin-bottom: 8px;
  }

  header .logotype img {
    display: inline-block !important;
    width: 160px !important;
  }

  header .search {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    width: calc(100% - 30px) !important;
    margin: 0 auto;
    display: block;
  }

  /* Content area */
  #middle .ct {
    padding: 0 8px;
  }

  #middle h1 {
    font-size: 16px !important;
  }

  /* Table: hide less important columns on small screens */
  table.inbox th:nth-child(4),
  table.inbox td:nth-child(4),
  table.inbox th:nth-child(5),
  table.inbox td:nth-child(5) {
    display: none;
  }

  table.inbox td {
    padding: 6px 4px !important;
    font-size: 11px !important;
  }

  table.inbox th {
    padding: 8px 4px !important;
    font-size: 9px !important;
  }

  /* Conversation messages */
  #commentary .left {
    width: 60px !important;
    min-width: 60px !important;
  }

  #commentary .left .avatar {
    width: 40px !important;
    height: 40px !important;
  }

  #commentary .left .name {
    font-size: 9px !important;
  }

  #commentary .message {
    margin-left: 70px !important;
  }

  #commentary .message .add p {
    font-size: 11px !important;
  }

  /* Stats bar */
  .stats-bar {
    font-size: 11px;
    padding: 8px 12px;
  }

  /* Pagination */
  .pagination-wrapper a,
  .pagination-wrapper span {
    padding: 4px 8px;
    font-size: 10px;
  }

  /* Footer */
  footer .copy {
    font-size: 11px;
  }
}

/* Extra small screens */
@media screen and (max-width: 480px) {
  #top nav > ul > li a.title {
    font-size: 8px;
  }

  /* Also hide participants column */
  table.inbox th:nth-child(3),
  table.inbox td:nth-child(3) {
    display: none;
  }

  table.inbox td:first-child {
    width: auto !important;
  }

  #commentary .message {
    font-size: 12px !important;
  }
}
