body {
  /* FE-050: legacy prod (Bootstrap 3, html font-size:10px) sets body to
   * 15px; BS5's default is 16px (1rem, with html left at browser default).
   * That ~7% bump makes the lowest sidebar/footer notice wrap to two lines.
   * Set body explicitly so both themes match legacy text metrics. html is
   * intentionally left at its default (16px) — legacy's 10px html base was
   * only ever used as a rem anchor for its own rem-sized rules, and this
   * codebase doesn't use rem values that were ported assuming that base
   * (see rem audit note in FE-050's ticket log).
   */
  font-size: 15px;
  background-image: url("/static/images/bg.png");
  background-position: center top;
  background-repeat: repeat-y;
  background-attachment: fixed;
  background-size: cover;
}

/* BS3 .btn-block + .btn-block had 5px gap; BS5 dropped .btn-block */
.btn.w-100 + .btn.w-100,
.btn.d-block + .btn.d-block {
  margin-top: 5px;
}

/* BS3 .form-group had margin-bottom: 15px; BS5 dropped it */
.form-group {
  margin-bottom: 15px;
}

/* BS3 default .btn padding was 10px 16px; BS5 uses 6px 12px */
.btn {
  padding: 10px 16px;
}

/* Content panel styling (Bootstrap 5 compatible) */
.content-panel {
  min-height: 20px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  background-color: #fff;
  border: 1px solid #e3e3e3;
  border-radius: 0.375rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Sidebar panel styling (Bootstrap 5 compatible) */
.sidebar-panel {
  min-height: 20px;
  padding: 19px;
  margin-bottom: 20px;
  background-color: rgba(255, 255, 255, 0.85);
  border: 1px solid #e3e3e3;
  border-radius: 4px;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
}

.content-panel-secondary {
  background-color: #f8f9fa;
}

/* FE-047/FE-053: bold must survive htmx swaps of the live player count --
   CSS is the source of truth, the <b> tag in the markup is belt-and-braces. */
.online_users {
  font-weight: bold;
}

.table th {
  text-align: center;
  vertical-align: middle;
}

body,
a {
  cursor: url("/static/maplestory.cur"), default;
}

.yt-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  padding-top: 25px;
}
.yt-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.video_frame iframe {
  max-width: 100%;
}
.video_frame img {
  max-width: 100%;
  height: auto;
}

p.reset_timer {
  font-weight: bold;
}

/* Cal-heatmap renders its root SVG as a block, so text-align alone only
 * centers the section heading. Auto margins center the calendar itself. */
#activityHeatmapCal .ch-container {
  margin-inline: auto;
}

h2.page-title {
  text-align: center;
}

section.notice {
  width: 100%;
  position: fixed; /*Set to "absolute" to leave the notice bar at the top only.*/
  background: rgba(0, 0, 0, 0.5);
  z-index: 2;
  text-align: center;
  height: 27px;
}

marquee,
span.notice {
  margin-top: 3px;
  font-weight: normal;
  font-family: arial;
  letter-spacing: 0px;
  font-size: 15px;
  color: #ffff22;
}

span.sensitive-data-span {
  background-color: black;
  color: black;
}

.hidden_form_element {
  display: none;
}

html {
  height: 100%;
}

.site-logo {
  z-index: -1;
}

.standalone_btn_div {
  min-height: 20px;
  padding: 19px;
  margin-bottom: 20px;
  text-align: center;
}

.standalone_btn_div > a {
  width: auto;
  display: inline;
  margin: auto;
}

.recaptcha_warning_div {
  text-align: center;
}

.recaptcha_warning {
  margin: auto;
  margin-top: 25px;
}

.wrong {
  color: red;
}

.promocode_textbox {
  background-color: #c9fdc9;
}

.g-recaptcha > div {
  margin: auto;
}

.discord-widget {
  min-height: 80px;
}

.character_name {
  color: #6699ff;
  text-decoration: none !important;
}

.donor_name {
  color: #ffb366;
}

.guild_name_link {
  color: #000000;
  text-decoration: none !important;
}

.class_link {
  color: #000000;
  text-decoration: none !important;
}

section.streamtitle {
  width: 100%;
  position: absolute;
  background: rgba(0, 0, 0, 0.75);
  z-index: 2;
  text-align: center;
  height: 27px;

  color: #ffffff;
  font-weight: bold;
}

section.streamsubtitle {
  width: 100%;
  position: absolute;
  background: rgba(0, 0, 0, 0.75);
  z-index: 2;
  text-align: center;
  height: 27px;
  bottom: 0px;

  color: #ffffff;
  font-weight: bold;
}

