/* ============================================================
   profile.css — Profile Dashboard Page (/profile)
   Namespace prefix: boh-profile
   ============================================================ */

.boh-profile {
  display: flex;
  flex-direction: column;
  height: 100%;
  font-family: var(--boh-font-sans);
}

.boh-profile__tier-rank {
  position: absolute;
  top: 3.45rem;
  right: 0;
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  max-width: min(190px, calc(100% - 5rem));
  padding: 0.45rem 0.85rem 0.45rem 0.65rem;
  border-top-left-radius: 9999px;
  border-bottom-left-radius: 9999px;
  background: var(--boh-color-surface);
  color: var(--boh-color-primary);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  z-index: 2;
}

.boh-profile__tier-rank-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.boh-profile__tier-rank-icon svg {
  width: 0.95rem;
  height: 0.95rem;
}

.boh-profile__tier-rank-content {
  min-width: 0;
}

.boh-profile__tier-rank-label {
  margin: 0;
  font-size: 11px;
  line-height: 1.15;
  font-weight: var(--boh-font-weight-700);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.boh-profile__tier-rank-value {
  margin: 0.08rem 0 0 0;
  font-size: 10px;
  line-height: 1.2;
  font-weight: var(--boh-font-weight-600);
  opacity: 0.85;
  white-space: nowrap;
}

.boh-profile__tier-rank[data-tier="BRONZE"] {
  color: #6d3f20;
}

.boh-profile__tier-rank[data-tier="SILVER"] {
  color: #2f4a5d;
}

.boh-profile__tier-rank[data-tier="GOLD"] {
  color: #6b4b00;
}

.boh-profile__tier-rank[data-tier="PLATINUM"] {
  color: #24544f;
}

.boh-profile__tier-rank[data-tier="DIAMOND"] {
  color: #194d74;
}

.boh-profile__tier-rank[data-tier="VIP"] {
  color: #6a1a4f;
}

/* Profile Card (Signed In) */
.boh-profile__card {
  background-color: var(--boh-color-deep-bg); /* #15362F or #1A3B35 */
  border-radius: var(--boh-radius-16);
  padding: 1.25rem;
  position: relative;
  box-shadow: var(--boh-shadow-card);
  margin-bottom: 1rem;
}

.boh-profile__qr-btn {
  position: absolute;
  top: 1rem;
  right: 0;
  background-color: var(--boh-color-surface);
  border-top-left-radius: 9999px;
  border-bottom-left-radius: 9999px;
  padding: 0.5rem 1rem 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.boh-profile__qr-btn:active {
  transform: scale(0.95);
}

.boh-profile__qr-btn svg {
  width: 1rem;
  height: 1rem;
  color: var(--boh-color-primary);
}

.boh-profile__qr-text {
  color: var(--boh-color-primary);
  font-weight: var(--boh-font-weight-700);
  font-size: 12px;
}

.boh-profile__avatar-container {
  position: relative;
  display: inline-block;
}

.boh-profile__avatar-wrapper {
  width: 5rem;
  height: 5rem;
  border-radius: 9999px;
  overflow: hidden;
  border: 2px solid var(--boh-color-surface);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.boh-profile__avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.boh-profile__camera-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 1.5rem;
  height: 1.5rem;
  background-color: var(--boh-color-primary);
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--boh-color-surface);
  border: 2px solid var(--boh-color-surface);
  cursor: pointer;
}

.boh-profile__camera-btn svg {
  width: 0.75rem;
  height: 0.75rem;
}

.boh-profile__info {
  flex: 1;
  min-width: 0;
  padding-right: 7rem; /* Safe space for QR + tier chips */
}

.boh-profile__name {
  font-weight: var(--boh-font-weight-700);
  color: var(--boh-color-surface);
  font-size: 18px;
  margin: 0 0 0.125rem 0;
  line-height: 1.3;
}

.boh-profile__email {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  margin: 0 0 0.5rem 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.boh-profile__view-link {
  color: var(--boh-color-surface);
  font-weight: var(--boh-font-weight-700);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
}

/* Guest Card (Signed Out) */
.boh-profile__guest-card {
  background-color: color-mix(in srgb, var(--boh-color-primary) 8%, var(--boh-color-surface)); /* Light tinted background */
  border-radius: var(--boh-radius-16);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--boh-shadow-card);
  margin-bottom: 1rem;
}

.boh-profile__guest-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.boh-profile__guest-avatar-wrapper {
  width: 4rem;
  height: 4rem;
  background-color: var(--boh-color-surface);
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(38, 86, 77, 0.04);
}

.boh-profile__guest-avatar-text {
  color: var(--boh-color-primary);
  font-weight: var(--boh-font-weight-700);
  font-size: 24px;
}

.boh-profile__guest-name {
  font-weight: var(--boh-font-weight-700);
  color: var(--boh-color-primary);
  font-size: 18px;
  margin: 0;
  line-height: 1.2;
}

.boh-profile__guest-subtitle {
  color: color-mix(in srgb, var(--boh-color-muted) 70%, transparent);
  font-size: 13px;
  margin: 0.125rem 0 0 0;
}

.boh-profile__signin-btn {
  background-color: var(--boh-color-primary);
  color: var(--boh-color-surface);
  font-weight: var(--boh-font-weight-700);
  font-size: 13px;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(38, 86, 77, 0.1);
  transition: transform 0.15s ease;
  text-decoration: none;
}

.boh-profile__signin-btn:active {
  transform: scale(0.95);
}

/* Menu Items list */
.boh-profile__menu {
  display: flex;
  flex-direction: column;
}

.boh-profile__menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--boh-color-border) 10%, transparent);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  cursor: pointer;
  transition: opacity 0.15s ease;
  text-decoration: none;
  /* Match <a> items — native <button> defaults look bolder/darker */
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
}

