
/* Custom popup system
--------------------------------*/
body.user-popup-open {
  overflow: hidden;
}
#user-popup-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 9998;
}
#user-popup-overlay.active {
  display: block;
}
.user-popup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  max-height: 90vh;
  overflow-y: auto;
}
.user-popup.active {
  display: block;
}
.user-popup-close {
  display: block;
  width: 40px;
  height: 40px;
  position: absolute;
  top: 4px;
  right: 4px;
  cursor: pointer;
  background: none;
  border: none;
}
.user-popup-close::before,
.user-popup-close::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 2px;
  background: #000;
}
.user-popup-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}
.user-popup-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* Shared popup box style
--------------------------------*/
.user-popup-box {
  padding: 20px 35px 30px;
  background: #fff;
  background-image: linear-gradient(to bottom, #fff 0%, #d6d6d6 100%);
  box-shadow: -7px 7px 9px rgba(0, 0, 0, 0.6);
  color: #000;
  font-family: "Avenir Next LT W01 Medium", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
}

/* Shared header (logo + title) */
.popup-header {
  display: flex;
  align-items: flex-end;
  margin-bottom: 18px;
}
.popup-logo {
  width: 55px;
  height: 55px;
  flex-shrink: 0;
  margin-bottom: 6px;
}
.popup-title {
  color: #d5ac29;
  font-size: 37px;
  font-family: "Code Pro W01", sans-serif;
  margin-left: 15px;
  line-height: 1;
}

/* Shared inputs */
.user-popup-box input[type="email"],
.user-popup-box input[type="password"],
.user-popup-box input[type="text"] {
  border: 1px solid #000;
  background: #fff;
  width: 100%;
  margin-bottom: 10px;
  font-size: 14px;
  padding: 4px 6px;
}
.user-popup-box input::placeholder {
  font-style: italic;
  color: #999;
}
.user-popup-box input[type="email"]:focus,
.user-popup-box input[type="password"]:focus,
.user-popup-box input[type="text"]:focus {
  border-color: #d5ac29;
  outline: none;
}

/* Shared button */
.popup-btn {
  text-decoration: none;
  display: block;
  font-family: "Code Pro W01", sans-serif;
  color: #fff;
  background: #d5ac29;
  line-height: 27px;
  border: none;
  text-align: center;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background .2s ease;
}
.popup-btn:hover {
  background: #000;
}
.popup-btn.inline {
  display: inline-block;
  padding: 0 10px;
  font-size: 14px;
}
.popup-btn.black {
  background: #000;
}
.popup-btn.black:hover {
  background: #d5ac29;
}

/* Shared submit wrap */
.popup-submit-wrap {
  text-align: center;
  margin-top: 30px;
}
.popup-submit-wrap .popup-btn {
  width: 55%;
  margin: 0 auto;
}

/* Shared error / message */
.popup-error {
  color: #e5281d;
  padding: 10px 0;
  display: none;
}
.popup-msg {
  color: green;
  padding: 10px 0;
  display: none;
}

/* Shared links */
.popup-link {
  color: #d5ac29;
  text-decoration: none;
}
.popup-link:hover {
  text-decoration: underline;
}

/* User login popup
--------------------------------*/
.user-login-popup {
  max-width: 380px;
  width: 90vw;
}
.user-login-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  margin-bottom: 10px;
}
.user-login-remember input[type="checkbox"] {
  appearance: none;
  width: 14px;
  height: 14px;
  border: 1px solid #000;
  background: #fff;
  cursor: pointer;
  flex-shrink: 0;
  margin-bottom: 0;
}
.user-login-remember input[type="checkbox"]:checked {
  box-shadow: inset 0 0 0 2px #fff;
  background: #777;
}
.user-login-remember label {
  cursor: pointer;
}
.user-login-links {
  text-align: center;
  margin-top: 8px;
}
.user-login-lost {
  color: #666;
  font-size: 0.9em;
  text-decoration: none;
}
.user-login-lost:hover {
  text-decoration: underline;
}
.user-login-signup {
  text-align: center;
  margin-top: 20px;
}