.streamsubtitle > marquee,
.streamsubtitle > div > span.notice {
  color: #ffffff;
  font-weight: bold;
}

.twitch_container:hover > .overlay {
  width: 100%;
  height: 100%;
  background-color: #000;
  opacity: 0.5;
}

.youtube_container:hover > .overlay {
  width: 100%;
  height: 100%;
  background-color: #000;
  opacity: 0.5;
}

a.stream_link {
  text-decoration: none !important;
}

.no_border_on_focus:focus {
  outline: 0px;
}

.notice-tooltip.tooltip-inner {
  max-width: 100% !important;
  font-size: 15px;
}

a:hover,
button:hover {
  animation: link_cursor 0.54s infinite;
}

@keyframes link_cursor {
  0% {
    cursor: url("/static/cursor/link_cur1.cur"), auto;
  }
  22.22% {
    cursor: url("/static/cursor/link_cur2.cur"), auto;
  }
  50% {
    cursor: url("/static/cursor/link_cur3.cur"), auto;
  }
  77.77% {
    cursor: url("/static/cursor/link_cur4.cur"), auto;
  }
  100% {
    cursor: url("/static/cursor/link_cur1.cur"), auto;
  }
}

@import url("//fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700");

/* Bootstrap 5 navbar styling to match Bootstrap 3 appearance */
.navbar {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  min-height: 50px;
  margin-bottom: 21px;
}

/* Default navbar color (Bootswatch Cosmo blue) — event themes override via !important */
.navbar-dark {
  background-color: #2780e3;
}

/* Bootstrap 5 navbar-dark link color override (Bootswatch Cosmo fix) */
.navbar-dark .nav-link {
  color: rgba(255, 255, 255, 0.85) !important;
  padding: 15px !important;
}

/* Collapsed links stack vertically; retain desktop's horizontal padding while
   tightening each mobile row. navbar-expand-lg collapses below 992px. */
@media (max-width: 991.98px) {
  .navbar-collapse .nav-link {
    padding: 10px 15px !important;
  }
}

.navbar-dark .nav-link:hover,
.navbar-dark .nav-link:focus {
  color: rgba(255, 255, 255, 1) !important;
}

.navbar-dark .navbar-brand {
  color: rgba(255, 255, 255, 0.9) !important;
}

.navbar-dark .dropdown-toggle::after {
  border-top-color: rgba(255, 255, 255, 0.85);
}

/* FE-032: BS5 underlines links by default ($link-decoration: underline);
   BS3/prod did not. Restore prod's link-decoration behavior verbatim. */
a {
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

.btn:hover,
.btn:focus {
  text-decoration: none;
}

/* Keep the expanded mobile menu compact without changing desktop navigation
   or other Bootstrap navs (such as the Library). */
@media (max-width: 991.98px) {
  .main-site-nav .navbar-collapse {
    padding-block: 0.25rem;
  }

  .main-site-nav .nav-link {
    padding-block: 0.3rem;
  }

  .main-site-nav .dropdown-item {
    padding-block: 0.2rem;
  }
}

/* FE-029: BS5 .container renders 1320px at xxl breakpoint (>=1400px) vs
   BS3/prod's 1170px at >=1200px. Pin to legacy width for parity. */
@media (min-width: 1200px) {
  .container {
    max-width: 1170px;
  }
}

/* FE-056: SPA nav loading indicator. The stable content-column wrapper keeps
   the indicator outside the htmx swap target. During a request it overlays
   that column instead of entering normal flow, so neither content nor sidebar
   shifts. The inherited background follows every event theme without another
   theme-color map. The 180ms delayed reveal absorbs fast responses. */
.spa-content-row,
.spa-content-column {
  background-color: inherit;
}
.spa-content-column {
  position: relative;
}
/* Confine positioned page widgets to one stacking context. The loader is a
   sibling at z-index:1, so even a high-z-index stream overlay cannot escape
   above it; isolation avoids changing absolute-position containing blocks. */
#page-content {
  isolation: isolate;
}
.spa-loading {
  display: none;
}
.spa-loading.htmx-request {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 6px 0;
  background-color: inherit;
  opacity: 0;
  animation: spa-fade-in 0.15s ease-in 180ms forwards;
}
@keyframes spa-fade-in {
  to {
    opacity: 1;
  }
}
/* FE-065/FE-073: preserve the legacy theme-specific animated loaders at
   their natural 245x96 size. Alpine's x-show selects hungry.gif in light mode
   and hungryzombie.gif in dark mode. */
.spa-loading-icon {
  width: 245px;
  max-width: 100%;
  height: auto;
}
#page-content:focus {
  outline: none;
}
