/* Wishlist — BEM blocks: .wishlist-control (volume page + cards), .wishlist-widget
   (header), .account-wishlist (Account glance), .wishlist-page + .wishlist-card
   (/wishlist/). Rules per DESIGN.md: 2px borders, no radius, Maax families at
   weight 400, colour tokens only. Type and buttons reuse the site's existing
   classes (.kd-card-title, .kd-card-creator, .kodansha--smallcaps,
   .volume-card__price*, .button--buy) rather than new sizes. */

/* [hidden] must beat the display values set below (the reset's rule loses to them). */
.wishlist-control[hidden], .wishlist-widget-item[hidden], .wishlist-widget[hidden], .wishlist-widget__count[hidden],
.account-wishlist__row [hidden], .wishlist-page [hidden] { display: none !important; }

/* ---------- Volume page control: same shape as the Follow button ---------- */
.wishlist-control { margin: 1.5rem 0 0; }
.wishlist-control + .release-follow { margin-top: 1rem; }
.wishlist-control__button { display: inline-flex; align-items: center; justify-content: center; gap: .65rem; min-height: 44px; }
.wishlist-control__button[aria-pressed="true"] { background: var(--color-background-2); }
.wishlist-control__button[aria-pressed="true"]:hover { background: var(--color-black); }
.wishlist-control__button[aria-pressed="true"] .wishlist-control__heart path { fill: currentColor; }
.wishlist-control__message { font-size: 0.875rem; line-height: var(--line-height); margin: .65rem 0 0; }
.wishlist-control__message:empty { display: none; }
.wishlist-control__message a { color: var(--color-text); }
.wishlist-control__text-action { padding: 0; border: 0; background: none; color: var(--color-text); font: inherit; font-weight: 400; line-height: inherit; text-decoration: underline; text-underline-offset: .15em; cursor: pointer; }
.wishlist-control button:disabled { opacity: .55; cursor: default; }

/* ---------- Card variant: the card's own CTA link treatment ---------- */
.wishlist-control--card { margin: 0; }
.volume-highlight .wishlist-control--card { margin: .75rem 0 0; }
.wishlist-control__link { color: var(--color-black); text-decoration-line: underline; text-decoration-skip-ink: auto; text-decoration-style: solid; text-decoration-thickness: 2px; cursor: pointer; }
.wishlist-control__link:hover { color: var(--color-gray-dark); }
.wishlist-control__link[aria-disabled="true"] { opacity: .55; cursor: default; }
.wishlist-control__link[aria-pressed="true"] { text-decoration-style: dotted; }
.wishlist-control__note { display: block; font-size: 0.875rem; letter-spacing: 0; text-transform: none; font-family: "Maax"; margin-top: .25rem; }
.wishlist-control__note:empty { display: none; }

/* ---------- Header: a sibling of the Cart widget ---------- */
/* Desktop: the <li> keeps the utility-nav 2px border; the anchor supplies the
   two cells (glyph, count) with the same 0.5rem padding and 2px divider the
   Cart widget uses (.cart-quantity-number). */
.utility-nav li.wishlist-widget-item { padding: 0; }
.utility-nav .wishlist-widget--desktop { display: flex; align-items: stretch; height: 100%; }
.wishlist-widget__icon { display: flex; align-items: center; padding: 0.5rem; }
/* The 16px heart is taller than the nav's 12px text line, which made this box
   ~3px taller than Cart / Account. Size the glyph cell to the same text line
   box (1lh) + padding the sibling widgets get, and let the heart float inside it.
   Browsers without `lh` keep the 0.5rem-padding fallback above. */
@supports (height: 1lh) {
	.utility-nav .wishlist-widget__icon { box-sizing: border-box; height: calc(1lh + 1rem); padding-block: 0; }
}
.wishlist-widget__heart { display: block; }
.utility-nav .wishlist-widget__count { display: flex; align-items: center; padding: 0.5rem; border-left: 2px solid var(--color-black); }
/* Hover inverts only the glyph cell; the count keeps the regular background. */
.utility-nav .wishlist-widget--desktop:hover { text-decoration: none; }
.utility-nav .wishlist-widget--desktop:hover .wishlist-widget__icon { color: var(--color-white); background: var(--color-black); }
/* Mobile icon row: inherits .mobile-cart-link / .mobile-cart-count from header.css. */
.wishlist-widget--mobile { margin-right: 0.5rem; }
.wishlist-widget--mobile .wishlist-widget__icon { padding: 0.5rem; }
/* Drawer: a text link like Account / Log Out, count in parentheses. */
.mobile-menu__wishlist { margin-top: 0.5rem; }
.wishlist-widget__count--drawer::before { content: " ("; }
.wishlist-widget__count--drawer::after { content: ")"; }

