/* Append to resources/css/bpneo.css */

.bpneo-font-switch,
.bpneo-feedback-btn,
.bpneo-mobile-discuss-btn,
.bpneo-top-actions > .bpneo-donate,
.bpneo-top-actions > .bpneo-dark-toggle,
.bpneo-top-actions > .bpneo-language,
.bpneo-dock-user {
  display: none !important;
}

.bpneo-top-actions {
  display: flex;
  align-items: center;
  gap: 3px;
}

#bpneo-preview-account {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-right: 7px;
  order: 1;
}

.bpneo-preview-btn {
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: #202122;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.bpneo-preview-btn:hover {
  background: #eaecf0;
  border-color: #c8ccd1;
}

.bpneo-preview-btn i { font-size: 19px; line-height: 1; }
.bpneo-preview-info,
.bpneo-preview-contrib { width: 36px; padding: 0; }
.bpneo-preview-login { color: #36c; }
.bpneo-preview-donate { width: 38px; padding: 0; }
.bpneo-preview-donate i { font-size: 21px; }
.bpneo-preview-username {
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 8px;
  font-weight: 600;
}
.bpneo-preview-user { width: 38px; padding: 0; }

#bpneo-more-preview {
  order: 2;
  width: 38px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: #202122;
  cursor: pointer;
}

#bpneo-more-preview:hover,
#bpneo-more-preview.is-open {
  background: #eaecf0;
  border-color: #c8ccd1;
}

#bpneo-more-preview i { font-size: 22px; }

#bpneo-mega-menu {
  position: fixed;
  z-index: 999999;
  top: 61px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1180px, calc(100vw - 32px));
  min-height: 360px;
  display: none;
  grid-template-columns: 285px minmax(0, 1fr) 300px;
  overflow: hidden;
  background: #fff;
  color: #202122;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .18), 0 3px 10px rgba(0, 0, 0, .08);
}

#bpneo-mega-menu.show { display: grid; }

