/* IXXO Cart 8 storefront: the buyer's account, the order pages and the e-mail token pages (Phase 10b).
   Tokens only (the theme's colours, radius and fonts); logical properties only: the shop may
   read right to left. The shared layout comes first: the account menu beside the page, one
   column below 768 px; list rows, status tags, the action row and definition lists. Then
   one section per area of the account. */

/* The two columns: the menu, then the page. */
.sf-acct{ display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding-block: 32px 0; }
.sf-acct-main{ display: grid; gap: 20px; align-content: start; min-inline-size: 0; }
.sf-acct-title{ margin-block-end: 4px; }
.sf-acct-lead{ font-size: 17px; }
.sf-acct-hint{ color: var(--muted); font-size: 14px; }
.sf-acct-link{ color: var(--ink); text-decoration: underline; font-size: 14px; }
.sf-acct-link:hover{ color: var(--accent-ink); }

@media (min-width: 768px){
	.sf-acct{ grid-template-columns: 220px minmax(0, 1fr); align-items: start; }
}

/* The account menu: links one under the other, the page shown marked; sign out last. */
.sf-acct-nav{ display: grid; gap: 16px; align-content: start; }
.sf-acct-nav-list{ list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
/* The page shown is a solid ink pill (white words): it reads as "you are here" without a
   coloured bar, and the orange stays for the actions. Hover is the light tile only. */
.sf-acct-nav-link{ display: flex; align-items: center; min-block-size: 44px; padding-inline: 14px; border-radius: 999px; color: var(--ink-2); text-decoration: none; transition: background-color 160ms ease-out, color 160ms ease-out; }
.sf-acct-nav-link:hover{ background: var(--tile); color: var(--ink); }
.sf-acct-nav-link[aria-current="page"], .sf-acct-nav-link[aria-current="page"]:hover{ background: var(--ink); color: var(--on-ink); font-weight: 600; }
.sf-acct-nav-out{ padding-inline: 14px; }

@media (max-width: 767px){
	/* On a phone the menu is one scrolling row of pills above the page. */
	.sf-acct-nav-list{ display: flex; gap: 4px; overflow-x: auto; padding-block-end: 4px; scrollbar-width: none; }
	.sf-acct-nav-link{ white-space: nowrap; min-block-size: 40px; border: 1px solid var(--line); }
	.sf-acct-nav-link[aria-current="page"]{ border-color: var(--ink); }
	/* Sign out sits at the end of that row as a quiet link, not a block above the page. */
	.sf-acct-nav{ display: flex; align-items: center; gap: 8px; }
	.sf-acct-nav-list{ flex: 1; min-inline-size: 0; }
	.sf-acct-nav-out{ flex: none; padding-inline: 0; padding-block-end: 4px; }
	.sf-acct-nav-out .sf-btn{ min-block-size: 40px; padding-inline: 8px; background: none; border: 0; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
}

@media (prefers-reduced-motion: reduce){
	.sf-acct-nav-link{ transition: none; }
}

/* List rows: an order, a return, a subscription, an address. */
.sf-acct-list{ list-style: none; margin: 0; padding: 0; display: grid; border-block-start: 1px solid var(--line); }
.sf-acct-row{ display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding-block: 16px; border-block-end: 1px solid var(--line); }
.sf-acct-row-main{ flex: 1 1 240px; display: grid; gap: 4px; min-inline-size: 0; }
.sf-acct-row-meta{ color: var(--muted); font-size: 14px; }
.sf-acct-amount{ font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Status tags: words first, the colour only adds to them. */
.sf-acct-tag{ display: inline-flex; align-items: center; min-block-size: 24px; padding-inline: 8px; border-radius: 999px; background: var(--tile); color: var(--ink); font-size: 13px; font-weight: 600; }
.sf-acct-tag-attention{ box-shadow: inset 0 0 0 1.5px var(--danger); color: var(--danger); }

/* The action row: the page's buttons and links, wrapping on a phone. */
.sf-acct-actions{ display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

/* Definition lists: the facts of an order, a subscription, a profile. */
.sf-acct-facts{ display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 24px; margin: 0; }
.sf-acct-facts dt{ color: var(--muted); font-size: 14px; }
.sf-acct-facts dd{ margin: 0; }

@media (max-width: 479px){
	.sf-acct-facts{ grid-template-columns: minmax(0, 1fr); gap: 2px; }
	.sf-acct-facts dd{ margin-block-end: 8px; }
}

/* Orders, returns and the order acceptance link. */
/* A guest with an order's link has no account menu: the page takes the whole width. */
@media (min-width: 768px){
	.sf-acct-guest{ grid-template-columns: minmax(0, 1fr); }
}

/* The overview's blocks. Orders lead the overview and take the whole width; the smaller blocks follow beside each other. */
.sf-acct-ov{ display: flex; flex-wrap: wrap; gap: 16px; }
.sf-acct-ov-block{ flex: 1 1 220px; display: grid; gap: 12px; align-content: start; padding: 20px 24px; border: 1px solid var(--line); border-radius: calc(var(--r) * 2); background: var(--paper); }
.sf-acct-ov-block > .sf-acct-link:last-child{ justify-self: start; font-weight: 600; text-decoration: none; }
.sf-acct-ov-block > .sf-acct-link:last-child:hover{ text-decoration: underline; }
.sf-acct-ov-title{ font-size: 18px; margin: 0; }
.sf-acct-ov-block .sf-acct-list{ border-block-start: 0; }
.sf-acct-ov-block .sf-acct-row{ padding-block: 12px; }
.sf-acct-ov-block .sf-acct-row:last-child{ border-block-end: 0; }
.sf-acct-ov-block:first-child{ flex-basis: 100%; }

/* Status tags that ask for something, and finished ones (the words stay the message). */
.sf-acct-tag-pending_payment, .sf-acct-tag-partially_paid{ box-shadow: inset 0 0 0 1.5px var(--danger); color: var(--danger); }
.sf-acct-tag-completed, .sf-acct-tag-closed, .sf-acct-tag-refunded{ background: var(--ink); color: var(--on-ink); }

/* The order page: its sections, the timeline, a seller's part, a shipment, the totals. */
/* The order page reads top to bottom as one document: the header (number, status, date),
   then sections parted by hairlines and space, not boxes. Headings carry the hierarchy. */
.sf-acct-order{ gap: 0; }
.sf-acct-back{ justify-self: start; display: inline-flex; align-items: center; gap: 6px; min-block-size: 44px; color: var(--muted); font-size: 14px; text-decoration: none; }
.sf-acct-back::before{ content: "\2190"; display: inline-block; transform: scaleX(var(--ic-dir)); }
.sf-acct-back:hover{ color: var(--ink); }
.sf-acct-order-head{ display: grid; gap: 10px; padding-block-end: 28px; }
.sf-acct-order-head .sf-acct-title{ margin: 0; font-variant-numeric: tabular-nums; }
.sf-acct-order > .sf-co-notice, .sf-acct-order > .sf-acct-lead{ margin-block-end: 20px; }
.sf-acct-order-block{ display: grid; gap: 16px; padding-block: 28px; border-block-start: 1px solid var(--line); }
.sf-acct-order-heading{ font-size: 18px; font-weight: 700; letter-spacing: -0.01em; margin: 0; }
.sf-acct-order-status{ display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; }

/* The timeline: a dot per step on one hairline, the latest step dark and in bold. */
.sf-acct-timeline{ list-style: none; margin: 0; padding: 0; display: grid; }
.sf-acct-timeline-step{ position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; padding-block: 0 18px; padding-inline-start: 28px; }
.sf-acct-timeline-step::before{ content: ""; position: absolute; inset-inline-start: 4px; inset-block-start: 7px; inline-size: 9px; block-size: 9px; border-radius: 50%; background: var(--paper); box-shadow: 0 0 0 1.5px var(--muted); }
.sf-acct-timeline-step::after{ content: ""; position: absolute; inset-inline-start: 8px; inset-block: 20px -2px; inline-size: 1px; background: var(--muted); opacity: 0.35; }
.sf-acct-timeline-step:last-child{ padding-block-end: 0; }
.sf-acct-timeline-step:last-child::after{ display: none; }
.sf-acct-timeline-step:last-child::before{ background: var(--ink); box-shadow: 0 0 0 1.5px var(--ink); }
.sf-acct-timeline-step:last-child .sf-acct-timeline-text{ font-weight: 600; }

/* A seller's part and its lines: the quantity in a small square before the name. */
.sf-acct-suborder{ display: grid; gap: 12px; }
.sf-acct-suborder + .sf-acct-suborder{ padding-block-start: 12px; }
.sf-acct-suborder-title{ font-size: 15px; margin: 0; color: var(--ink-2); }
.sf-acct-lines{ border-block-start: 0; }
.sf-acct-line{ display: flex; align-items: center; gap: 16px; padding-block: 14px; border-block-end: 1px solid var(--line); }
.sf-acct-line:first-child{ padding-block-start: 0; }
.sf-acct-line .sf-acct-row-main{ flex: 1 1 auto; gap: 2px; }
.sf-acct-line-title{ font-weight: 600; overflow-wrap: anywhere; }
.sf-acct-line-qty{ flex: none; display: grid; place-items: center; inline-size: 44px; block-size: 44px; border-radius: var(--r); background: var(--tile); font-family: var(--font-mono); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sf-acct-line .sf-acct-amount{ font-weight: 600; }
.sf-acct-shipment{ padding: 14px 16px; background: var(--tile); border-radius: var(--r); font-size: 14px; }

/* The totals sit at the end side under the lines, the grand total larger above a hairline. */
.sf-acct-totals{ justify-self: end; inline-size: min(100%, 360px); grid-template-columns: minmax(0, 1fr) max-content; gap: 8px 0; padding-block-start: 4px; }
.sf-acct-totals dd{ padding-inline-start: 24px; }
.sf-acct-totals dd{ text-align: end; }
.sf-acct-totals .sf-acct-totals-grand{ margin-block-start: 4px; padding-block-start: 12px; border-block-start: 1px solid var(--ink); color: var(--ink); font-size: 18px; font-weight: 700; }

@media (max-width: 479px){
	/* The totals stay label and amount on one row on a phone (the other facts stack). */
	.sf-acct-totals{ inline-size: 100%; }
	.sf-acct-totals dd{ margin-block-end: 0; }
}

/* Delivery and billing side by side when there is room. */
.sf-acct-addresses{ display: grid; gap: 20px 32px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); padding-block-start: 12px; }
.sf-acct-address{ display: grid; gap: 6px; align-content: start; }
.sf-acct-address-title{ font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.sf-acct-address-line{ display: block; }

/* Payments and documents: one tidy row each, the amount and its button at the end. */
.sf-acct-payments{ border-block-start: 0; }
.sf-acct-payments .sf-acct-row{ flex-wrap: nowrap; }
.sf-acct-payments .sf-acct-row:first-child{ padding-block-start: 0; }
.sf-acct-payments .sf-acct-row:last-child{ border-block-end: 0; }
.sf-acct-payments .sf-acct-row-main{ flex: 1 1 auto; }
@media (max-width: 479px){
	.sf-acct-payments .sf-acct-row{ flex-wrap: wrap; }
}

/* What you can do: the buttons together in one row, contact and cancel side by side. */
.sf-acct-order-do .sf-acct-actions{ gap: 12px; }

/* The return forms: one fieldset per line, the units box narrow. */
.sf-acct-return-form{ display: grid; gap: 16px; }
.sf-acct-return-line{ display: grid; gap: 6px; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); }
.sf-acct-return-qty{ max-inline-size: 120px; }
.sf-acct-return-address{ display: grid; gap: 2px; }

/* A return's messages: the buyer's own set off on the reading side. */
.sf-acct-messages{ list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.sf-acct-message{ padding: 12px; border-radius: var(--r); background: var(--tile); max-inline-size: 640px; }
.sf-acct-message-mine{ margin-inline-start: auto; border: 1px solid var(--line); background: transparent; }
.sf-acct-message-text{ margin-block: 4px 0; margin-inline: 0; white-space: pre-line; overflow-wrap: anywhere; }

/* The acceptance page. */
.sf-acct-accept{ display: grid; gap: 20px; padding-block: 32px 0; }
/* Subscriptions, membership and saved cards. */
.sf-acct-sub-part{ display: grid; gap: 12px; padding-block-start: 8px; scroll-margin-block-start: 24px; }
.sf-acct-sub-heading{ font-size: 18px; margin: 0; }
.sf-acct-sub-title{ font-weight: 600; overflow-wrap: anywhere; }
.sf-acct-sub-inline{ display: flex; flex-wrap: wrap; align-items: end; gap: 8px 12px; }
.sf-acct-sub-field{ display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.sf-acct-sub-qty{ inline-size: 96px; }
.sf-acct-plan{ display: grid; gap: 12px; padding: 20px; border: 1.5px solid var(--line); border-radius: var(--r); }
.sf-acct-plan-head{ display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.sf-acct-plan-benefits{ white-space: pre-line; overflow-wrap: anywhere; }
.sf-acct-join{ display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-block-end: 16px; }
/* Wishlists and messages. */
/* Wishlists: the lists with their edit forms folded away, one list's items with a box to pick each. */
.sf-acct-wl-name{ color: var(--ink); font-weight: 600; text-decoration: none; }
.sf-acct-wl-name:hover{ color: var(--accent-ink); text-decoration: underline; }
.sf-acct-wl-subtitle{ display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-size: 18px; }
.sf-acct-wl-edit, .sf-acct-msg-report{ flex-basis: 100%; }
.sf-acct-wl-edit summary, .sf-acct-msg-report summary{ display: inline-flex; align-items: center; min-block-size: 44px; cursor: pointer; }
.sf-acct-wl-form, .sf-acct-wl-new{ display: flex; flex-wrap: wrap; align-items: end; gap: 12px; padding-block: 8px; }
.sf-acct-wl-new{ border-block-start: 1px solid var(--line); padding-block-start: 20px; }
.sf-acct-wl-who{ display: grid; gap: 8px; }
.sf-acct-wl-share input{ inline-size: 100%; font-family: var(--font-mono); }
.sf-acct-wl-pick{ inline-size: 24px; block-size: 24px; margin: 10px; accent-color: var(--accent-ink); }
.sf-acct-wl-move{ display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
/* A wishlist item's picture (owner list 1 F4), the same small square as a cart line. */
.sf-acct-wl-img{ flex: none; inline-size: 64px; block-size: 64px; object-fit: cover; border-radius: var(--r); background: var(--tile); }

/* Messages: the inbox rows, then a thread's messages, the buyer's own set off to the end side. */
.sf-acct-msg-subject{ color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.sf-acct-msg-subject:hover{ color: var(--accent-ink); text-decoration: underline; }
.sf-acct-msg-unread{ font-weight: 700; }
.sf-acct-msgs{ list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.sf-acct-msg{ display: grid; gap: 6px; max-inline-size: 640px; padding: 12px 16px; border-radius: var(--r); background: var(--tile); }
.sf-acct-msg-own{ justify-self: end; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.sf-acct-msg-head{ display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin: 0; }
.sf-acct-msg-body{ margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.sf-acct-msg-files{ list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.sf-acct-msg-files a{ display: inline-flex; align-items: center; min-block-size: 44px; }
.sf-acct-msg-input{ min-block-size: 120px; resize: vertical; }
/* Profile, security, privacy and addresses. */
.sf-acct-pf-section{ display: grid; gap: 12px; padding-block: 24px; border-block-start: 1px solid var(--line); }
.sf-acct-pf-section:first-of-type{ border-block-start: 0; padding-block-start: 0; }
.sf-acct-pf-heading{ margin: 0; font-size: 18px; color: var(--ink); }
.sf-acct-pf-form{ max-inline-size: 560px; }
.sf-acct-pf-group{ display: grid; gap: 8px; inline-size: 100%; min-inline-size: 0; margin: 0; padding: 0; border: 0; }
.sf-acct-pf-group legend{ padding: 0; margin-block-end: 8px; font-weight: 600; color: var(--ink); }
.sf-acct-pf-address{ display: grid; font-style: normal; color: var(--ink-2); line-height: 1.5; }
.sf-acct-pf-blockers{ margin: 0; padding-inline-start: 20px; display: grid; gap: 8px; }
/* Becoming a seller. */
/* The seller application (storefront/seller_application): its groups of questions and the documents. */
.sf-sa-group{ display: grid; gap: 12px; inline-size: 100%; margin: 0; padding: 0; border: 0; }
.sf-sa-group legend{ font-family: var(--font-heading); font-weight: 700; font-size: 17px; margin-block-end: 8px; }
.sf-sa-sub{ font-family: var(--font-heading); font-weight: 700; font-size: 17px; color: var(--ink); }
.sf-sa-text{ min-block-size: 120px; padding-block: 10px; }
.sf-sa-plan{ display: grid; gap: 4px; padding: 12px 16px; border: 1.5px solid var(--line); border-radius: var(--r); }
.sf-sa-plan-name{ font-weight: 700; color: var(--ink); }
.sf-sa-plan-details{ margin: 0; padding-inline-start: 1.2em; color: var(--ink-2); font-size: 14px; line-height: 1.6; }
.sf-sa-lost{ margin-block-start: 20px; }
.sf-sa-lost > summary{ cursor: pointer; inline-size: fit-content; }
.sf-sa-lost[open] > summary{ margin-block-end: 12px; }
