/* Member login modal and nav entry (assets/js/modules/memberGate.js). Builds on .loginDiv in index.css. */

.member-login[hidden] {
  display: none;
}

/* Above the player, hover previews and the FB reel lightbox. */
.loginDiv.member-login {
  z-index: 100000;
}

.member-login-open {
  overflow: hidden;
}

.member-login .form-area .wrapper {
  position: relative;
  width: 365px;
  max-width: calc(100vw - 32px);
}

.member-login .form-area .wrapper h1 {
  margin-bottom: 8px;
}

.member-login__lead {
  margin: 0 0 20px;
  color: rgb(84, 105, 141);
  font-size: 13px;
}

.member-login__close {
  position: absolute;
  top: 8px;
  right: 12px;
  padding: 4px 8px;
  border: none;
  background: transparent;
  color: rgb(84, 105, 141);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.member-login .form-area .wrapper .form-wrapper .member-login__error {
  margin: 0 0 8px;
  color: #dc3545;
  font-size: 13px;
}

.member-login .form-area .wrapper .form-wrapper .member-login__error[hidden] {
  display: none;
}

.member-login .form-area .wrapper .form-wrapper .input-wrapper .login-button:disabled {
  opacity: 0.7;
  cursor: wait;
}

/* Tall forms (Create Account) scroll inside the backdrop on short screens instead of being cut off. */
.member-login .form-area {
  align-items: flex-start;
  justify-content: flex-start;
  overflow-y: auto;
  padding: 16px;
}

.member-login .form-area .wrapper {
  margin: auto;
}

.member-login [data-member-view][hidden] {
  display: none;
}

.member-login--register .form-area .wrapper {
  width: 505px;
  padding: 24px 28px;
}

.member-login .form-area .wrapper .form-wrapper .member-login__row {
  display: flex;
  gap: 14px;
  margin-bottom: 16px;
}

/* Margins don't collapse inside a flex row, so the row carries the spacing instead of its fields. */
.member-login .form-area .wrapper .form-wrapper .member-login__row .input-wrapper {
  flex: 1 1 0;
  min-width: 0;
  margin-top: 0;
  margin-bottom: 0;
}

.member-login .form-area .wrapper .form-wrapper .input-wrapper input,
.member-login .form-area .wrapper .form-wrapper .input-wrapper .login-button {
  font-family: inherit;
}

.member-login .form-area .wrapper .form-wrapper .input-wrapper input::placeholder {
  color: #a3acba;
}

.member-login .form-area .wrapper .form-wrapper .input-wrapper input:focus {
  border-color: #00a693;
}

/* Password field with the show/hide button inside it. */
.member-login .form-area .wrapper .form-wrapper .member-login__password {
  position: relative;
}

.member-login .form-area .wrapper .form-wrapper .member-login__password input {
  padding-right: 44px;
}

.member-login .form-area .wrapper .form-wrapper .member-login__eye {
  position: absolute;
  top: 50%;
  right: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  background: transparent;
  color: rgb(84, 105, 141);
  cursor: pointer;
  transform: translateY(-50%);
}

.member-login .form-area .wrapper .form-wrapper .member-login__eye svg {
  width: 20px;
  height: 20px;
}

.member-login .form-area .wrapper .form-wrapper .member-login__eye svg[hidden] {
  display: none;
}

.member-login .form-area .wrapper .form-wrapper .member-login__or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  color: #a3acba;
  font-size: 12px;
}

.member-login .form-area .wrapper .form-wrapper .member-login__or::before,
.member-login .form-area .wrapper .form-wrapper .member-login__or::after {
  content: "";
  flex: 1;
  border-top: 1px solid rgb(216, 221, 230);
}

.member-login .form-area .wrapper .form-wrapper .member-login__or span {
  width: auto;
}

.member-login .form-area .wrapper .form-wrapper .input-wrapper .text-center span,
.member-login .form-area .wrapper .form-wrapper .input-wrapper .text-center a {
  font-size: 13px;
}

