/* PSS 2026-06-11: rescue direct MyBB pages that still bypass the forum wrapper. */
body {
  background: #f4f6f8 !important;
  color: #303840 !important;
  text-align: left !important;
  font-family: 'Roboto', Arial, sans-serif !important;
  font-size: 14px;
}

a:link,
a:visited {
  color: #ff5722;
}

a:hover,
a:active {
  color: #e94a1a;
}

#container {
  min-width: 0 !important;
  width: 100% !important;
}

.wrapper {
  width: auto !important;
  max-width: 1120px;
  margin: 0 auto !important;
  padding-left: 16px;
  padding-right: 16px;
}

.topmenu {
  position: sticky !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  min-height: 68px;
  height: auto !important;
  gap: 18px;
  padding: 0 30px !important;
  border-bottom: 1px solid #e7eaed !important;
  background: #fff !important;
  box-shadow: 0 2px 16px rgba(18, 27, 34, 0.08) !important;
  color: #343b43 !important;
}

.topmenu:before {
  content: "";
  display: block;
  flex: 0 0 124px;
  width: 124px;
  height: 42px;
  background: url('/forum/assets/img/pss_logo.svg') center center / contain no-repeat;
}

.topmenu.pss-direct-nav:before {
  display: none;
}

.pss-direct-brand {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.pss-direct-brand img {
  display: block;
  width: 126px;
  max-height: 44px;
}

.pss-direct-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.pss-direct-links a {
  color: #343b43 !important;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.pss-direct-links a:hover,
.pss-direct-links a.is-active {
  color: #ff5722 !important;
}

.pss-direct-search {
  flex: 0 1 410px;
  margin-left: auto;
}

.pss-direct-search form {
  margin: 0;
}

.pss-direct-search #search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  border: 1px solid #e0e5ea;
  border-radius: 999px;
  background: #f8fafb;
  padding: 3px 8px 3px 14px;
}

.pss-direct-search #search input.textbox {
  flex: 1;
  min-width: 0;
  border: 0 !important;
  background: transparent !important;
  padding: 8px 6px !important;
}

.pss-direct-search #search input.button {
  min-width: 74px;
  padding: 7px 12px !important;
  font-size: 12px;
}

.pss-direct-guest-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pss-direct-guest-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid #ff5722;
  border-radius: 999px;
  padding: 8px 16px;
  color: #ff5722 !important;
  font-weight: 700;
  text-decoration: none;
}

.pss-direct-guest-actions a.pss-direct-register,
.pss-direct-guest-actions a:hover {
  background: #ff5722;
  color: #fff !important;
}

.pss-direct-user .dropdown-menu {
  right: 0;
  left: auto;
}

.topmenu .hidden-xs {
  order: 2;
  margin-left: auto;
}

.topmenu .mymenu {
  float: none !important;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 !important;
}

.topmenu .mymenu li {
  float: none !important;
}

.topmenu .mymenu li a {
  height: auto !important;
  padding: 8px 0 !important;
  color: #343b43 !important;
  font-size: 14px !important;
  font-weight: 700;
  line-height: 1.2;
}

.topmenu .mymenu li a:hover {
  color: #ff5722 !important;
  text-decoration: none;
}

.topmenu .mymenu .octicon {
  display: none;
}

.topmenu #user_panel {
  order: 3;
  padding: 0 !important;
  font-size: 14px !important;
  white-space: nowrap;
}

.topmenu #user_panel .avatar {
  display: none;
}

#logo {
  display: none !important;
}

#content {
  width: auto !important;
  min-height: calc(100vh - 240px);
  padding: 36px 16px 56px !important;
  background: #f4f6f8 !important;
  overflow: visible !important;
}

#content .wrapper {
  max-width: 1120px;
}

.mybreadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px !important;
  border: 1px solid #e1e6eb;
  border-radius: 8px;
  background: #fff;
  padding: 10px 14px !important;
  color: #6b7680;
  box-shadow: 0 6px 18px rgba(24, 35, 44, 0.04);
}

.mybreadcrumb > a.mega-octicon,
.mybreadcrumb > a.octicon-home {
  display: none !important;
}

.mybreadcrumb a {
  display: inline-flex;
  align-items: center;
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #ff5722 !important;
  font-weight: 700;
  line-height: 1.4 !important;
}

.mybreadcrumb .fas,
.mybreadcrumb i,
.mybreadcrumb .octicon,
.mybreadcrumb .mega-octicon {
  display: none !important;
}

