/* Additions on top of the WordPress theme, loaded after its CSS on every page. */

/* Language switcher in the navbar: shown on phones instead of the yellow top bar. */
.msop-lang {
  display: none;
  position: relative;
  margin: 0 8px 0 0;
}
.msop-lang summary {
  list-style: none;
  cursor: pointer;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 3px;
  color: #fff;
  font-size: 13px;
  line-height: 1;
  text-transform: uppercase;
  user-select: none;
}
.msop-lang summary::-webkit-details-marker { display: none; }
.msop-lang summary::after {
  content: "";
  display: inline-block;
  margin-left: 6px;
  vertical-align: 2px;
  border: 4px solid transparent;
  border-top-color: currentColor;
  border-bottom: 0;
}
.msop-lang ul {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 1100;
  min-width: 64px;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  background: #fff;
  border-radius: 3px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
}
.msop-lang li a {
  display: block;
  padding: 8px 16px;
  color: #3c4858;
  font-size: 13px;
  text-transform: uppercase;
}
.msop-lang li a[aria-current="page"] { font-weight: 700; }

@media (max-width: 768px) {
  /* No yellow strip: the languages live in the navbar. */
  .hestia-top-bar { display: none; }
  .navbar.navbar-fixed-top { top: 0 !important; }
  /* the theme moves the opened menu down by the strip's 40px */
  .navbar.navbar-fixed-top.header-with-topbar:not(.navbar-scroll-point) .navbar-collapse { margin-top: 70px; }
  .msop-lang { display: block; }

  /* Logo always on the left, toggle on the right — the home pages squeeze
     div.container to 200–300px, which pushed both towards the centre. */
  .navbar > div.container { width: auto; }
  .navbar .navbar-header { display: flex; align-items: center; width: 100%; }
  .navbar .title-logo-wrapper { margin-right: auto; }
  .navbar .navbar-toggle-wrapper { margin-left: 0; }
}