.member-login .form-area .wrapper .form-wrapper .input-wrapper .text-center span {
  display: inline;
  color: rgb(84, 105, 141);
}

.member-login .form-area .wrapper .form-wrapper .member-login__text {
  margin: 0 0 12px;
  color: rgb(84, 105, 141);
  font-size: 14px;
  line-height: 1.6;
}

.member-login .form-area .wrapper .form-wrapper .member-login__text strong {
  display: inline;
  color: #33415c;
  overflow-wrap: anywhere;
}

.member-login .form-area .wrapper .form-wrapper .member-login__muted {
  font-size: 13px;
  color: #8a96a8;
}

.member-login .form-area .wrapper .form-wrapper .member-login__notice {
  margin: 0 0 8px;
  color: #0a7d6e;
  font-size: 13px;
}

.member-login .form-area .wrapper .form-wrapper .member-login__notice[hidden] {
  display: none;
}

.member-login .form-area .wrapper .form-wrapper .member-login__forgot {
  margin-top: 8px;
  text-align: right;
}

.member-login .form-area .wrapper .form-wrapper .member-login__forgot a {
  color: #00a693;
  font-size: 13px;
  font-weight: 600;
}

.member-login .form-area .wrapper .form-wrapper .member-login__captcha:not(:empty) {
  margin: 4px 0 8px;
  min-height: 65px;
}

/* Spam trap: off screen, not display:none (some bots skip hidden inputs). */
.member-login .form-area .wrapper .form-wrapper .member-login__hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 480px) {
  .member-login--register .form-area .wrapper {
    padding: 20px 16px;
  }

  .member-login .form-area .wrapper .form-wrapper .member-login__row {
    flex-direction: column;
    gap: 16px;
  }
}

/* The header sets a 75px line-height for its links; the member entry keeps its own. */
.member-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  list-style: none;
  line-height: 1.4;
}

.member-nav__name {
  color: #fff;
  font-size: 14px;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-nav__name[hidden],
.member-nav__btn[hidden] {
  display: none;
}

.member-nav__btn {
  padding: 6px 14px;
  border: 1px solid #0ab39f;
  border-radius: 4px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  cursor: pointer;
}

.member-nav__btn:hover,
.member-nav__btn:focus-visible {
  background: #0ab39f;
}

/* Desktop: "Hi, Name" with My Activity and Logout in a small menu under it (memberGate.js setMenu).
   A mouse opens it on hover; a tap, click or Enter toggles .is-open. */
.member-menu {
  position: relative;
}

.member-menu[hidden] {
  display: none;
}

.member-menu__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 220px;
  min-height: 40px;
  padding: 4px 10px 4px 4px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 14px;
  line-height: 1.2;
  cursor: pointer;
}

.member-menu__toggle:hover,
.member-menu.is-open .member-menu__toggle {
  border-color: #1b243c;
  background: #131a2b;
}

.member-menu__toggle:focus-visible {
  outline: 2px solid #0ab39f;
  outline-offset: 2px;
}

.member-menu__avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #0ab39f;
  color: #0c0e17;
  font-size: 14px;
  font-weight: 700;
}

.member-menu__hi {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-menu__caret {
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 150ms ease;
}

.member-menu.is-open .member-menu__caret {
  transform: rotate(180deg);
}

/* The panel sits right under the name; padding-top bridges the gap so the hover does not drop on the way down. */
.member-menu__panel {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1001;
  display: none;
  min-width: 100%;
  padding-top: 6px;
}

.member-menu.is-open .member-menu__panel {
  display: block;
}

@media (hover: hover) {
  .member-menu:hover .member-menu__panel {
    display: block;
  }
  .member-menu:hover .member-menu__caret {
    transform: rotate(180deg);
  }
}

.member-menu__list {
  min-width: 180px;
  padding: 6px;
  border: 1px solid #1b243c;
  border-radius: 8px;
  background: #0c0e17;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
}

.member-menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
}