.mybreadcrumb a::before,
.mybreadcrumb a::after,
.mybreadcrumb i::before,
.mybreadcrumb i::after {
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

.mybreadcrumb a:not(:last-child)::after {
  content: "/";
  margin-left: 8px;
  color: #b8c1ca;
  font-weight: 600;
}

.tborder {
  width: 100% !important;
  max-width: 100%;
  margin: 18px 0 22px !important;
  border: 1px solid #e2e7ec !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: 0 10px 28px rgba(24, 35, 44, 0.06);
  overflow: hidden;
}

.thead {
  border: 0 !important;
  background: #f45c2a !important;
  color: #fff !important;
  padding: 13px 16px !important;
  text-shadow: none !important;
}

.thead strong {
  display: inline-block;
  border: 0 !important;
  background: transparent !important;
  color: inherit !important;
  font-size: 16px;
  line-height: 1.35;
  padding: 0 !important;
  text-shadow: none !important;
}

.tcat {
  border: 0 !important;
  background: #343b43 !important;
  color: #fff !important;
  padding: 10px 14px !important;
  text-shadow: none !important;
}

td.trow1,
td.trow2 {
  border-color: #e9eef2 !important;
  background: #fff !important;
  color: #303840;
  padding: 14px !important;
  vertical-align: top;
}

td.trow1:first-child,
td.trow2:first-child {
  background: #f7f9fb !important;
}

input.textbox,
textarea,
select {
  max-width: 100%;
  border: 1px solid #d5dde5 !important;
  border-radius: 6px !important;
  background: #fff !important;
  color: #303840 !important;
  box-shadow: none !important;
}

input.textbox {
  padding: 8px 10px !important;
}

input.textbox:focus,
textarea:focus,
select:focus {
  border-color: #f45c2a !important;
  box-shadow: 0 0 0 0.16rem rgba(244, 92, 42, 0.14) !important;
  outline: 0;
}

input.button,
a.button:link,
a.button:visited,
a.button:hover,
a.button:active,
button {
  border: 1px solid #f45c2a !important;
  border-radius: 999px !important;
  background: #f45c2a !important;
  color: #fff !important;
  padding: 9px 18px !important;
  font-weight: 700 !important;
  text-shadow: none !important;
  box-shadow: none !important;
}

input.button:hover,
a.button:hover,
button:hover {
  border-color: #e94a1a !important;
  background: #e94a1a !important;
  text-decoration: none;
}

.sceditor-container {
  width: 100% !important;
  max-width: 100% !important;
  border: 1px solid #d5dde5 !important;
  border-radius: 6px !important;
  background: #fff !important;
  overflow: hidden;
}

.sceditor-toolbar {
  border-bottom: 1px solid #e4e9ee !important;
  background: #f7f9fb !important;
  padding: 8px !important;
}

.sceditor-container iframe,
.sceditor-container textarea,
textarea#message {
  width: 100% !important;
  max-width: 100% !important;
  min-height: 300px;
}

/* PSS direct posting forms: new topic, reply, edit post. */
form[name="input"][action*="newthread.php"],
form[name="input"][action*="newreply.php"],
form[name="input"][action*="editpost.php"] {
  display: block;
  max-width: 1040px;
  margin: 0 auto;
}

.pss-posting-table {
  display: block !important;
  margin-top: 8px !important;
  overflow: visible;
}

.pss-posting-table > tbody {
  display: block !important;
  width: 100%;
}

.pss-posting-table > tbody > tr {
  display: grid !important;
  grid-template-columns: 180px minmax(0, 1fr);
  width: 100%;
  border-bottom: 1px solid #e7edf2;
}

.pss-posting-table > tbody > tr:last-child {
  border-bottom: 0;
}

.pss-posting-table > tbody > tr > td {
  display: block !important;
  width: auto !important;
  border: 0 !important;
  box-sizing: border-box;
}

.pss-posting-table > tbody > tr > td[colspan] {
  grid-column: 1 / -1;
}

.pss-posting-table > tbody > tr > td.pss-post-label,
.pss-posting-table > tbody > tr > td:first-child:not([colspan]) {
  width: 170px !important;
  min-width: 170px;
  padding: 16px 14px !important;
  text-align: right;
  font-weight: 700;
  background: #f8fafb !important;
  border-right: 1px solid #e9eef2 !important;
}

.pss-posting-table > tbody > tr > td.pss-post-field,
.pss-posting-table > tbody > tr > td.pss-post-editor {
  min-width: 0;
  padding: 14px 18px !important;
  background: #fff !important;
}

.pss-posting-table .thead,
.pss-posting-table .tcat {
  border-radius: 0 !important;
  background: #ff5722 !important;
  color: #fff !important;
  text-align: right !important;
}

.pss-posting-table .tcat {
  background: #303840 !important;
}