.bpneo-mega-left { background: #12344d; color: #fff; padding: 36px 30px; }
.bpneo-mega-heading {
  color: #315d7c;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .7px;
  text-transform: uppercase;
  margin-bottom: 21px;
}
.bpneo-mega-left .bpneo-mega-heading { color: #82b5d8; }
.bpneo-mega-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 10px 0;
  margin-bottom: 7px;
  color: inherit;
  text-decoration: none;
}
.bpneo-mega-icon { width: 30px; flex: 0 0 30px; text-align: center; color: #a9cee8; font-size: 22px; }
.bpneo-mega-item-title { display: block; margin-bottom: 3px; font-size: 16px; font-weight: 600; }
.bpneo-mega-item-desc { display: block; color: #c6d5df; font-size: 13px; line-height: 1.4; }
.bpneo-mega-middle { min-width: 0; padding: 35px 30px; background: #fff; }
.bpneo-mega-search { position: relative; margin-bottom: 31px; }
#bpneo-mega-search-results {
  position: absolute;
  z-index: 5;
  top: 54px;
  left: 0;
  right: 0;
  display: none;
  max-height: 280px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #c8ccd1;
  border-radius: 4px;
  box-shadow: 0 8px 20px rgba(0,0,0,.12);
}
#bpneo-mega-search-results.show { display: block; }
.bpneo-mega-hit {
  display: block;
  padding: 10px 14px;
  color: #202122;
  text-decoration: none;
  font-size: 14px;
  border-bottom: 1px solid #eaecf0;
}
.bpneo-mega-hit:hover { background: #eaecf0; }
.bpneo-mega-empty { padding: 10px 14px; color: #72777d; font-size: 14px; }
body.bpneo-dark #bpneo-mega-search-results { background: #202122; border-color: #54595d; }
body.bpneo-dark .bpneo-mega-hit { color: #eaecf0; border-color: #54595d; }
body.bpneo-dark .bpneo-mega-hit:hover { background: #323438; }
.bpneo-mega-search input {
  width: 100%;
  height: 50px;
  box-sizing: border-box;
  padding: 0 105px 0 47px;
  border: 1px solid #c8ccd1;
  border-radius: 5px;
  background: #fff;
  color: #202122;
  font-family: inherit;
  font-size: 15px;
  outline: none;
}
.bpneo-mega-search input:focus { border-color: #36c; box-shadow: 0 0 0 1px #36c; }
.bpneo-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #72777d;
  font-size: 20px;
  pointer-events: none;
}
.bpneo-search-submit {
  position: absolute;
  right: 5px;
  top: 5px;
  height: 40px;
  padding: 0 17px;
  border: 0;
  border-radius: 3px;
  background: #202122;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.bpneo-useful-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 38px; row-gap: 3px; }
.bpneo-useful-link {
  display: block;
  padding: 9px 0;
  color: #3b4045;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}
.bpneo-useful-link:hover { color: #36c; }
.bpneo-useful-link small { display: block; margin-top: 3px; color: #72777d; font-size: 13px; font-weight: 400; }
.bpneo-mega-right { background: #f1f4f6; border-left: 1px solid #eaecf0; padding: 36px 30px; }
.bpneo-setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  box-sizing: border-box;
  border-bottom: 1px solid #dfe2e5;
  color: #202122;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
}
.bpneo-setting-left { display: flex; align-items: center; gap: 11px; }
.bpneo-setting-left > i { width: 22px; text-align: center; font-size: 19px; }
#bpneo-language-list-view { display: none; }
#bpneo-language-list-view.show { display: block; }
.bpneo-language-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #36c;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
}
.bpneo-language-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; max-height: 260px; overflow-y: auto; }
.bpneo-language-choice { display: block; padding: 7px 6px; border-radius: 3px; color: #202122; text-decoration: none; font-size: 14px; }
.bpneo-language-choice:hover,
.bpneo-language-choice.active { background: #eaecf0; color: #36c; }
.bpneo-toggle {
  position: relative;
  width: 45px;
  height: 24px;
  flex: 0 0 45px;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: #a2a9b1;
  cursor: pointer;
}
.bpneo-toggle::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transition: transform .18s ease;
}
.bpneo-toggle.is-dark { background: #36c; }
.bpneo-toggle.is-dark::after { transform: translateX(21px); }
.bpneo-font-options { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.bpneo-font-choice {
  min-width: 34px;
  height: 32px;
  padding: 0 7px;
  border: 1px solid #c8ccd1;
  border-radius: 3px;
  background: #fff;
  color: #202122;
  font-family: inherit;
  cursor: pointer;
}
.bpneo-font-choice:hover,
.bpneo-font-choice.is-active { border-color: #36c; color: #36c; background: #eaecf0; }
.bpneo-font-small { font-size: 12px; }
.bpneo-font-normal { font-size: 15px; }
.bpneo-font-large { font-size: 18px; }

#bpneo-preview-user-menu,
#bpneo-preview-info-popup {
  position: fixed;
  z-index: 1000001;
  display: none;
  background: #fff;
  color: #202122;
  border: 1px solid #c8ccd1;
  border-radius: 4px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
}
#bpneo-preview-user-menu { width: 300px; padding: 7px 0; }
#bpneo-preview-user-menu.show,
#bpneo-preview-info-popup.show { display: block; }
#bpneo-preview-info-popup { width: 320px; box-sizing: border-box; padding: 15px 17px 13px; font-size: 14px; line-height: 1.45; }
.bpneo-user-menu-section { padding: 6px 0; border-bottom: 1px solid #eaecf0; }
.bpneo-user-menu-section:last-child { border-bottom: 0; }
.bpneo-user-menu-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 40px;
  box-sizing: border-box;
  padding: 7px 15px;
  border: 0;
  background: transparent;
  color: #202122;
  font-family: inherit;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  text-align: left;
}
.bpneo-user-menu-item:hover { background: #eaecf0; }
.bpneo-user-menu-item > i { width: 20px; flex: 0 0 20px; text-align: center; font-size: 17px; }
.bpneo-user-menu-donate { color: #a52a2a; }
.bpneo-user-font-options { display: flex; align-items: center; gap: 3px; margin-left: auto; }
#bpneo-user-appearance-row { justify-content: flex-start; }
#bpneo-user-appearance-row > span { flex: 1; }
#bpneo-user-appearance-row .bpneo-toggle,
.bpneo-user-toggle { margin-left: auto; }
.bpneo-user-font-options .bpneo-font-choice { min-width: 30px; height: 29px; padding: 0 6px; }
.bpneo-info-title { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 8px; }
.bpneo-info-close { margin-left: auto; border: 0; background: transparent; color: inherit; font-size: 18px; cursor: pointer; }

body.bpneo-dark #bpneo-mega-menu,
body.bpneo-dark #bpneo-preview-user-menu,
body.bpneo-dark #bpneo-preview-info-popup { background: #202122; color: #eaecf0; border-color: #54595d; }
body.bpneo-dark .bpneo-mega-middle { background: #202122; }
body.bpneo-dark .bpneo-mega-right { background: #27292d; border-color: #54595d; }
body.bpneo-dark .bpneo-mega-search input { background: #27292d; border-color: #54595d; color: #eaecf0; }
body.bpneo-dark .bpneo-useful-link,
body.bpneo-dark .bpneo-setting,
body.bpneo-dark .bpneo-language-choice,
body.bpneo-dark .bpneo-user-menu-item,
body.bpneo-dark .bpneo-preview-btn,
body.bpneo-dark #bpneo-more-preview { color: #eaecf0; }
body.bpneo-dark .bpneo-preview-login { color: #88f; }
body.bpneo-dark .bpneo-useful-link small { color: #aaa; }
body.bpneo-dark .bpneo-setting,
body.bpneo-dark .bpneo-user-menu-section { border-color: #54595d; }
body.bpneo-dark .bpneo-font-choice { background: #27292d; border-color: #54595d; color: #eaecf0; }
body.bpneo-dark .bpneo-font-choice.is-active { background: #323438; border-color: #36c; }
body.bpneo-dark .bpneo-language-choice:hover,
body.bpneo-dark .bpneo-user-menu-item:hover,
body.bpneo-dark .bpneo-preview-btn:hover,
body.bpneo-dark #bpneo-more-preview:hover { background: #323438; }

@media (max-width: 800px) {
  #bpneo-mega-menu {
    top: 55px;
    width: calc(100vw - 16px);
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    grid-template-columns: 1fr;
  }
  .bpneo-mega-left,
  .bpneo-mega-middle,
  .bpneo-mega-right { padding: 24px; }
  .bpneo-useful-grid { grid-template-columns: 1fr; }
  .bpneo-preview-username { max-width: 100px; }
  .bpneo-preview-btn span { display: none; }
  .bpneo-preview-btn { width: 36px; padding: 0; }
}