/* Bluesea mobile layout overrides. Load after the standard theme. */
@media screen and (max-width: 800px) {
  body { min-width: 0 !important; margin: 0; }
  #container { width: 100% !important; min-width: 0 !important; box-sizing: border-box; }
  #header { height: auto !important; min-height: 72px; padding: 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
  #header #logo { height: auto; max-width: 100%; padding: 0; }
  #header #logo img { max-width: 100%; height: auto; }
  #header p, #header .pull-right { width: auto; max-width: 100%; float: none; margin: 0; }
  #nav, #sub_nav { height: auto !important; white-space: normal; padding: 4px; margin: 0; }
  #nav > li { display: inline-block; margin: 2px !important; height: auto !important; min-width: 0 !important; }
  #nav > li > a, #sub_nav > li > a { min-height: 44px; height: auto; line-height: 44px; box-sizing: border-box; }
  #content { margin: 0; padding: 14px; min-width: 0; box-sizing: border-box; }
  #content img, #content video { max-width: 100%; height: auto; }
  #content figure { margin-left: 0; margin-right: 0; }
  #content input:not([type=checkbox]):not([type=radio]):not([type=hidden]), #content select, #content textarea { max-width: 100%; box-sizing: border-box; font-size: 16px; }
  #content textarea, #content .redactor-box { width: 100% !important; min-width: 0 !important; box-sizing: border-box; }
  #content button, #content input[type=submit], #content input[type=reset], #content .button { min-height: 44px; white-space: normal; }
  #content .thread-body { overflow-wrap: anywhere; }
  #content .thread-body pre { overflow: auto; max-width: 100%; }
  #footer { padding: 12px; }
  #dialog { max-width: calc(100vw - 24px); box-sizing: border-box; }
}