form[name="input"][action*="newthread.php"] input[name="subject"],
form[name="input"][action*="newreply.php"] input[name="subject"],
form[name="input"][action*="editpost.php"] input[name="subject"] {
  width: min(100%, 560px) !important;
}

form[name="input"][action*="newthread.php"] textarea#message,
form[name="input"][action*="newreply.php"] textarea#message,
form[name="input"][action*="editpost.php"] textarea#message {
  min-height: 360px;
}

.pss-smilie-holder {
  display: block;
  clear: both;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #edf1f4;
}

.pss-smilie-panel {
  display: block;
  max-width: 100%;
}

.pss-smilie-table {
  display: block !important;
  width: 100% !important;
  max-width: 100%;
  margin: 0 !important;
  border: 1px solid #e5ebf0 !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: none !important;
  overflow: hidden;
}

.pss-smilie-table .thead {
  display: none !important;
}

.pss-smilie-table td {
  width: auto !important;
  min-width: 0 !important;
  padding: 4px !important;
  text-align: center !important;
  background: transparent !important;
}

.pss-smilie-table > tbody,
.pss-smilie-table > tbody > tr,
.pss-smilie-table > tbody > tr > td {
  display: block !important;
  width: 100% !important;
}

.pss-smilie-table #clickable_smilies {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  width: 100% !important;
  margin: 0;
}

.pss-smilie-table #clickable_smilies tbody,
.pss-smilie-table #clickable_smilies tr {
  display: contents !important;
}

.pss-smilie-table #clickable_smilies td {
  display: inline-flex !important;
  width: auto !important;
  padding: 2px !important;
}

.pss-smilie-table #clickable_smilies img.smilie {
  width: 20px;
  height: 20px;
  margin: 2px;
  cursor: pointer;
}

.pss-smilie-table a[href*="misc.php?action=smilies"] {
  display: block;
  margin-top: 6px;
  color: #ff5722 !important;
  font-size: 12px;
  font-weight: 700;
}

form[name="input"][action*="newthread.php"] .posticons_label,
form[name="input"][action*="newreply.php"] .posticons_label,
form[name="input"][action*="editpost.php"] .posticons_label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 3px 8px 3px 0;
  color: #4f5b66;
  font-weight: 500;
}

form[name="input"][action*="newthread.php"] table.tborder table.tborder,
form[name="input"][action*="newreply.php"] table.tborder table.tborder,
form[name="input"][action*="editpost.php"] table.tborder table.tborder {
  margin: 8px 0 !important;
  border-radius: 6px !important;
  box-shadow: none;
}

.pss-post-actions,
form[name="input"][action*="newthread.php"] div[style*="text-align:center"],
form[name="input"][action*="newreply.php"] div[style*="text-align:center"],
form[name="input"][action*="editpost.php"] div[style*="text-align:center"],
form[name="input"][action*="newreply.php"] div[align="center"],
form[name="input"][action*="editpost.php"] div[align="center"] {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 18px 0 28px;
}

#footer {
  border-top: 0 !important;
  background: #303840 !important;
  color: #c5ced6 !important;
  text-align: left !important;
}

#footer .upper,
#footer .lower {
  border: 0 !important;
  background: transparent !important;
}

#footer a:link,
#footer a:visited,
#footer a:hover,
#footer a:active {
  color: #fff !important;
}

@media (max-width: 800px) {
  .topmenu {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 16px !important;
  }

  .topmenu:before {
    flex-basis: 104px;
    width: 104px;
    height: 36px;
  }

  .topmenu .hidden-xs {
    display: none !important;
  }

  .pss-direct-links,
  .pss-direct-search {
    order: 4;
    flex: 1 0 100%;
  }

  .pss-direct-links {
    flex-wrap: wrap;
    gap: 12px;
  }

  #content {
    padding: 24px 10px 42px !important;
  }

  .pss-posting-table,
  .pss-posting-table > tbody,
  .pss-posting-table > tbody > tr,
  .pss-posting-table > tbody > tr > td {
    display: block;
    width: 100% !important;
  }

  .pss-posting-table > tbody > tr > td.pss-post-label,
  .pss-posting-table > tbody > tr > td:first-child:not([colspan]) {
    width: 100% !important;
    min-width: 0;
    text-align: left;
  }

  .pss-smilie-table {
    display: table !important;
    width: auto !important;
    margin: 10px 0 0 !important;
  }

  .pss-smilie-table tbody,
  .pss-smilie-table tr,
  .pss-smilie-table td {
    width: auto !important;
  }

  .pss-smilie-table tbody {
    display: table-row-group !important;
  }

  .pss-smilie-table tr {
    display: table-row !important;
  }

  .pss-smilie-table td {
    display: table-cell !important;
  }
}
