/*
 * Styles for the light/dark toggle button that webpay-theme-toggle.js adds to the top bar. Neutral on purpose: it takes
 * its colour from the surrounding text so it reads on every variant, and a variant can refine it (it loads before the overlay).
 */
.webpay-theme-li {
  float: left;
  list-style: none;
}
/* Ace draws a white vertical divider left of every top-bar item; with round buttons beside the pill they read as stray lines. Minimal already removes them; this does it for every style. */
#navbar .ace-nav > li { border: 0; }
#navbar .ace-nav { background: transparent; } /* Ace tints the whole list grey on phone widths */
/* Bank (PayTo) and WeChat carry a caption ("Pay with PayTo", the WeChat snippet text) above their button in the markup; flex order puts it below in every style. */
:is(.payto-div, .wechat-div) > .col-xs-12 { display: flex; flex-direction: column; }
:is(.payto-div, .wechat-div) > .col-xs-12 > .form-group { order: 1; margin-bottom: 6px; }
:is(.payto-div, .wechat-div) > .col-xs-12 > .col-xs-12 { order: 2; }
/* The pill is 44px tall but Ace opens its menu about 6px above the pill's bottom edge, covering the "Guest" line. */
#navbar .ace-nav > li > .dropdown-menu { top: 100%; margin-top: 6px; }
.webpay-theme-toggle {
  position: relative;
  width: 34px;
  height: 34px;
  margin: 5px 8px 0 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(128, 128, 128, .45);
  border-radius: 50%;
  background: rgba(128, 128, 128, .14);
  color: inherit;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: background-color .15s ease, transform .12s ease;
}
.webpay-theme-toggle:hover { background: rgba(128, 128, 128, .28); }
.webpay-theme-toggle:active { transform: scale(.94); }
.webpay-theme-toggle:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.webpay-theme-toggle .fa { color: inherit; }

/* Instant tooltip: a native title="" waits about a second before it shows, so the text sits in data-tip and appears on hover or keyboard focus. */
.webpay-theme-toggle[data-tip]:is(:hover, :focus-visible)::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1100;
  width: max-content;
  max-width: 280px;
  padding: 8px 10px;
  border-radius: 6px;
  background: #1c2230;
  color: #fff;
  font: 400 12px/1.4 "Open Sans", "Segoe UI", Arial, sans-serif;
  text-align: left;
  white-space: normal;
  pointer-events: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
}

/* On/off state of the preview buttons (webpay-theme-toggle.js sets aria-pressed): filled green while their layout is on, the neutral grey when off.
   The extra classes outrank a variant's own button colours, which load later. */
.webpay-theme-li .webpay-theme-toggle[aria-pressed="true"],
.webpay-theme-li .webpay-theme-toggle[aria-pressed="true"]:hover {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}
.webpay-theme-li .webpay-theme-toggle[aria-pressed="true"]:hover { background: #15803d; }
