/* The account menu in the top right (account-menu.js) and the Profile & settings page
   (account-page.js), in the dashboard's Apple product-page look (style.css tokens). */

/* MARK: - Menu */
.acct-menu { position: relative; }
.acct-button { display: inline-flex; align-items: center; gap: 4px; margin: 0; padding: 3px 6px 3px 3px; border: 0; border-radius: 980px; background: transparent; color: var(--gray-600); font: inherit; cursor: pointer; transition: background .15s; }
.acct-button:hover, .acct-button[aria-expanded="true"] { background: rgba(0, 0, 0, .06); }
.acct-face { display: inline-grid; }
.acct-face .pc-face { box-shadow: 0 0 0 1px var(--hairline); }
.acct-chevron { font-size: 11px; line-height: 1; }
.acct-list { position: absolute; right: 0; top: calc(100% + 10px); z-index: 40; width: 280px; padding: 6px; background: rgba(255, 255, 255, .97); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-radius: 16px; box-shadow: var(--sh-lg), 0 0 0 1px var(--hairline); display: grid; white-space: normal; }
.acct-list[hidden] { display: none; }
.acct-head { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px 10px 8px; }
.acct-head-face { display: inline-grid; }
.acct-names { display: grid; min-width: 0; }
.acct-names strong { color: var(--ink); font-size: 17px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-names small { color: var(--gray-600); font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-names small:empty { display: none; }
.acct-item { font: inherit; font-size: 16px; text-align: left; color: var(--ink); background: none; border: 0; border-radius: 9px; padding: 9px 12px; cursor: pointer; }
.acct-item:hover, .acct-item:focus-visible { background: var(--brand); color: #fff; outline: none; }
.acct-divider { border: 0; border-top: 1px solid var(--hairline); margin: 5px 8px; }
@media (max-width: 700px) {
  .acct-chevron { display: none; }
  .acct-list { width: min(280px, calc(100vw - 24px)); }
}

/* MARK: - Profile & settings page */
.acct-page { display: grid; gap: 28px; max-width: 760px; }
.acct-group-title { font-size: 13px; font-weight: 600; color: var(--gray-600); text-transform: uppercase; letter-spacing: .02em; margin: 0 0 8px 18px; }
.acct-rows { background: var(--surface); border-radius: var(--r-lg); overflow: hidden; }
.acct-footer { margin: 8px 18px 0; font-size: 14px; line-height: 1.4; color: var(--gray-600); }
.acct-footer a { white-space: normal; }
.acct-row { display: grid; grid-template-columns: minmax(130px, 200px) minmax(0, 1fr) auto; align-items: center; gap: 6px 16px; min-height: 52px; margin: 0; padding: 9px 18px; font-size: 16px; }
.acct-row + .acct-row { border-top: 1px solid var(--hairline); }
.acct-label { font-weight: 500; color: var(--ink); }
.acct-value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.acct-value.muted { color: var(--gray-400); }
.acct-value a { color: var(--link); }
.acct-action { display: inline-flex; gap: 8px; justify-content: flex-end; }
.acct-select { width: auto; max-width: 100%; padding: 6px 30px 6px 10px; border-radius: 10px; }
p.acct-row { display: block; min-height: 0; padding: 14px 18px; }

/* Switch rows: the label and its explanation on the left, an iOS-style switch on the right. */
.acct-toggle { grid-template-columns: minmax(0, 1fr) auto; cursor: pointer; padding-top: 12px; padding-bottom: 12px; }
.acct-toggle.disabled { cursor: default; }
.acct-toggle.disabled .acct-label { color: var(--gray-400); }
.acct-toggle-text { display: grid; gap: 3px; }
.acct-toggle-text small { font-size: 14px; line-height: 1.4; }
input.acct-switch { appearance: none; -webkit-appearance: none; position: relative; flex: none; width: 51px; height: 31px; margin: 0; padding: 0; border: 0; border-radius: 999px; background: #e9e9eb; cursor: pointer; transition: background .2s; }
input.acct-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .15), 0 1px 1px rgba(0, 0, 0, .16); transition: transform .2s; }
input.acct-switch:checked { background: #34c759; }
input.acct-switch:checked::after { transform: translateX(20px); }
input.acct-switch:disabled { opacity: .5; cursor: default; }
input.acct-switch:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { input.acct-switch, input.acct-switch::after { transition: none; } }

/* Picture: the avatar and the photo side by side; the chosen one is what others see. */
.acct-picture { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; padding: 18px; }
.acct-eyebrow { margin: 0 0 10px; font-size: 14px; font-weight: 600; color: var(--gray-600); }
.acct-sides { display: flex; gap: 14px; }
.acct-side { display: grid; justify-items: center; gap: 8px; width: 116px; margin: 0; padding: 12px 8px 10px; border: 2px solid transparent; border-radius: 18px; background: var(--paper); color: var(--ink); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; transition: border-color .15s, background .15s; }
.acct-side:hover { background: #ececf0; }
.acct-side.selected { border-color: var(--brand); background: var(--brand-light); }
.acct-side.selected span:last-child::before { content: "✓ "; color: var(--brand); }
.acct-side:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.acct-add-photo { color: var(--brand); }
.acct-plus { display: grid; place-items: center; width: 88px; height: 88px; border-radius: 50%; border: 2px dashed var(--gray-300); font-size: 34px; font-weight: 300; line-height: 1; }
.acct-picture-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* People: follow requests and blocked players */
.acct-person { grid-template-columns: auto minmax(0, 1fr) auto; }
.acct-person .acct-names strong { font-size: 16px; }

/* Sign-in methods */
.acct-provider { display: inline-flex; align-items: center; gap: 10px; }
.acct-provider img { width: 18px; height: 18px; object-fit: contain; }
/* The Apple mark has wide margins in its picture (as on the sign-in screen). */
.acct-provider img.apple { object-fit: cover; transform: scale(1.3); mix-blend-mode: multiply; }
.acct-linked { color: var(--green); font-weight: 600; }

/* Dialogs */
.acct-dialog .dialog-actions { flex-wrap: wrap; }
.acct-dialog .acct-left { margin-right: auto; }
.acct-dialog-error { margin: 6px 0 0; font-size: 15px; }
.acct-at-field { position: relative; display: block; }
.acct-at { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--gray-600); font-weight: 600; pointer-events: none; }
input.acct-at-input { padding-left: 30px; }
.acct-suggestions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.acct-suggestions p { flex-basis: 100%; margin: 0; }
.acct-crop-wrap { display: grid; place-items: center; margin: 8px 0 4px; }
canvas.acct-crop { width: 280px; height: 280px; max-width: 100%; border-radius: 16px; background: #1d1d1f; touch-action: none; cursor: grab; }
canvas.acct-crop:active { cursor: grabbing; }
.acct-zoom { display: flex; align-items: center; gap: 10px; width: min(280px, 100%); margin: 6px auto 0; color: var(--gray-600); font-size: 18px; }

@media (max-width: 600px) {
  .acct-row { grid-template-columns: minmax(0, 1fr) auto; }
  .acct-row > .acct-value { grid-column: 1 / -1; grid-row: 2; white-space: normal; }
  .acct-row > .acct-action { grid-column: 2; grid-row: 1; }
  .acct-toggle, .acct-person { grid-template-columns: minmax(0, 1fr) auto; }
  .acct-person { grid-template-columns: auto minmax(0, 1fr) auto; }
  .acct-person > .acct-names { grid-row: 1; grid-column: 2; }
  .acct-picture { padding: 14px; }
  .acct-side { width: 104px; }
}

/* Opened from a player page (/padelcup/?return=…): the way back. */
.acct-back { display: inline-block; margin-bottom: 12px; font-size: 17px; }
