/**
 * Candee Theme 7 - Scoped Legacy PWA Floating UserBar & Accessibility Modal Bridge
 *
 * Extracted from scss/candee.scss (lines 1844-2578) and scss/magpop.scss.
 * Loaded ONLY when Theme 7 is active AND the site has `enable_pwa === 'on'`.
 * Contains zero global tag resets (no normalize.scss, no grid floats) so it never
 * pollutes WordPress parent/child themes (e.g. Jade / Pinnacle 2) or Theme 7 layout.
 */

/* --- 1. Magnific Popup Core (Scoped for UserBar Modals: Accessibility, Share, Geo, Download) --- */
.mfp-bg {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1042;
  overflow: hidden;
  position: fixed;
  background: #0b0b0b;
  opacity: 0.8;
}

.mfp-wrap {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  position: fixed;
  outline: none !important;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.mfp-container {
  text-align: center;
  position: absolute;
  width: 100%;
  height: 99.9% !important;
  left: 0;
  top: 0;
  padding: 0;
  box-sizing: border-box;
}

.mfp-container:before {
  content: '';
  display: inline-block;
  height: 100%;
  vertical-align: middle;
}

.mfp-align-top .mfp-container:before {
  display: none;
}

.mfp-content {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  margin: 0 auto;
  padding: 0;
  width: 100%;
  height: 100%;
  text-align: left;
  z-index: 1045;
}

.mfp-inline-holder .mfp-content,
.mfp-ajax-holder .mfp-content {
  width: 100%;
  cursor: auto;
}

.mfp-auto-cursor .mfp-content {
  cursor: auto;
  top: 50%;
  transform: translateY(-50%);
}

.mfp-close,
.mfp-arrow,
.mfp-preloader,
.mfp-counter {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

.mfp-hide {
  display: none !important;
}

button.mfp-close,
button.mfp-arrow {
  overflow: visible;
  cursor: pointer;
  background: transparent;
  border: 0;
  -webkit-appearance: none;
  appearance: none;
  display: block;
  outline: none;
  padding: 0;
  z-index: 1046;
  box-shadow: none;
  touch-action: manipulation;
}

.mfp-close {
  width: 17px;
  height: 44px;
  line-height: 44px;
  position: absolute;
  right: 10px !important;
  top: 0;
  text-decoration: none;
  text-align: center;
  opacity: 0.65;
  padding: 0 0 18px 10px;
  color: #999;
  font-style: normal;
  font-size: 1.8rem;
  font-family: Arial, Baskerville, monospace;
}

.mfp-close:hover,
.mfp-close:focus {
  opacity: 1;
}

.mfp-close-btn-in .mfp-close {
  color: #ffffff;
}

/* --- 2. Candee Floating Nav Bar (.candeeUserBar) --- */
.candeeUserBar {
  position: fixed;
  bottom: -15px;
  height: 100px;
  line-height: 24px;
  background: #f8f9fa;
  color: #444;
  width: 100%;
  text-align: center;
  z-index: 30;
  font-size: .7rem;
  box-shadow: 0 20px 20px rgba(0, 0, 0, 0.12), 0 -7px 12px rgba(0, 0, 0, 0.24);
  transition: all 0.3s cubic-bezier(.25, .8, .25, 1);
}

.userBarActive,
.userBarActive .fa,
.userBarActive .menuTitleText {
  color: #ffffff !important;
}

.userBarActive {
  background: #444 !important;
  color: #ffffff !important;
  transition: all 0s !important;
}

.userBarActive:after {
  content: '';
  top: -29px;
  left: 50%;
  position: absolute;
  z-index: 999999;
  width: 0;
  height: 0;
  border-left: 30px solid transparent;
  border-right: 30px solid transparent;
  border-bottom: 30px solid #444;
  margin-left: -30px;
}

.candeeMenuItem {
  text-align: center;
  padding: 10px 15px 0;
  display: inline-block;
  cursor: pointer;
  margin-right: 0%;
  width: 20%;
  margin-top: 0px;
  vertical-align: top;
  position: relative;
  text-decoration: none;
}

.userBarMag .userBarPop {
  animation: candeeUserBarPopper 0.3s;
}

@keyframes candeeUserBarPopper {
  0% {
    opacity: 0;
    margin-bottom: -300%;
  }
  100% {
    opacity: 1;
    margin-bottom: 0;
  }
}

.candeeMenuItem:hover {
  color: var(--candee-primary, #0f497d);
}

.candeeUserBar .candeeMenuItem {
  font-size: 1rem;
}

.candeeUserBar .candeeMenuItem .menuTitleText {
  padding: 0px;
  border: 0px;
  background: transparent;
  cursor: pointer;
}

.candeeUserBar .candeeMenuItem button {
  white-space: normal;
  line-height: 1.2rem;
}

.candeeUserBar .candeeMenuItem .fa {
  margin: 0px auto;
  text-align: center;
  color: #444;
  padding-right: 1px;
  width: 100%;
}

.candeeUserBar.candeeUserBarBottom {
  box-shadow: none;
  border-top: 1px solid #ddd;
}

/* --- 3. UserBar Popups (.userBarPop) --- */
.userBarPop.white-popup {
  max-width: 100% !important;
  width: 100%;
  background: #ffffff;
  margin: 0;
  border-top: 1px solid #888;
  border-bottom: 1px solid #888;
  padding: 20px 10% 70px;
  min-height: unset;
  position: fixed !important;
  box-sizing: border-box;
}

.userBarPop {
  position: absolute !important;
  left: 0;
  bottom: 70px;
}

.userBarMag .userBarPop {
  overflow: auto;
  max-height: 75%;
}

.mfp-bg.userBarMag {
  background: #000000 !important;
  position: fixed;
  top: unset;
  z-index: 1000;
}

.userBarMag .mfp-container {
  padding: 0px;
}

.userBarPop .userPopTitle {
  width: 100%;
  text-align: center;
  display: block;
  background: #ffffff;
  color: #222;
  text-transform: uppercase;
  font-weight: bold;
  border: 2px solid #222;
  border-top: 0px solid #ffffff;
  box-sizing: border-box;
}

.userBarPop .userPopIcon {
  width: 20%;
  float: left;
  padding: 0px 0px;
  margin-bottom: 20px;
  opacity: 0.7;
  box-sizing: border-box;
}

.userBarPop .userPopIcon i {
  font-size: 80px;
  padding: 40px 0;
  color: #ffffff;
  width: 100%;
  text-align: center;
}

.userBarPop .confirmationMessage {
  font-weight: bold;
}

.userBarPop .userPopDesc {
  width: 30%;
  float: left;
  padding: 0 20px;
  border-right: 1px solid #888;
  box-sizing: border-box;
}

.userBarPop .userPopSetting {
  width: 46%;
  float: left;
  padding: 0 20px;
  border-left: 1px solid #888;
  margin-left: -1px;
  box-sizing: border-box;
}

.userBarPop label {
  float: left;
  clear: left;
  width: 50%;
  text-align: right;
  margin-top: 11px;
}

.userBarPop button {
  float: right;
  width: 21%;
  min-width: 130px;
  margin-top: 58px !important;
  font-size: 0.9rem;
  padding: 0px 10px 0px;
  max-width: 200px;
}

.accessibility-settings button {
  clear: right;
  float: right !important;
  margin-top: 10px !important;
}

button.refreshACC {
  margin-top: 30px !important;
}

.userBarPop .mfp-close {
  float: right;
  clear: none;
  width: 40px !important;
  height: 40px !important;
  margin: 0 !important;
  font-size: 30px;
  top: 13px;
  right: 5px !important;
  color: #ffffff !important;
  background: #222;
  min-width: unset;
  text-align: center;
}

.userBarPop .fontResizer {
  margin-top: 11px;
  float: right;
}

/* --- 4. Candee User Bar Sidebar Theme (.candeeUserBarTheme-sidebar*) --- */
.candeeUserBar[class*="candeeUserBarTheme-sidebar"] {
  right: 0;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  height: auto;
  width: auto;
  background: #393736;
  border: 1px solid #dbdbdb;
  border-right: none;
  z-index: 999;
  transition: none !important;
}

.candeeUserBar[class*="candeeUserBarTheme-sidebar"][class*="candeeUserBarTheme-sidebar-left"] {
  right: unset;
  left: 0;
  border-right: 1px solid #dbdbdb;
  border-left: none;
}

.candeeUserBar[class*="candeeUserBarTheme-sidebar"][class*="candeeUserBarTheme-sidebar-bottom"] {
  right: unset;
  left: 0;
  bottom: 0;
  top: unset;
  border-right: 1px solid #dbdbdb;
  border-left: none;
}

@media (max-width: 450px) {
  .candeeUserBar[class*="candeeUserBarTheme-sidebar"].activeUserBarPopup {
    display: none;
  }
}

.candeeUserBar[class*="candeeUserBarTheme-sidebar"] #candeeUserBarAnchor {
  margin: 0;
  padding: 0;
  width: auto;
  min-width: 0;
}

.candeeUserBar[class*="candeeUserBarTheme-sidebar"] #candeeUserBarAnchor > a.candeeMenuItem {
  display: block;
  padding: 0;
  width: 40px;
  height: 40px;
  position: relative;
  border-bottom: 1px solid #dbdbdb;
}

.candeeUserBar[class*="candeeUserBarTheme-sidebar"] #candeeUserBarAnchor > a.candeeMenuItem.userBarActive:after {
  display: none;
}

