/* Valure Account (account.valu.re). Uses the support site's styles.css for the header, footer and
   Sign in, and adds the account page: you and the sections on the left, the section on
   the right. Apple-like: grey tiles, plain lists, Valure blue for links only. */

/* The header stays at the top the whole time, white with a hairline, and never moves */
[data-header="static"] .site-header {
  position: sticky; top: 0; transform: none !important; transition: none;
  background: rgba(255, 255, 255, 0.85); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom-color: transparent;
}

.my { padding: 32px var(--gutter) 96px; }

/* Signed out */
.my-signin { max-width: 440px; margin: 48px auto 0; text-align: center; }
.my-signin__mark { display: block; margin: 0 auto 20px; }
.my-signin__title { margin: 0; font-size: 2.5rem; font-weight: 700; letter-spacing: -0.025em; color: var(--ink); }
.my-signin__text { margin: 10px 0 28px; font-size: 1.0625rem; line-height: 1.5; color: #6e6e73; }
.my-signin__button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 28px;
  border-radius: 999px; background: var(--brand); color: #fff; font-size: 1rem; font-weight: 600; text-decoration: none;
}
.my-signin__button:hover { background: #0005d1; color: #fff; text-decoration: none; }

/* Signed in */
.my-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; max-width: 1120px; margin: 0 auto; }

