/* ================================================================
   Aurum Account Widget  v2.0  —  Frontend Styles
   ================================================================ */

/* ── Variables ─────────────────────────────────────────────────── */
.aurum-acct-wrap {
  --aurum-accent:      #c8a96e;
  --aurum-accent-dim:  rgba(200,169,110,.10);
  --aurum-text:        #1a1a1a;
  --aurum-muted:       #888;
  --aurum-border:      #e8e8e8;
  --aurum-input-bg:    #f8f8f7;
  --aurum-radius:      10px;
  --aurum-shadow:      0 20px 60px rgba(0,0,0,.14), 0 4px 16px rgba(0,0,0,.08);
  --aurum-ease:        cubic-bezier(.4,0,.2,1);
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* ═══════════════════════════════════════════════════════════════
   TRIGGER BUTTON
═══════════════════════════════════════════════════════════════ */
.aurum-acct-trigger {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--aurum-border);
  background: transparent;
  color: #555;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
  transition:
    color .22s var(--aurum-ease),
    border-color .22s var(--aurum-ease),
    background .22s var(--aurum-ease),
    box-shadow .22s var(--aurum-ease),
    transform .15s var(--aurum-ease);
}

/* ── Shape variants ── */
.aurum-shape-square  { border-radius: 0; }
.aurum-shape-rounded { border-radius: 10px; }
.aurum-shape-circle  { border-radius: 50%; }
.aurum-shape-pill    { border-radius: 999px; }

/* ── Icon sizing & stroke ── */
.aurum-acct-trigger svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  transition: transform .22s var(--aurum-ease);
  pointer-events: none;
}

.aurum-trigger-avatar,
.aurum-icon-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* ── States ── */
/*.aurum-acct-trigger:hover {*/
/*  color: var(--aurum-accent);*/
/*  border-color: var(--aurum-accent);*/
/*  background: var(--aurum-accent-dim);*/
/*  transform: translateY(-1px);*/
/*}*/

.aurum-acct-trigger.active {
  color: var(--aurum-accent);
  border-color: var(--aurum-accent);
  background: var(--aurum-accent-dim);
}

.aurum-acct-trigger:active { transform: scale(.96); }

/* ── Label ── */
.aurum-acct-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .02em;
  white-space: nowrap;
  color: inherit;
}

/* bottom label: stack vertically */
.aurum-label-bottom {
  flex-direction: column;
  width: auto !important;
  height: auto !important;
  padding: 8px 14px !important;
  gap: 4px !important;
}

/* ── Notification dot ── */
.aurum-notif-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 9px;
  height: 9px;
  background: #e74c3c;
  border-radius: 50%;
  border: 2px solid white;
  pointer-events: none;
  animation: aurum-pulse 2s infinite;
}

@keyframes aurum-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(231,76,60,.4); }
  50%      { box-shadow: 0 0 0 5px rgba(231,76,60,0); }
}

/* ═══════════════════════════════════════════════════════════════
   DROPDOWN PANEL
═══════════════════════════════════════════════════════════════ */
.aurum-acct-panel {
  position: absolute;
  top: calc(100% + 12px);
  width: 360px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--aurum-border);
  box-shadow: var(--aurum-shadow);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px) scale(.97);
  transform-origin: top center;
  transition:
    opacity .22s var(--aurum-ease),
    transform .22s var(--aurum-ease);
  overflow: hidden;
}

/* ── Position ── */
.aurum-pos-right  .aurum-acct-panel { right: 0; }
.aurum-pos-left   .aurum-acct-panel { left: 0; }
.aurum-pos-center .aurum-acct-panel {
  left: 50%;
  transform: translateX(-50%) translateY(-10px) scale(.97);
}

/* ── Open ── */
.aurum-acct-panel.open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0) scale(1);
}
.aurum-pos-center .aurum-acct-panel.open {
  transform: translateX(-50%) translateY(0) scale(1);
}

/* ── Close button ── */
.aurum-acct-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--aurum-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color .2s, background .2s;
  z-index: 2;
}
.aurum-acct-close:hover { color: var(--aurum-text); background: var(--aurum-input-bg); }
.aurum-acct-close svg { width: 14px; height: 14px; }