.candeeUserBar[class*="candeeUserBarTheme-sidebar"] #candeeUserBarAnchor > a.candeeMenuItem:hover {
  background: rgba(0, 0, 0, 0.6);
}

.candeeUserBar[class*="candeeUserBarTheme-sidebar"] #candeeUserBarAnchor > a.candeeMenuItem:last-of-type {
  border-bottom: none;
}

.candeeUserBar[class*="candeeUserBarTheme-sidebar"] #candeeUserBarAnchor > a.candeeMenuItem .fa {
  padding: 0;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.1rem;
  color: #dbdbdb;
}

.candeeUserBar[class*="candeeUserBarTheme-sidebar"] #candeeUserBarAnchor > a.candeeMenuItem .fa.fa-map-marker {
  font-size: 1.3rem;
}

.candeeUserBar[class*="candeeUserBarTheme-sidebar"] #candeeUserBarAnchor > a.candeeMenuItem .menuTitleText {
  display: none;
}

body[class*="userBarActivePopup-sidebar"] .white-popup.userBarPop {
  bottom: unset;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 900px !important;
  max-width: calc(100% - 100px) !important;
  max-height: 90%;
  padding: 20px !important;
}

@media (max-width: 450px) {
  body[class*="userBarActivePopup-sidebar"] .white-popup.userBarPop {
    max-width: 100% !important;
    max-height: 100%;
  }
}

