/* FILE: assets/css/profile.css */

.profile-btn {
  margin-left: 6px;
}

.profile-btn.hidden {
  display: none !important;
}

/* MEMBER ACCOUNT POPUP */
.member-account-popup {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.member-account-popup.hidden {
  display: none !important;
}

.member-account-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(6px);
}

.member-account-panel {
  position: relative;
  z-index: 2;
  width: min(720px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: 18px;
  border: 1px solid rgba(47,129,247,.48);
  background:
    radial-gradient(circle at top, rgba(17,24,39,.98), rgba(5,7,10,.98));
  box-shadow:
    0 0 24px rgba(47,129,247,.18),
    0 20px 70px rgba(0,0,0,.62);
}

.member-account-close {
  position: absolute;
  top: 6px;
  right: 14px;
  z-index: 20;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,59,48,.18);
  color: #ffffff;
  font-size: 28px;
  line-height: 1;
  font-weight: 900;
  cursor: pointer;
}

.member-account-close:hover {
  background: rgba(255,59,48,.30);
}

.member-account-content {
  padding: 18px;
}

.member-account-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 3px 54px 8px;
  margin-bottom: 16px;
  text-align: center;
}

.member-account-header::after {
  content: "";
  position: absolute;
  left: -14px;
  right: -14px;
  bottom: 0;
  height: 2px;
  background: linear-gradient(to right, transparent, rgba(47,129,247,.95), transparent);
  box-shadow:
    0 0 6px rgba(47,129,247,.85),
    0 0 12px rgba(47,129,247,.55);
  animation: memberHeaderLinePulse 2.4s ease-in-out infinite;
}

.member-account-header strong {
  display: block;
  width: 100%;
  margin: 0;
  color: #ffffff;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  letter-spacing: .55px;
  text-shadow:
    0 0 5px rgba(255,255,255,.42),
    0 0 9px rgba(47,129,247,.65),
    0 0 18px rgba(47,129,247,.32);
  animation: memberTitleGlow 2.8s ease-in-out infinite;
}

.member-account-header small {
  display: none;
}

@keyframes memberTitleGlow {
  0%,
  100% {
    text-shadow:
      0 0 4px rgba(255,255,255,.36),
      0 0 8px rgba(47,129,247,.50),
      0 0 16px rgba(47,129,247,.24);
  }

  50% {
    text-shadow:
      0 0 7px rgba(255,255,255,.65),
      0 0 14px rgba(47,129,247,.92),
      0 0 28px rgba(47,129,247,.48);
  }
}

@keyframes memberHeaderLinePulse {
  0%,
  100% {
    opacity: .68;
    box-shadow:
      0 0 5px rgba(47,129,247,.65),
      0 0 10px rgba(47,129,247,.38);
  }

  50% {
    opacity: 1;
    box-shadow:
      0 0 8px rgba(47,129,247,.95),
      0 0 18px rgba(47,129,247,.68);
  }
}

.member-profile-row {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 18px;
  align-items: start;
}

.member-profile-image-wrap {
  width: 100%;
}

.member-profile-image-preview {
  position: relative;
  width: 150px;
  height: 150px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  border-radius: 18px;
  border: 1px solid rgba(47,129,247,.55);
  background:
    radial-gradient(circle at center, rgba(47,129,247,.22), rgba(5,7,10,.82));
  box-shadow:
    inset 0 0 18px rgba(47,129,247,.10),
    0 0 18px rgba(47,129,247,.20);
  overflow: hidden;
}

.member-avatar-large {
  width: 128px;
  height: 128px;
  object-fit: contain;
  border-radius: 16px;
  filter:
    drop-shadow(0 0 6px rgba(47,129,247,.45))
    drop-shadow(0 0 14px rgba(47,129,247,.28));
}

.member-avatar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
}

.member-avatar-option {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(47,129,247,.26);
  background:
    radial-gradient(circle at center, rgba(47,129,247,.16), rgba(5,7,10,.76));
  cursor: pointer;
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    border-color .18s ease,
    background .18s ease;
}

.member-avatar-option img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 0 5px rgba(47,129,247,.28));
}

.member-avatar-option:hover {
  transform: translateY(-1px);
  border-color: rgba(47,129,247,.68);
  background:
    radial-gradient(circle at center, rgba(47,129,247,.24), rgba(5,7,10,.82));
  box-shadow: 0 0 14px rgba(47,129,247,.24);
}

.member-avatar-option.selected {
  border-color: rgba(255,204,0,.95);
  box-shadow:
    0 0 10px rgba(255,204,0,.34),
    0 0 18px rgba(47,129,247,.24);
}

.member-details-wrap {
  min-width: 0;
}

.member-detail-line {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.member-detail-line:first-child {
  padding-top: 0;
}

.member-detail-line:last-child {
  border-bottom: 0;
}

.member-detail-line label {
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .3px;
  text-shadow: 0 0 6px rgba(47,129,247,.35);
}

.member-detail-line input {
  min-width: 0;
  width: 100%;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid rgba(47,129,247,.24);
  background: rgba(5,7,10,.58);
  color: #f2f6ff;
  font-size: 14px;
  outline: none;
}

.member-detail-line input::placeholder {
  color: rgba(188,212,245,.55);
}

.member-detail-line input:focus {
  border-color: rgba(47,129,247,.75);
  box-shadow: 0 0 12px rgba(47,129,247,.24);
}

.member-change-btn {
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(47,129,247,.42);
  background: rgba(47,129,247,.16);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .3px;
  cursor: pointer;
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    background .18s ease;
}

.member-change-btn:hover {
  transform: translateY(-1px);
  background: rgba(47,129,247,.26);
  box-shadow: 0 0 14px rgba(47,129,247,.28);
}

/* ROLE DISPLAY BOX */
.member-role-display {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;

  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;

  background: rgba(5,7,10,.58);
  border: 1px solid rgba(255,255,255,.38);

  box-shadow:
    0 0 8px rgba(255,255,255,.28),
    0 0 16px rgba(255,255,255,.16),
    inset 0 0 8px rgba(255,255,255,.05);
}

.member-role-label {
  color: rgba(255,255,255,.86);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .35px;
  text-shadow: 0 0 6px rgba(255,255,255,.22);
}

.member-role-value,
.member-role-text {
  color: #ffcc00;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .45px;
  text-shadow:
    0 0 6px rgba(255,204,0,.42),
    0 0 12px rgba(255,204,0,.24);
}

.member-role-line {
  grid-template-columns: 92px 1fr;
}

.member-account-warning {
  margin-top: 18px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,59,48,.22);
  background: rgba(255,59,48,.08);
  color: #ffd2d2;
  text-align: center;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 900;
  letter-spacing: .25px;
}

#memberAccountMsg {
  margin-top: 12px;
  color: #bcd4f5;
  font-size: 12px;
  text-align: center;
}

/* MOBILE */
@media (max-width: 720px) {
  .member-account-popup {
    padding: 18px;
  }

  .member-account-panel {
    width: min(100%, calc(100vw - 36px));
  }

  .member-account-header {
    padding: 5px 48px 9px;
  }

  .member-account-header strong {
    font-size: 13px;
    letter-spacing: .35px;
  }

  .member-profile-row {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .member-profile-image-wrap {
    width: min(100%, 280px);
  }

  .member-avatar-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .member-details-wrap {
    width: 100%;
  }

  .member-detail-line,
  .member-role-line {
    grid-template-columns: 1fr;
  }

  .member-role-display {
    width: 100%;
    box-sizing: border-box;
  }

  .member-change-btn {
    width: 100%;
  }
}