/* ═══════════════════════════════════════════════════════════════
   TAB SWITCHER
═══════════════════════════════════════════════════════════════ */
.aurum-tabs {
  display: flex;
  gap: 0;
  background: var(--aurum-input-bg);
  padding: 5px;
  margin: 20px 20px 0;
  border-radius: 10px;
  border: 1px solid var(--aurum-border);
}

.aurum-tab-btn {
  flex: 1;
  padding: 9px 0;
  border: none;
  border-radius: 7px;
  background: none;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .03em;
  color: var(--aurum-muted);
  cursor: pointer;
  transition: color .2s, background .2s, box-shadow .2s;
  font-family: inherit;
}
.aurum-tab-btn.active {
  background: #fff;
  color: var(--aurum-text);
  box-shadow: 0 1px 6px rgba(0,0,0,.10);
}

/* ═══════════════════════════════════════════════════════════════
   TAB CONTENT
═══════════════════════════════════════════════════════════════ */
.aurum-tab-content {
  display: none;
  padding: 22px 22px 24px;
}
.aurum-tab-content.active { display: block; }

/* ── Panel heading ── */
.aurum-panel-heading { margin-bottom: 18px; }
.aurum-panel-heading h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--aurum-text);
  margin: 0 0 3px;
  line-height: 1.2;
}
.aurum-panel-heading p { font-size: 13px; color: var(--aurum-muted); margin: 0; }

/* ═══════════════════════════════════════════════════════════════
   FORM FIELDS
═══════════════════════════════════════════════════════════════ */
.aurum-field { margin-bottom: 14px; }

.aurum-field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--aurum-muted);
  margin-bottom: 5px;
}

.aurum-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.aurum-input-icon {
  position: absolute;
  left: 12px;
  width: 15px;
  height: 15px;
  color: var(--aurum-muted);
  pointer-events: none;
}

.aurum-input-wrap input {
  width: 100%;
  height: 44px;
  padding: 0 42px 0 36px;
  border: 1.5px solid var(--aurum-border);
  border-radius: var(--aurum-radius);
  background: var(--aurum-input-bg);
  font-size: 14px;
  color: var(--aurum-text);
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.aurum-input-wrap input::placeholder { color: #bbb; }
.aurum-input-wrap input:focus {
  border-color: var(--aurum-accent);
  background: #fff;
  box-shadow: 0 0 0 3px var(--aurum-accent-dim);
}

/* ── Password toggle ── */
.aurum-pw-toggle {
  position: absolute;
  right: 9px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--aurum-muted);
  padding: 4px;
  display: flex;
  align-items: center;
  border-radius: 4px;
  transition: color .2s;
}
.aurum-pw-toggle:hover { color: var(--aurum-text); }
.aurum-pw-toggle svg { width: 15px; height: 15px; }

/* ── Password strength bar ── */
.aurum-strength-bar {
  height: 3px;
  background: #eee;
  border-radius: 3px;
  margin-top: 6px;
  overflow: hidden;
}
.aurum-strength-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 3px;
  transition: width .3s, background .3s;
}
.aurum-strength-bar.weak   span { width: 33%; background: #e74c3c; }
.aurum-strength-bar.medium span { width: 66%; background: #f39c12; }
.aurum-strength-bar.strong span { width: 100%; background: #27ae60; }

/* ── Row ── */
.aurum-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 8px;
  flex-wrap: wrap;
}
.aurum-checkbox { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.aurum-checkbox input { margin: 0; accent-color: var(--aurum-accent); }
.aurum-checkbox span { font-size: 13px; color: var(--aurum-muted); }
.aurum-forgot {
  font-size: 13px;
  color: var(--aurum-muted);
  text-decoration: none;
  transition: color .2s;
  margin-left: auto;
}
.aurum-forgot:hover { color: var(--aurum-accent); }

/* ═══════════════════════════════════════════════════════════════
   SUBMIT BUTTON
═══════════════════════════════════════════════════════════════ */
.aurum-submit-btn {
  width: 100%;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--aurum-radius);
  background: var(--aurum-accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .04em;
  cursor: pointer;
  font-family: inherit;
  transition: opacity .2s, transform .15s, box-shadow .2s;
}
.aurum-submit-btn svg { width: 15px; height: 15px; transition: transform .2s; }
.aurum-submit-btn:hover { opacity: .88; box-shadow: 0 6px 18px rgba(0,0,0,.15); }
.aurum-submit-btn:hover svg { transform: translateX(3px); }
.aurum-submit-btn:active { transform: scale(.97); }
.aurum-submit-btn:disabled { opacity: .55; cursor: not-allowed; }

/* Loading */
.aurum-submit-btn.loading svg { display: none; }
.aurum-submit-btn.loading span::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: aurum-spin .7s linear infinite;
  margin-left: 8px;
  vertical-align: middle;
}
@keyframes aurum-spin { to { transform: rotate(360deg); } }

.aurum-terms {
  margin-top: 12px;
  font-size: 12px;
  color: var(--aurum-muted);
  text-align: center;
}
.aurum-terms a { color: var(--aurum-accent); text-decoration: none; }
.aurum-terms a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════════
   NOTICE BANNER
═══════════════════════════════════════════════════════════════ */
.aurum-notice {
  padding: 10px 13px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.aurum-notice svg { width: 14px; height: 14px; flex-shrink: 0; }
.aurum-notice.error   { background: #fff1f1; color: #c0392b; border: 1px solid #f5c6c6; }
.aurum-notice.success { background: #f0faf5; color: #1e7e50; border: 1px solid #b0e0c8; }

/* ═══════════════════════════════════════════════════════════════
   MY ACCOUNT PANEL
═══════════════════════════════════════════════════════════════ */
.aurum-my-account { padding-bottom: 4px; }

.aurum-user-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--aurum-border);
}

.aurum-user-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid var(--aurum-accent);
  flex-shrink: 0;
}

.aurum-user-info strong { display: block; font-size: 15px; font-weight: 700; color: var(--aurum-text); margin-bottom: 2px; }
.aurum-user-info span   { font-size: 12px; color: var(--aurum-muted); }

/* ── Nav links ── */
.aurum-account-nav { padding: 8px 10px; }

.aurum-account-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--aurum-text);
  font-size: 13.5px;
  font-weight: 500;
  transition: background .18s, color .18s;
}