@media (max-width: 700px) {
  body[class*="userBarActivePopup-sidebar"] .white-popup.userBarPop i {
    padding-top: 2px;
  }
}

body[class*="userBarActivePopup-sidebar"] .white-popup.userBarPop .fadeInLeft {
  animation-name: none;
  opacity: 1;
}

body[class*="userBarActivePopup-sidebar"] .white-popup.userBarPop .confirmationButtonWrapper {
  display: flex;
}

body[class*="userBarActivePopup-sidebar"] .white-popup.userBarPop .confirmationButtonWrapper button {
  flex-grow: 1;
}

body[class*="userBarActivePopup-sidebar"] .white-popup.userBarPop label,
body[class*="userBarActivePopup-sidebar"] .white-popup.userBarPop .candee.numberPicker {
  float: none;
  text-align: left;
}

/* --- 5. Hide Sidebar on Small Screens (Toggle Controls) --- */
@media (min-width: 551px) {
  #pwaShowHide {
    display: none !important;
  }
}

.hiddenPWAToggle {
  display: none;
}

#candeePWAHide {
  display: none !important;
}

@media (max-width: 550px) {
  .hiddenPWAToggle-sidebar-left {
    display: inline-block;
    position: fixed;
    left: 0;
    top: 389px;
    z-index: 125;
    color: #393736;
    width: 36px;
    height: auto;
    border: 1px solid #dbdbdb;
  }

  .hiddenPWAToggle-sidebar-left.pwaIsOpen {
    display: none !important;
  }

  .hiddenPWAToggle-sidebar-left.locationSidebar {
    display: inline-block;
    position: fixed;
    left: 0;
    bottom: 40px;
    z-index: 125;
    color: #393736;
    width: 36px;
    height: auto;
    border: 1px solid #dbdbdb;
    top: unset !important;
  }

  .hiddenPWAToggle-sidebar-left.locationSidebar.pwaIsOpen {
    display: none !important;
  }

  #candeePWAHide {
    display: block !important;
  }

  .hiddenPWAToggle-sidebar-right {
    display: inline-block;
    position: fixed;
    right: 0;
    top: 389px;
    z-index: 125;
    color: #393736;
    rotate: 180deg;
    width: 36px;
    height: auto;
    border: 1px solid #dbdbdb;
  }

  .hiddenPWAToggle-sidebar-right.pwaIsOpen {
    display: none !important;
  }

  .pwaOpenIcon {
    color: white;
    position: relative;
    right: 5px;
    padding: 0 !important;
  }

  .candeeUserBarHide[class*="candeeUserBarTheme-sidebar"] {
    right: 0;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    height: auto;
    width: auto;
    background: #393736;
    border: 1px solid #dbdbdb;
    border-right: none;
    z-index: 91;
    transition: none !important;
  }

  .candeeUserBarHide[class*="candeeUserBarTheme-sidebar"].activeUserBarPopup[class*="candeeUserBarTheme-sidebar-right"] {
    right: 17px;
  }

  .candeeUserBarHide[class*="candeeUserBarTheme-sidebar"]&#candeePWAHide {
    display: inline-block !important;
  }

  .candeeUserBarHide[class*="candeeUserBarTheme-sidebar"][class*="candeeUserBarTheme-sidebar-right"].collapseOnMobile {
    right: -41px;
    left: unset;
    border-left: 1px solid #dbdbdb;
    border-right: none;
    transition: right .2s !important;
  }

  .candeeUserBarHide[class*="candeeUserBarTheme-sidebar"][class*="candeeUserBarTheme-sidebar-right"].collapseOnMobile.pwaIsOpen {
    right: 0px !important;
  }

  .candeeUserBarHide[class*="candeeUserBarTheme-sidebar"][class*="candeeUserBarTheme-sidebar-left"] {
    right: unset;
    left: -41px;
    border-right: 1px solid #dbdbdb;
    border-left: none;
    transition: left .2s !important;
  }

  .candeeUserBarHide[class*="candeeUserBarTheme-sidebar"][class*="candeeUserBarTheme-sidebar-left"].pwaIsOpen {
    left: 0px !important;
  }

  .candeeUserBarHide[class*="candeeUserBarTheme-sidebar"][class*="candeeUserBarTheme-sidebar-left"][class*="candeeUserBarTheme-sidebar-bottom"] {
    right: unset;
    left: 0;
    bottom: -41px;
    top: unset;
    border-right: 1px solid #dbdbdb;
    border-left: none;
  }

  .candeeUserBarHide[class*="candeeUserBarTheme-sidebar"][class*="candeeUserBarTheme-sidebar-left"] .pwaHideIcon {
    transform: rotate(180deg) !important;
    left: 0px !important;
    position: absolute !important;
    top: 11px !important;
  }

  .candeeUserBarHide[class*="candeeUserBarTheme-sidebar"][class*="candeeUserBarTheme-sidebar-left"].locationSidebar {
    top: 83%;
    right: unset;
    left: -41px;
    border-right: 1px solid #dbdbdb;
    border-left: none;
    transition: left .2s !important;
  }

  .candeeUserBarHide[class*="candeeUserBarTheme-sidebar"][class*="candeeUserBarTheme-sidebar-left"].locationSidebar.pwaIsOpen {
    left: 0px !important;
  }

  .candeeUserBarHide[class*="candeeUserBarTheme-sidebar"] .pwaHideBox {
    background-color: rgba(199, 31, 31, 0.5);
  }

  .candeeUserBarHide[class*="candeeUserBarTheme-sidebar"] .pwaHideBox:hover {
    background-color: rgba(199, 31, 31, 0.7) !important;
  }
}