/* Lost password / Change password popup
--------------------------------*/
.user-lostpassword-popup,
.user-changepassword-popup {
  max-width: 380px;
  width: 90vw;
  text-align: center;
}
.user-lostpassword-text,
.user-changepassword-text {
  font-size: 16px;
  margin-bottom: 18px;
  text-align: left;
}
.user-lostpassword-back {
  text-align: center;
  margin-top: 20px;
}

/* User signup popup
--------------------------------*/
.user-signup-popup {
  max-width: 380px;
  width: 90vw;
}
.user-signup-text {
  font-size: 16px;
  margin-bottom: 18px;
}
.user-signup-terms {
  font-size: 14px;
  margin-top: 15px;
}
.user-signup-terms a {
  color: #d5ac29;
}
.user-signup-popup .popup-submit-wrap {
  margin-top: 15px;
}
.user-signup-login {
  text-align: center;
  margin-top: 20px;
}

/* User account popup
--------------------------------*/
.user-account-popup {
  max-width: 440px;
  width: 90vw;
  min-height: 400px;
  padding-bottom: 60px;
}

/* Toggle sections */
.user-account-section {
  margin-top: 10px;
}
.user-account-toggle {
  padding: 4px 0;
  text-transform: uppercase;
  cursor: pointer;
  border-bottom: 1px solid #000;
  margin-bottom: 2px;
  background-image: url(images/icon-plus.svg);
  background-position: right 10px center;
  background-size: 14px;
  background-repeat: no-repeat;
}
.user-account-section.active .user-account-toggle {
  background-image: url(images/icon-close.svg);
}
.user-account-content {
  display: none;
  color: #555;
  padding: 8px 10px 10px;
}
.user-account-section.active .user-account-content {
  display: block;
}

/* Profile form */
.user-account-content label {
  width: 100px;
  display: inline-block;
}
.user-account-content input[type="text"],
.user-account-content input[type="email"] {
  width: 280px;
}
.user-account-change-pwd {
  text-align: right;
}
.user-account-change-pwd a {
  color: #0db8ee;
  font-size: 0.9em;
}
.user-account-save {
  text-align: right;
  margin-top: 8px;
}
.user-account-msg {
  color: green;
  margin-top: 4px;
}

/* Mi Feed (personal premium stream URL) */
.user-account-feed {
  margin-top: 10px;
}
.user-account-feed-row {
  display: flex;
  gap: 8px;
  margin-top: 4px;
  align-items: stretch;
}
.user-account-feed-row .popup-btn {
  margin: 0;
  line-height: 1;
}
.user-account-feed-input {
  flex: 1;
  font-size: 13px;
  margin-bottom: 0 !important;
}

/* Upgrade / Cancel */
.user-account-upgrade,
.user-account-cancel {
  margin-top: 10px;
}
.user-account-cancel-msg {
  margin-top: 4px;
  font-size: 14px;
}

/* Logout */
.user-account-logout {
  text-align: right;
  position: absolute;
  right: 35px;
  bottom: 20px;
}

/* Premium popup
--------------------------------*/
.user-premium-popup {
  max-width: 540px;
  width: 90vw;
}
.user-premium-popup .popup-title {
  font-size: 28px;
}
.user-premium-text {
  font-size: 16px;
  margin-bottom: 20px;
}
.user-premium-billing {
  font-size: 15px;
  margin-bottom: 20px;
}
.user-premium-select {
  border: 1px solid #000;
  background: #fff;
  font-size: 16px;
  padding: 4px 6px;
  margin-top: 6px;
  width: 100%;
}
.user-premium-check {
  background: rgba(0, 0, 0, 0.05);
  padding: 10px;
  margin-bottom: 20px;
  font-size: 14px;
}
.user-premium-check input[type="checkbox"] {
  vertical-align: middle;
  margin-top: -2px;
  margin-right: 8px;
}
.user-premium-check a {
  color: #d5ac29;
}
.user-premium-paypal {
  text-align: center;
  min-height: 60px;
}
