/* shopper-profile-menu.css
   Dropdown + modals for the shopper header's account avatar.
   Reuses shopping-styles.css tokens (--red, --navy, --cream, --ink, --line…). */

.pm-wrap { position: relative; flex-shrink: 0; display: inline-flex; }

/* Razor addition: the design's trigger reused .sp-nav-avatar on a div; the
   production trigger is a real <button> (a11y), so neutralize UA chrome. */
button.pm-trigger { border: 0; padding: 0; cursor: pointer; font: inherit; }

.pm-trigger { appearance: none; }
.pm-trigger:hover { filter: brightness(1.08); }
.pm-trigger:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }

/* ── Dropdown panel ───────────────────────────────────────────── */
.pm-menu {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 300;
  width: 296px; background: var(--white); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--sh-lg);
  padding: 8px; animation: stepIn .15s ease forwards;
  display: flex; flex-direction: column;
}

.pm-menu-id { display: flex; align-items: center; gap: 12px; padding: 10px 10px 12px; }
.pm-menu-avatar {
  width: 42px; height: 42px; border-radius: 999px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--red), var(--red-deep));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800; letter-spacing: .01em;
}
.pm-menu-id-text { min-width: 0; }
.pm-menu-name { font-size: 14.5px; font-weight: 800; color: var(--ink); line-height: 1.3; }
.pm-menu-email { font-size: 12px; color: var(--ink-3); line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pm-menu-divider { height: 1px; background: var(--line); margin: 6px 4px; flex-shrink: 0; }

.pm-menu-item {
  display: flex; align-items: center; gap: 11px;
  width: 100%; text-align: left; padding: 11px 10px; border-radius: 9px;
  font-size: 13.5px; font-weight: 600; color: var(--ink);
  transition: background .13s; min-height: 40px;
}
.pm-menu-item svg { flex-shrink: 0; color: var(--ink-3); }
.pm-menu-item:hover { background: rgba(28,33,48,.05); }
.pm-menu-item-danger { color: var(--red-deep); }
.pm-menu-item-danger svg { color: var(--red-deep); }
.pm-menu-item-danger:hover { background: var(--red-soft); }
.pm-menu-item-admin { color: var(--navy); background: rgba(28,33,48,.045); }
.pm-menu-item-admin svg { color: var(--navy); }
.pm-menu-item-admin:hover { background: rgba(28,33,48,.09); }
.pm-menu-item-disabled { cursor: default; opacity: .55; }
.pm-menu-item-disabled:hover { background: none; }
.pm-menu-item-text { display: flex; flex-direction: column; gap: 2px; line-height: 1.3; }
.pm-menu-item-text small { font-size: 11px; font-weight: 600; color: var(--ink-3); }

.pm-menu-lang { padding: 8px 10px 6px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pm-menu-lang-label { display: flex; align-items: center; gap: 11px; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.pm-menu-lang-label svg { color: var(--ink-3); flex-shrink: 0; }
.pm-lang-seg { display: flex; background: rgba(28,33,48,.06); border-radius: 999px; padding: 2px; flex-shrink: 0; }
.pm-lang-btn {
  font-size: 11px; font-weight: 800; letter-spacing: .03em; padding: 6px 12px;
  border-radius: 999px; color: var(--ink-3); transition: background .13s, color .13s; min-height: 28px;
}
.pm-lang-btn.is-active { background: var(--navy); color: var(--cream); }

@media (max-width: 560px) { .pm-menu { width: 266px; right: -8px; } }

/* ── Modals ───────────────────────────────────────────────────── */
.pm-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(15,18,26,.55); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; animation: stepIn .15s ease forwards;
}
.pm-modal {
  width: 100%; max-width: 420px; max-height: 88vh; overflow-y: auto;
  background: var(--white); border-radius: 16px; box-shadow: var(--sh-lg);
}
.pm-modal-wide { max-width: 520px; }
.pm-modal-hd {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 20px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0;
  background: var(--white); border-radius: 16px 16px 0 0;
}
.pm-modal-hd h2 { font-size: 16.5px; font-weight: 800; color: var(--ink); }
.pm-modal-close {
  width: 34px; height: 34px; border-radius: 999px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-3); transition: background .13s, color .13s;
}
.pm-modal-close:hover { background: rgba(28,33,48,.07); color: var(--ink); }
.pm-modal-body { padding: 20px 22px 22px; }

.pm-form { display: flex; flex-direction: column; gap: 16px; }
.pm-field { display: flex; flex-direction: column; gap: 6px; }
.pm-field span { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.pm-input {
  height: 44px; border-radius: 10px; border: 1.5px solid var(--line-s);
  padding: 0 13px; font-size: 14.5px; color: var(--ink); font-family: inherit;
  background: var(--white); transition: border-color .13s;
}
.pm-input:focus { outline: none; border-color: var(--red); }
.pm-error { font-size: 12px; color: var(--red-deep); font-style: normal; }

.pm-avatar-row { display: flex; align-items: center; gap: 14px; margin-bottom: 2px; }
.pm-avatar-lg {
  width: 54px; height: 54px; border-radius: 999px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--red), var(--red-deep));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800;
}
.pm-avatar-name { font-size: 15.5px; font-weight: 800; color: var(--ink); }
.pm-avatar-email { font-size: 12.5px; color: var(--ink-3); }
.pm-provider-badge {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 6px;
  font-size: 11.5px; font-weight: 700; color: var(--ink-2);
  background: rgba(28,33,48,.06); border-radius: 999px; padding: 4px 10px 4px 8px;
}