.member-menu__item svg {
  flex: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #0ab39f;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.member-menu__item:hover,
.member-menu__item:focus-visible {
  background: #1b243c;
  outline: none;
}

.member-menu__item:focus-visible {
  box-shadow: inset 0 0 0 2px #0ab39f;
}

.member-menu__item + .member-menu__item {
  margin-top: 2px;
}

.member-menu__item[hidden] {
  display: none;
}

/* The mobile entry lives in the burger menu; the desktop one in the header bar. */
.member-nav--mobile {
  display: none;
}

/* Same breakpoint where index.css hides header nav .login. */
@media (max-width: 576px) {
  header nav .nav-links .member-nav--mobile {
    display: flex;
    line-height: normal;
  }
}

/* My Activity (analytic.js, views/index.php #recently-section): one timeline, grouped by day. */
.history-empty {
  margin: 10px 0 40px;
  color: rgba(241, 241, 241, 0.8);
}

.activity-summary {
  margin: -0.4rem 0 1rem;
  color: rgba(241, 241, 241, 0.75);
  font-size: 14px;
}

.activity-feed {
  max-width: 820px;
}

.activity-day__label {
  margin: 18px 0 6px;
  color: #0ab39f;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.activity-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.activity-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.activity-row__icon {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(148, 156, 176, 0.22);
  color: #fff;
  font-size: 13px;
}

.activity-row--signup .activity-row__icon,
.activity-row--member .activity-row__icon,
.activity-row--joined .activity-row__icon {
  background: #0ab39f;
}

.activity-row__body {
  flex: 1 1 auto;
  min-width: 0;
}

.activity-row__action {
  margin: 0 0 6px;
  color: #fff;
  font-size: 14px;
  line-height: 34px;
}

.activity-row__time {
  display: inline-block;
  min-width: 72px;
  color: rgba(241, 241, 241, 0.6);
  font-size: 13px;
}

.activity-row__detail {
  margin: -6px 0 0 72px;
  color: rgba(241, 241, 241, 0.7);
  font-size: 13px;
}

.activity-row__item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 72px;
  color: #fff;
  text-decoration: none;
}

.activity-row__item:hover,
.activity-row__item:focus-visible {
  color: #0ab39f;
  text-decoration: none;
}

.activity-row__thumb {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  color: rgba(241, 241, 241, 0.6);
}

.activity-row__thumb--wide {
  flex-basis: 112px;
  width: 112px;
}

.activity-row__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Directory website logos: whole logo on a light tile, like the Directory cards. */
.activity-row__thumb--logo {
  background: #f1f1f1;
  color: #2f4d7a;
  font-size: 22px;
}

.activity-row__thumb--logo img {
  padding: 8px;
  object-fit: contain;
}

.activity-row__domain {
  display: block;
  margin-top: 2px;
  color: rgba(241, 241, 241, 0.6);
  font-size: 12px;
  font-weight: 400;
}

.activity-row__title {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
}

.activity-row__actions {
  display: flex;
  gap: 8px;
  padding-top: 2px;
}

.recently-section .activity-row__actions button {
  width: 30px;
  height: 30px;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  font-size: 12px;
}

.activity-more {
  max-width: 820px;
  padding: 24px 0 60px;
  text-align: center;
}

.recently-section .activity-more__btn {
  margin: 0;
  padding: 8px 28px;
  border: 1px solid #0ab39f;
  background: transparent;
  color: #fff;
}

.recently-section .activity-more__btn:hover {
  background: #0ab39f;
}

.activity-end {
  margin: 0;
  color: rgba(241, 241, 241, 0.55);
  font-size: 13px;
}

@media (max-width: 576px) {
  .activity-row {
    gap: 10px;
  }

  .activity-row__time {
    display: block;
    min-width: 0;
    line-height: 1.2;
  }

  .activity-row__action {
    line-height: 1.3;
  }

  .activity-row__detail,
  .activity-row__item {
    margin: 0;
  }

  .activity-row__thumb {
    flex-basis: 48px;
    width: 48px;
    height: 48px;
  }

  .activity-row__thumb--wide {
    flex-basis: 80px;
    width: 80px;
  }

  .activity-row__actions {
    flex-direction: column;
  }
}
