/* Added by us, not part of the restore.

   The theme's JS widgets build very wide inner elements and rely on their
   containers clipping them. With the original page chrome partly gone those
   containers were not clipping, so the page scrolled sideways by ~100,000px:
   the jQuery marquee wrapper alone measured 100000px, the Owl carousel
   14100px, and unconstrained images 2560px. */
html, body { max-width: 100%; overflow-x: hidden; }

/* news ticker */
.mg-latest-news, .mg-latest-news-slider, .marquee, .js-marquee-wrapper,
.mg-latest-news .mg-latest-news-slider { max-width: 100%; overflow: hidden; }

/* owl carousel */
.owl-carousel, .owl-stage-outer, .owl-wrapper-outer { max-width: 100%; overflow: hidden; }

/* images must never set the page width */
img { max-width: 100%; height: auto; }
.mg-post-area, .mg-post-area .count { max-width: 100%; }

/* ---------------------------------------------------------------------
   Nav submenu containment.

   The theme relies on SmartMenus initialising at runtime to turn the
   EN/LA/TH list into a dropdown. On the restored article pages that
   initialisation does not complete, so the submenu rendered as a black
   panel sitting open over the article column. The homepage happened to
   initialise correctly, which is why only the inner pages looked broken.

   Rather than depend on the JS running, the closed state is asserted in
   CSS and the open state is driven by hover/focus. Keyboard focus is
   included so the menu is still reachable without a pointer.
   ------------------------------------------------------------------ */
.navbar-nav .dropdown-menu{
  display:none;
  position:absolute;
  top:100%;
  left:0;
  z-index:1000;
}
.navbar-nav > li{position:relative}
.navbar-nav > li:hover > .dropdown-menu,
.navbar-nav > li:focus-within > .dropdown-menu{display:block}

/* On the collapsed mobile menu the dropdown must flow inline instead of
   floating, or it overlaps the items beneath it. */
@media (max-width:991px){
  .navbar-nav .dropdown-menu{position:static;float:none}
  .navbar-collapse.show .navbar-nav > li > .dropdown-menu{display:block}
}

/* ---------------------------------------------------------------------
   Main nav item spacing.

   The restored pages lost the theme rule that gives .navbar-nav > li > a
   its padding, so every top-level item computed to display:inline with
   zero padding and the labels ran together as one string
   ("Languagesคาสิโนออนไลน์"). These rules restore the spacing and the
   hover state without touching the theme's colours, which still come
   from the original stylesheets.
   ------------------------------------------------------------------ */
.navbar-nav > li > a{
  display:inline-block;
  padding:14px 16px;
  line-height:1.2;
}
.navbar-nav > li > a:hover,
.navbar-nav > li > a:focus{opacity:.82;text-decoration:none}
.navbar-nav .dropdown-menu > li > a{display:block;padding:9px 16px}

@media (max-width:991px){
  .navbar-nav > li > a{display:block;padding:11px 14px}
}

/* ---------------------------------------------------------------------
   Top date bar on small screens.

   The markup is <div class="mg-head-detail hidden-xs">. `hidden-xs` is
   BOOTSTRAP 3 syntax; this theme ships Bootstrap 4, where that class does
   nothing, so the bar renders on phones even though the theme plainly
   intended to hide it there. Restoring that intent also returns 46px of
   vertical space above the fold on every page.
   ------------------------------------------------------------------ */
@media (max-width:767px){
  .mg-head-detail.hidden-xs{display:none}
}