.aurum-nav-icon {
  width: 17px;
  height: 17px;
  color: var(--aurum-muted);
  flex-shrink: 0;
  transition: color .18s;
}

.aurum-link-arrow {
  width: 13px;
  height: 13px;
  margin-left: auto;
  color: var(--aurum-muted);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .2s, transform .2s;
}

.aurum-account-link:hover {
  background: var(--aurum-input-bg);
  color: var(--aurum-accent);
}
.aurum-account-link:hover .aurum-nav-icon  { color: var(--aurum-accent); }
.aurum-account-link:hover .aurum-link-arrow { opacity: 1; transform: translateX(0); }

/* ── Footer / logout ── */
.aurum-account-footer {
  padding: 8px 10px 14px;
  border-top: 1px solid var(--aurum-border);
  margin-top: 4px;
}

.aurum-logout-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--aurum-muted);
  font-size: 13px;
  font-weight: 500;
  transition: color .18s, background .18s;
}
.aurum-logout-btn svg { width: 15px; height: 15px; }
.aurum-logout-btn:hover { color: #e74c3c; background: #fff5f5; }

/* ═══════════════════════════════════════════════════════════════
   OVERLAY
═══════════════════════════════════════════════════════════════ */
.aurum-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: transparent;
}
.aurum-acct-panel.open ~ .aurum-overlay { display: block; }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — mobile bottom sheet
═══════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .aurum-acct-panel {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    width: 100% !important;
    border-radius: 20px 20px 0 0 !important;
    transform: translateY(20px) !important;
    max-height: 88vh;
    overflow-y: auto;
  }
  .aurum-acct-panel.open { transform: translateY(0) !important; }
  .aurum-acct-panel.open ~ .aurum-overlay { background: rgba(0,0,0,.45); }
}

/* ═══════════════════════════════════════════════════════════════
   LOGGED-IN TRIGGER STYLES
═══════════════════════════════════════════════════════════════ */

/* Base wrapper — sits inside .aurum-acct-trigger */
.aurum-loggedin-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  line-height: 1;
}