/* ---------- Account glance ---------- */
.account-wishlist { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.account-wishlist__view-all { white-space: nowrap; }
.account-wishlist__row { min-height: 5rem; }
.account-wishlist__covers, .account-wishlist__skeleton { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; list-style: none; margin: 0; padding: 0; }
.account-wishlist__cover { width: 6rem; flex: 0 0 auto; }
.account-wishlist__cover img { display: block; width: 100%; height: auto; }
.account-wishlist__cover-link { display: block; }
.account-wishlist__cover-text { display: flex; align-items: center; justify-content: center; aspect-ratio: 2 / 3; padding: 0.5rem; text-align: center; }
.account-wishlist__more { color: var(--color-text-2); }
.account-wishlist__skeleton span { width: 6rem; aspect-ratio: 2 / 3; background: var(--color-line-3); }
.account-wishlist__empty, .account-wishlist__error { margin: 0; }

/* ---------- /wishlist/ page ---------- */
.wishlist-page__title-block { display: flex; flex-direction: column; gap: 1rem; }
.wishlist-page__count { margin: 0; color: var(--color-text-2); }
.wishlist-page__count:empty { display: none; }
.wishlist-page__auth-title { font-family: "Maax Bold"; font-weight: 400; font-size: 1.75rem; line-height: var(--line-height-heading); margin: 0 0 0.5rem; }
.wishlist-page__auth-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }

/* Toolbar: sort is a row of smallcaps text options (wireframe WishlistPage),
   the active one underlined like a smallcaps CTA link. */
.wishlist-page__toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 1.5rem; margin-bottom: 1.5rem; }
.wishlist-page__sort { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1.5rem; }
.wishlist-page__sort-label { color: var(--color-text); line-height: 1.2rem; }
.wishlist-page__sort-option { padding: 0; border: 0; background: none; color: var(--color-text-2); cursor: pointer; line-height: 1.2rem; }
.wishlist-page__sort-option:hover { color: var(--color-black); }
.wishlist-page__sort-option[aria-pressed="true"] { color: var(--color-black); text-decoration-line: underline; text-decoration-color: currentColor; text-decoration-thickness: 2px; text-underline-offset: .3rem; }
.wishlist-page__sort-option:focus-visible { outline: 2px solid var(--color-focus-ring); outline-offset: 2px; }
/* Every button on the page is a plain .button--secondary (components.css). */
.wishlist-page .button:disabled { opacity: .55; cursor: default; }

.wishlist-page__grid, .wishlist-page__skeleton { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem 1.25rem; list-style: none; margin: 0; padding: 0; }
.wishlist-page__empty { text-align: center; padding: 2rem 0; }
.wishlist-page__error { padding: 1rem 0; }
.wishlist-page__message { font-size: 0.875rem; margin: 1rem 0 0; }
.wishlist-page__message:empty { display: none; }
.wishlist-page__more { margin-top: 2rem; text-align: center; }

/* Card: cover, smallcaps series, .kd-card-title, .kd-card-creator, the
   volume-card price row (css/pages/volume-grid.css is enqueued on this page),
   then the site's buy buttons. */
.wishlist-card { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.wishlist-card__cover { display: block; aspect-ratio: 2 / 3; overflow: hidden; text-decoration: none; }
.wishlist-card__cover img { display: block; width: 100%; height: 100%; object-fit: contain; }
.wishlist-card__cover-placeholder { display: flex; align-items: center; justify-content: center; height: 100%; padding: 1rem; text-align: center; color: var(--color-text-2); }
.wishlist-card__series { margin-top: 0.5rem; color: var(--color-gray-dark); }
.wishlist-card .volume-card__price-row { margin-bottom: 0; min-height: 0; }
.wishlist-card__release { margin: 0; font-size: 0.875rem; color: var(--color-gray-dark); }
.wishlist-card__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
/* Card buttons share the row (cards are narrow at 3-up); side padding tightens to fit. */
.wishlist-card__actions .button { flex: 1 1 auto; padding-left: 0.75rem; padding-right: 0.75rem; }
.wishlist-card--skeleton .wishlist-card__cover { background: var(--color-line-3); }
.wishlist-card__line { display: block; height: 0.9rem; margin-top: 0.5rem; background: var(--color-line-3); }
.wishlist-card__line--short { width: 60%; }

/* Success page note under a purchased item. */
.success__item-wishlist { color: var(--color-text-2); }

@media (max-width: 1024px) {
	.wishlist-page__grid, .wishlist-page__skeleton { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
	.wishlist-control__button { width: 100%; }
	.wishlist-page__toolbar { flex-direction: column; align-items: stretch; }
	.wishlist-page__add-all { width: 100%; }
}
@media (max-width: 480px) {
	.wishlist-page__grid, .wishlist-page__skeleton { gap: 1.5rem 0.75rem; }
	.wishlist-card__actions .button { padding-left: 0.5rem; padding-right: 0.5rem; }
}