.pm-form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 4px; }
.pm-saved { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--green); }
.pm-saved svg { width: 16px; height: 16px; }
.pm-btn-primary {
  background: var(--navy); color: var(--cream); font-size: 13.5px; font-weight: 800;
  padding: 12px 22px; border-radius: 10px; transition: background .13s; min-height: 44px;
}
.pm-btn-primary:hover { background: var(--red); }
.pm-btn-primary:disabled { opacity: .45; cursor: not-allowed; }

.pm-notif-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 4px 0; font-size: 13.5px; color: var(--ink); font-weight: 600;
}
.pm-notif-text { display: flex; flex-direction: column; gap: 2px; line-height: 1.35; min-width: 0; }
.pm-notif-text small { font-size: 11.5px; font-weight: 600; color: var(--ink-3); }

/* ── Profile modal sections ───────────────────────────────────── */
.pm-section-label {
  font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3); padding-top: 10px; margin-top: 2px; margin-bottom: -6px;
  border-top: 1px solid var(--line);
}
.pm-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pm-field-row .pm-field { min-width: 0; }
.pm-field-row .pm-input { width: 100%; min-width: 0; }
@media (max-width: 480px) { .pm-field-row { grid-template-columns: 1fr; gap: 16px; } }
.pm-lang-seg-full { align-self: flex-start; }
.pm-lang-seg-full .pm-lang-btn { font-size: 12.5px; padding: 8px 18px; min-height: 36px; letter-spacing: 0; }
.pm-password-row {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  padding: 12px 14px; border-radius: 10px; border: 1.5px solid var(--line-s);
  background: var(--white); font-size: 13.5px; font-weight: 700; color: var(--ink);
  min-height: 46px; transition: border-color .13s, background .13s; cursor: pointer;
}
.pm-password-row svg { color: var(--ink-3); flex-shrink: 0; }
.pm-password-row em { margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--ink-3); font-style: normal; }
.pm-password-row:hover { border-color: var(--red); }

.pm-done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 10px 0 4px; }
.pm-done-icon {
  width: 52px; height: 52px; border-radius: 999px; background: var(--green-s); color: var(--green);
  display: flex; align-items: center; justify-content: center;
}
.pm-done p { font-size: 14px; color: var(--ink-2); line-height: 1.5; }

/* ── Switch ───────────────────────────────────────────────────── */
.pm-switch { position: relative; display: inline-flex; cursor: pointer; flex-shrink: 0; }
.pm-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.pm-switch-track {
  width: 42px; height: 25px; border-radius: 999px; background: rgba(28,33,48,.16);
  display: inline-flex; align-items: center; padding: 3px; transition: background .15s;
}
.pm-switch-thumb {
  width: 19px; height: 19px; border-radius: 999px; background: var(--white);
  box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s;
}
.pm-switch input:checked + .pm-switch-track { background: var(--green); }
.pm-switch input:checked + .pm-switch-track .pm-switch-thumb { transform: translateX(17px); }
.pm-switch input:focus-visible + .pm-switch-track { outline: 2px solid var(--yellow); outline-offset: 2px; }