/* ── ① Gravatar Photo ────────────────────────────────────────── */
.aurum-acct-trigger .aurum-trigger-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  transition: transform .2s, box-shadow .2s;
}
.aurum-acct-trigger:hover .aurum-trigger-avatar {
  transform: scale(1.06);
  box-shadow: 0 3px 10px rgba(0,0,0,.18);
}

/* ── ②③ Initials ─────────────────────────────────────────────── */
.aurum-trigger-initials {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--aurum-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  flex-shrink: 0;
  transition: transform .2s, box-shadow .2s;
  user-select: none;
}
.aurum-trigger-initials-grad {
  /* background overridden via inline style from PHP */
  color: #fff;
}
.aurum-acct-trigger:hover .aurum-trigger-initials {
  transform: scale(1.07);
  box-shadow: 0 3px 12px rgba(0,0,0,.18);
}

/* ── ③ Avatar + Ring ────────────────────────────────────────── */
.aurum-avatar-ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid var(--aurum-accent);
  padding: 2px;
  transition: border-color .2s, box-shadow .2s;
}
.aurum-avatar-ring img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: block;
  object-fit: cover;
}
.aurum-acct-trigger:hover .aurum-avatar-ring {
  box-shadow: 0 0 0 3px var(--aurum-accent-dim);
}

/* ── ④ Avatar + Name ────────────────────────────────────────── */
.aurum-trigger-name {
  font-size: 13px;
  font-weight: 600;
  color: inherit;
  white-space: nowrap;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── ⑤ Icon + Check badge ───────────────────────────────────── */
.aurum-icon-check-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.aurum-icon-check-wrap svg { width: 22px; height: 22px; }

.aurum-check-badge {
  position: absolute;
  bottom: -3px;
  right: -5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #27ae60;
  border: 2px solid white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.aurum-check-badge svg { width: 8px; height: 8px; }

/* ── ⑦ Mini Card ────────────────────────────────────────────── */
.aurum-acct-trigger.aurum-shape-rounded.aurum-li-style-mini_card,
.aurum-acct-trigger.aurum-shape-square.aurum-li-style-mini_card,
.aurum-acct-trigger.aurum-shape-pill.aurum-li-style-mini_card {
  /* widen the trigger to accommodate card */
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
}

.aurum-trigger-mini-card {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 12px 6px 8px;
  border-radius: 10px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--aurum-border);
  transition: background .2s, border-color .2s;
}
.aurum-trigger-mini-card .aurum-trigger-avatar {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}
.aurum-trigger-card-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-align: left;
}
.aurum-trigger-card-text .aurum-trigger-name {
  font-size: 13px;
  font-weight: 600;
  max-width: 90px;
}
.aurum-trigger-role {
  font-size: 10px;
  font-weight: 400;
  color: var(--aurum-muted);
  letter-spacing: .03em;
  text-transform: uppercase;
}
.aurum-trigger-chevron {
  width: 14px;
  height: 14px;
  color: var(--aurum-muted);
  flex-shrink: 0;
  transition: transform .22s var(--aurum-ease);
}
.aurum-acct-trigger.active .aurum-trigger-chevron { transform: rotate(180deg); }
.aurum-acct-trigger:hover .aurum-trigger-mini-card {
  background: var(--aurum-accent-dim);
  border-color: var(--aurum-accent);
}

/* ── Online / Status dot ────────────────────────────────────── */
.aurum-online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 9px;
  height: 9px;
  background: #27ae60;
  border-radius: 50%;
  border: 2px solid white;
  pointer-events: none;
  flex-shrink: 0;
  animation: aurum-pulse-green 2.4s infinite;
}

/* For mini-card, place dot on avatar */
.aurum-li-style-mini_card .aurum-online-dot {
  bottom: 1px;
  right: auto;
  left: 32px;
}

@keyframes aurum-pulse-green {
  0%,100% { box-shadow: 0 0 0 0 rgba(39,174,96,.45); }
  50%      { box-shadow: 0 0 0 4px rgba(39,174,96,0); }
}

/* ── Adjust trigger button for non-avatar styles ─────────────── */
.aurum-acct-trigger.aurum-li-style-avatar_name,
.aurum-acct-trigger.aurum-li-style-mini_card {
  width: auto;
}
