/* Account hover panel (desktop) + enriched mobile user sheet */

.user-dropdown.user-dropdown--panel {
  min-width: 300px;
  width: 300px;
  max-width: calc(100vw - 24px);
  padding: 10px 0 0;
  background: transparent;
  border: none;
  box-shadow: none;
  top: 100%;
}

.user-dropdown.user-dropdown--panel .acc-menu {
  background: #fff;
  border: 1px solid #e8eaee;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.14);
  padding: 14px 0 8px;
  overflow: hidden;
}

.acc-menu-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 0 14px 14px;
}

.acc-menu-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
  display: grid;
  place-items: center;
}

.acc-menu-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.acc-menu-avatar--initials {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.acc-menu-head-text {
  min-width: 0;
  flex: 1;
}

.acc-menu-name-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.acc-menu-name {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acc-menu-edit {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  color: #d97809;
  text-decoration: none;
}

.acc-menu-edit:hover {
  text-decoration: underline;
}

.acc-menu-subline {
  margin-top: 3px;
  font-size: 12.5px;
  color: #6b7280;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* iOS Safari auto-links phone numbers — keep it as plain text in the sheet/panel */
.acc-menu-subline a,
.acc-menu-subline a[href^="tel"],
.acc-menu-subline a[x-apple-data-detectors] {
  color: inherit !important;
  text-decoration: none !important;
  font-weight: inherit !important;
  pointer-events: none;
}

.acc-menu-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 14px 12px;
}

.acc-menu-stat {
  display: block;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  padding: 9px 11px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.acc-menu-stat:hover {
  background: #ffedd5;
}

.acc-menu-stat__label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #9a3412;
  letter-spacing: 0.02em;
}

.acc-menu-stat__value {
  display: block;
  margin-top: 2px;
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acc-menu-stat__value.tier-REGULAR { color: #374151; }
.acc-menu-stat__value.tier-SILVER { color: #475569; }
.acc-menu-stat__value.tier-GOLD { color: #b45309; }
.acc-menu-stat__value.tier-PLATINUM { color: #6d28d9; }

.acc-menu-quick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  padding: 4px 8px 10px;
  border-top: 1px solid #f1f5f9;
}

.acc-menu-quick.has-redeem {
  grid-template-columns: repeat(3, 1fr);
}

.acc-menu-quick-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 4px 8px;
  color: #334155;
  text-decoration: none;
  border-radius: 10px;
  font-size: 11.5px;
  font-weight: 600;
  text-align: center;
}

.acc-menu-quick-item:hover {
  background: #f8fafc;
}

.acc-menu-quick-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff7ed;
  color: #c2410c;
}

.acc-menu-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid #f1f5f9;
  padding: 6px 6px 2px;
}

.acc-menu-link {
  display: block;
  padding: 10px 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  border-radius: 8px;
  font-family: inherit;
}

.acc-menu-link:hover {
  background: #f8fafc;
  color: #111827;
}

.user-dropdown .acc-menu-link--hub {
  display: none;
}

.acc-menu-link--logout {
  grid-column: 1 / -1;
  color: #b91c1c;
  font-weight: 600;
}

.acc-menu-link--logout:hover {
  background: #fef2f2;
  color: #991b1b;
}

/* Mobile sheet: same content, stacked links, scroll inside */
.mobile-user-sheet .mobile-user-sheet-content {
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mobile-user-sheet-content > .mobile-user-sheet-handle {
  flex-shrink: 0;
  margin: 10px auto 12px;
}

.mobile-user-sheet-content .acc-menu {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
  flex: 1;
  padding: 0 0 8px;
}

.mobile-user-sheet-content .acc-menu-head {
  padding: 0 20px 16px;
}

.mobile-user-sheet-content .acc-menu-avatar {
  width: 48px;
  height: 48px;
}

.mobile-user-sheet-content .acc-menu-name {
  font-size: 16px;
}

.mobile-user-sheet-content .acc-menu-stats {
  padding: 0 20px 14px;
}

.mobile-user-sheet-content .acc-menu-quick {
  padding: 8px 12px 12px;
}

.mobile-user-sheet-content .acc-menu-links {
  grid-template-columns: 1fr;
  padding: 6px 8px 4px;
}

.mobile-user-sheet-content .acc-menu-link {
  padding: 13px 12px;
  font-size: 15px;
}

@media (max-width: 640px) {
  .user-dropdown.user-dropdown--panel {
    width: min(300px, calc(100vw - 32px));
  }
}