.boh-profile__menu-item:last-child {
  border-bottom: none;
}

.boh-profile__menu-item:active {
  opacity: 0.7;
}

.boh-profile__menu-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.boh-profile__menu-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--boh-color-primary);
}

.boh-profile__menu-label {
  color: var(--boh-color-primary);
  font-weight: var(--boh-font-weight-700);
  font-size: var(--boh-font-size-label);
}

.boh-profile__menu-chevron {
  width: 1rem;
  height: 1rem;
  color: color-mix(in srgb, var(--boh-color-muted) 30%, transparent);
}

/* Logout Button */
.boh-profile__logout-wrapper {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.boh-profile__logout-btn {
  width: 100%;
  background-color: var(--boh-color-surface);
  color: var(--boh-color-danger);
  font-weight: var(--boh-font-weight-700);
  font-size: var(--boh-font-size-btn);
  padding: 1rem 0;
  border-radius: var(--boh-radius-button);
  border: none;
  box-shadow: var(--boh-shadow-card);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.boh-profile__logout-btn:active {
  transform: scale(0.98);
}

/* Header styling */
.boh-profile__header {
  padding: 2.5rem var(--boh-space-screen) 0.625rem var(--boh-space-screen);
  flex-shrink: 0;
  background-color: var(--boh-color-bg);
  position: relative;
  z-index: 10;
}

.boh-profile__header-content {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.boh-profile__header-back {
  padding: 0.5rem;
  margin-left: -0.5rem;
  color: var(--boh-color-primary);
  position: absolute;
  left: 0;
  display: flex;
  align-items: center;
  text-decoration: none;
}

.boh-profile__header-back svg {
  width: 1.5rem;
  height: 1.5rem;
}

.boh-profile__header-title {
  font-family: var(--boh-font-sans);
  font-weight: var(--boh-font-weight-700);
  color: var(--boh-color-primary);
  font-size: var(--boh-font-size-navtitle);
  margin: 0;
}

/* Card Content wrapper */
.boh-profile__card-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* QR Modal Dialog overlay styling */
.boh-profile__modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.boh-profile__modal-overlay--open {
  display: flex;
}

.boh-profile__modal-container {
  width: 100%;
  max-width: 320px;
  background-color: var(--boh-color-primary);
  border-radius: 24px;
  padding: 1.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  position: relative;
}

.boh-profile__modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background-color: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--boh-color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.boh-profile__modal-close:active {
  transform: scale(0.9);
}

.boh-profile__modal-close svg {
  width: 1.25rem;
  height: 1.25rem;
}

.boh-profile__modal-header {
  text-align: center;
  margin-bottom: 1.25rem;
}

.boh-profile__modal-eyebrow {
  color: rgba(255, 255, 255, 0.7);
  font-size: 10px;
  font-weight: var(--boh-font-weight-700);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 0.25rem 0;
}

.boh-profile__modal-title {
  font-family: var(--boh-font-serif);
  color: var(--boh-color-surface);
  font-size: 20px;
  font-weight: var(--boh-font-weight-600);
  margin: 0;
  line-height: 1.2;
}

.boh-profile__modal-desc {
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  margin: 0.25rem 0 0 0;
}

.boh-profile__modal-qr-wrapper {
  display: flex;
  justify-content: center;
}

.boh-profile__modal-qr-box {
  background-color: var(--boh-color-surface);
  padding: 0.75rem;
  border-radius: var(--boh-radius-16);
}

.boh-profile__modal-qr-box img {
  width: 180px;
  height: 180px;
  display: block;
}

.boh-profile__modal-code {
  text-align: center;
  color: var(--boh-color-surface);
  font-weight: var(--boh-font-weight-700);
  font-size: 15px;
  letter-spacing: 0.15em;
  margin: 1rem 0 0 0;
}