.my-me { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.my-me__name { margin: 0; font-size: 1.125rem; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.my-me__id { margin: 2px 0 0; font-size: 0.8125rem; color: #6e6e73; }
.my-avatar { display: grid; place-items: center; flex: none; border-radius: 50%; background: #e8ebff; color: var(--brand); font-weight: 600; object-fit: cover; }
.my-avatar--lg { width: 56px; height: 56px; font-size: 1.375rem; }

.my-nav { display: grid; gap: 2px; }
.my-nav__item {
  display: flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 10px;
  color: var(--ink); font-size: 0.9375rem; text-decoration: none;
}
.my-nav__item:hover { background: #f5f5f7; color: var(--ink); text-decoration: none; }
.my-nav__item--group { margin-top: 14px; }
.my-nav__item[aria-current="page"] { background: #e8ebff; color: var(--brand); font-weight: 600; }

.my-content { min-width: 0; }
.my-title { margin: 0; font-size: 2.5rem; font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; color: var(--ink); }
.my-lead { max-width: 560px; margin: 8px 0 0; font-size: 1.0625rem; line-height: 1.5; color: #6e6e73; }
.my-subtitle { margin: 40px 0 12px; font-size: 1.375rem; font-weight: 600; color: var(--ink); }

.my-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 32px; }
.my-card {
  display: flex; flex-direction: column; padding: 24px; border-radius: 20px; background: #f5f5f7;
  color: var(--ink); text-decoration: none; transition: background-color 0.2s;
}
.my-card:hover { background: #eeeef1; color: var(--ink); text-decoration: none; }
.my-card__label { font-size: 0.8125rem; color: #6e6e73; }
.my-card__value { margin-top: 6px; font-size: 1.375rem; font-weight: 600; letter-spacing: -0.01em; }
.my-card .my-link { margin-top: 14px; }

.my-link { color: var(--brand); font-size: 0.9375rem; text-decoration: none; }
.my-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.my-empty { padding: 28px; border-radius: 20px; border: 1px solid #e6e8ee; }
.my-empty__title { margin: 0; font-size: 1.0625rem; font-weight: 600; color: var(--ink); }
.my-empty__text { max-width: 520px; margin: 4px 0 14px; font-size: 0.9375rem; line-height: 1.5; color: #6e6e73; }

.my-products { list-style: none; margin: 0; padding: 0; }
.my-product { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid #e6e8ee; }
.my-product__art { width: 44px; height: 44px; flex: none; border-radius: 12px; background: #e8ebff url(/assets/mark.svg) center / 18px no-repeat; }
.my-product__text { flex: 1; display: grid; }
.my-product__text strong { font-weight: 600; color: var(--ink); }
.my-product__text span, .my-product__note { font-size: 0.8125rem; color: #6e6e73; }

.my-list { margin: 0; border-radius: 16px; border: 1px solid #e6e8ee; overflow: hidden; }
.my-row { display: flex; justify-content: space-between; gap: 16px; padding: 14px 18px; }
.my-row + .my-row { border-top: 1px solid #e6e8ee; }
.my-row dt { color: var(--ink); }
.my-row dd { margin: 0; color: #6e6e73; text-align: right; overflow-wrap: anywhere; }
.my-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.my-button {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 18px; border-radius: 999px;
  border: 1px solid #e3e3e8; background: #fff; color: var(--ink); font-size: 0.9375rem; font-weight: 500; text-decoration: none;
}
.my-button:hover { border-color: #c7c7cc; color: var(--ink); text-decoration: none; }

.my-note { margin: 12px 0 0; font-size: 0.875rem; color: #6e6e73; }

/* On/off switches, like iPhone Settings */
.my-switch { display: flex; align-items: center; gap: 16px; padding: 14px 18px; }
.my-switch + .my-switch { border-top: 1px solid #e6e8ee; }
.my-switch__text { flex: 1; display: grid; gap: 2px; }
.my-switch__text label { color: var(--ink); }
.my-switch__text span { font-size: 0.8125rem; color: #6e6e73; }
.my-switch__input {
  appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 51px; height: 31px; margin: 0;
  border-radius: 999px; background: #e9e9ea; cursor: pointer; transition: background-color 0.25s ease;
}
.my-switch__input::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15); transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.my-switch__input:checked { background: #34c759; }
.my-switch__input:checked::after { transform: translateX(20px); }
.my-switch__input:disabled { cursor: default; opacity: 0.6; }
.my-switch__input:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Phone: you on top, the sections as a row you can swipe */
@media (max-width: 800px) {
  .my { padding-top: 16px; }
  .my-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .my-me { margin-bottom: 16px; }
  .my-nav { display: flex; gap: 6px; overflow-x: auto; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scrollbar-width: none; }
  .my-nav::-webkit-scrollbar { display: none; }
  .my-nav__item { flex: none; min-height: 36px; border-radius: 999px; background: #f5f5f7; }
  .my-nav__item--group { margin-top: 0; }
  .my-title { font-size: 2rem; }
  .my-cards { grid-template-columns: minmax(0, 1fr); gap: 10px; }
}

/* ---- Loading: skeletons, then a soft fade in ---- */
.sk {
  display: block; border-radius: 8px;
  background: linear-gradient(90deg, #f0f0f3 0%, #f7f7f9 40%, #f0f0f3 80%) 0 0 / 300% 100%;
  animation: my-shimmer 1.6s ease-in-out infinite;
}
.sk--round { border-radius: 50%; flex: none; }
.my-nav--sk { display: grid; gap: 6px; }
.my-card--sk { pointer-events: none; }
.my-card--sk .sk { background-color: #e9e9ee; background-image: linear-gradient(90deg, #e8e8ed 0%, #f1f1f4 40%, #e8e8ed 80%); }
.my-sk__box { margin-top: 14px; padding: 28px; border-radius: 20px; border: 1px solid #eef0f3; }
@keyframes my-shimmer { from { background-position: 100% 0; } to { background-position: -50% 0; } }

.is-entering { animation: my-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes my-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.my-content { transition: opacity 0.18s ease, transform 0.18s ease; }
.my-content.is-leaving { opacity: 0; transform: translateY(-4px); }
.my-nav__item { transition: background-color 0.25s ease, color 0.25s ease; }

@media (prefers-reduced-motion: reduce) {
  .sk { animation: none; }
  .is-entering { animation: none; }
  .my-content, .my-nav__item { transition: none; }
}

/* Room between the line under a title and what comes next */
.my-lead + .my-list, .my-lead + .my-empty, .my-lead + .my-products { margin-top: 28px; }

/* Support history: one row per chat, opened in place */
.my-lead + .my-chats { margin-top: 28px; }
.my-chats { list-style: none; margin: 0; padding: 0; border-radius: 16px; border: 1px solid #e6e8ee; overflow: hidden; }
.my-chat + .my-chat { border-top: 1px solid #e6e8ee; }
.my-chat__head { display: flex; align-items: center; gap: 16px; padding: 16px 18px; cursor: pointer; list-style: none; }
.my-chat__head::-webkit-details-marker { display: none; }
.my-chat__head::after {
  content: ""; flex: none; width: 8px; height: 8px; border-right: 2px solid #b0b4bd; border-bottom: 2px solid #b0b4bd;
  transform: rotate(-45deg); transition: transform 0.25s ease;
}
details[open] > .my-chat__head::after { transform: rotate(45deg); }
.my-chat__head:hover { background: #fafafc; }
.my-chat__text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.my-chat__text strong { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.my-chat__text span { font-size: 0.8125rem; color: #6e6e73; }
.my-chat__status { flex: none; font-size: 0.8125rem; color: #6e6e73; }
.my-chat__status.is-open { color: var(--brand); font-weight: 600; }
.my-chat__messages { list-style: none; margin: 0; padding: 4px 18px 20px; display: grid; gap: 12px; background: #fafafc; animation: my-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both; }
.my-msg { display: grid; gap: 4px; max-width: 80%; }
.my-msg--me { justify-self: end; text-align: right; }
.my-msg__from { font-size: 0.75rem; color: #6e6e73; }
.my-msg__text { margin: 0; padding: 10px 14px; border-radius: 18px; background: #e9edf1; color: var(--ink); white-space: pre-line; overflow-wrap: anywhere; text-align: left; font-size: 0.9375rem; line-height: 1.5; }
.my-msg--me .my-msg__text { background: var(--brand); color: #fff; }
@media (prefers-reduced-motion: reduce) { .my-chat__messages { animation: none; } .my-chat__head::after { transition: none; } }