/* --- 6. Responsive UserBar Popup & Accessibility NumberPicker --- */
.candee.numberPicker {
  position: relative;
  text-align: center;
  background-color: #f2f2f2;
  height: 25px;
  line-height: 25px;
  width: 100px;
  display: inline-block;
}

.candee.numberPicker a {
  text-decoration: none;
}

.userBarPop .ccMinus,
.userBarPop .ccPlus {
  position: absolute;
  height: 25px;
  line-height: 25px;
  left: 0px;
  background-color: #444;
  width: 25px;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

.userBarPop .ccPlus {
  right: 0px;
  left: auto;
}

.userBarPop .ccValue {
  width: 100%;
  text-align: center;
  font-size: 20px;
  color: #444;
}

.high-contrast {
  background-color: black !important;
  color: white !important;
}

.mfp-container.candee-flex-center {
  flex-direction: row !important;
}

.mfp-container.candee-flex-center .mfp-content {
  height: auto;
  transform: none;
  top: 0;
}

.mfp-container.candee-flex-center .mfp-content .white-popup {
  width: 600px;
  max-width: 95%;
}

@media screen and (max-width: 1200px) {
  .userBarPop.white-popup {
    padding: 20px 20px 70px;
  }
}

@media screen and (max-width: 1024px) {
  .userBarPop .userPopIcon {
    width: 15%;
    float: left;
    padding: 0px 0px;
    margin-left: 0px;
  }

  .userBarPop .userPopDesc {
    width: 35%;
    float: left;
    padding: 0 20px;
    border-right: 1px solid #888;
  }

  .userBarPop .userPopTitle {
    font-size: 0.9rem;
  }
}

@media (max-width: 768px) {
  .userBarPop .userPopDesc {
    width: 75%;
    float: left;
    padding: 0 20px;
    border-right: none;
  }

  .userBarPop .userPopIcon {
    width: 20%;
    float: left;
    padding: 0px 0px;
  }

  .userBarPop .userPopIcon i {
    font-size: 80px;
    padding: 10px 0;
    color: #fff;
    width: 100%;
    text-align: center;
  }

  .userBarPop .userPopBlurb {
    float: left;
    width: 100%;
    border-bottom: 1px solid #888;
    margin-bottom: 20px;
  }

  .userBarPop .userPopSetting {
    float: left;
    width: 100%;
    margin-bottom: 20px;
    border: none;
  }

  .userBarPop button {
    float: left;
    width: 20%;
    min-width: 100px;
    margin-top: 10px !important;
    font-size: 0.9rem;
    padding: 0px 10px 0px;
  }

  .userBarPop .confirmationButtonWrapper {
    margin-top: 20px;
  }
}

@media (max-width: 550px) {
  .userBarPop .userPopIcon {
    width: 100%;
    float: left;
    padding: 0px 0px;
    margin-left: 0px;
    background: none !important;
    border: none !important;
  }

  .userBarPop .userPopIcon i {
    font-size: 24px;
    height: 30px;
    float: left;
    width: 30px;
    margin-right: 10px;
    padding: 3px;
    background: #444;
  }

  .userBarPop .userPopDesc {
    width: 100%;
    float: left;
    padding: 0 20px;
  }

  .userBarPop .userPopTitle {
    font-size: 0.9rem;
    float: left;
    width: auto;
    height: 30px;
    background: none;
    color: #222;
    text-align: left;
    border: none;
  }

  .candeeUserBar:not([class*="candeeUserBarTheme-sidebar"]) .candeeMenuItem .menuTitleText {
    display: none;
  }

  .candeeUserBar:not([class*="candeeUserBarTheme-sidebar"]) .candeeMenuItem .menuTitle {
    padding-bottom: 40px;
  }

  .candeeUserBar:not([class*="candeeUserBarTheme-sidebar"]) .candeeMenuItem i {
    font-size: 1.5rem;
    padding: 15px 0 0 0;
  }
}

