/**
 * Front-end structural styles: card grid wrapper, preview carousel, and the
 * product table. The CARD LOOK itself lives in the editable Card CSS template
 * (Settings → Templates); this file only handles structure/behaviour shells.
 *
 * @package WP_Frictionless_PDF_Seller
 */

/* ---- card grid wrapper ---- */
/* justify-content:center keeps a lone card (or a part-full last row) centred in
   whatever column it's dropped into, so [render_pdf_card] needs no wrapper div. */
.wfps-cards { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; justify-content: center; }

/* ---- preview wrapper (carousel/solo image + Preview button beneath) ---- */
.wfps-preview { display: flex; flex-direction: column; }

/* ---- preview carousel (native scroll-snap) ---- */
.wfps-carousel { position: relative; width: 100%; aspect-ratio: 1 / 1.414; overflow: hidden; }
.wfps-carousel__track {
	display: flex; height: 100%;
	overflow-x: auto; scroll-snap-type: x mandatory;
	scrollbar-width: none; -ms-overflow-style: none;
}
.wfps-carousel__track::-webkit-scrollbar { display: none; }
.wfps-carousel__slide {
	flex: 0 0 100%; width: 100%; height: 100%;
	object-fit: cover; display: block; scroll-snap-align: center;
}
.wfps-carousel__solo {
	width: 100%; aspect-ratio: 1 / 1.414;
	object-fit: cover; display: block;
}
.wfps-card__noimg { width: 100%; aspect-ratio: 1 / 1.414; min-height: 160px; background: #eef0f2; }

/* Bespoke cover image (#25): any aspect ratio, so scale it to fit the A4 frame
   without cropping (letterboxed against the media background). The extra .wfps-card__media
   qualifier outranks the inline ".wfps-card__media img { object-fit: cover }" card rule. */
.wfps-card__media img.wfps-cover--contain,
img.wfps-cover--contain { object-fit: contain; }

/* "Preview" expand button sitting under the images */
.wfps-preview__expand {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	align-self: center; margin-top: 8px; padding: 6px 14px; cursor: pointer;
	background: transparent; color: var(--wfps-accent, #ec0000);
	border: 1px solid currentColor; border-radius: 999px;
	font: 600 13px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.wfps-preview__expand:hover { background: rgba(0,0,0,.04); }
.wfps-preview__icon { font-size: 14px; }

/* ---- lightbox (full-size page preview) ---- */
.wfps-lightbox {
	position: fixed; inset: 0; z-index: 100001; display: none;
	align-items: center; justify-content: center;
	background: rgba(8,10,14,.9); padding: 24px;
}
.wfps-lightbox.is-open { display: flex; }
.wfps-lightbox__stage {
	margin: 0; max-width: 100%; max-height: 100%;
	display: flex; align-items: center; justify-content: center;
}
.wfps-lightbox__img {
	max-width: min(92vw, 900px); max-height: 88vh;
	object-fit: contain; display: block;
	box-shadow: 0 10px 50px rgba(0,0,0,.5); background: #fff; border-radius: 4px;
}
.wfps-lightbox__nav {
	position: absolute; top: 50%; transform: translateY(-50%);
	width: 46px; height: 46px; border: 0; border-radius: 50%;
	background: rgba(255,255,255,.15); color: #fff; font-size: 26px; line-height: 1;
	cursor: pointer; transition: background .15s;
}
.wfps-lightbox__nav:hover { background: rgba(255,255,255,.3); }
.wfps-lightbox__prev { left: 16px; }
.wfps-lightbox__next { right: 16px; }
.wfps-lightbox__close {
	position: absolute; top: 14px; right: 18px; width: 40px; height: 40px;
	border: 0; background: transparent; color: #fff; font-size: 32px; line-height: 1;
	cursor: pointer; border-radius: 8px;
}
.wfps-lightbox__close:hover { background: rgba(255,255,255,.15); }
.wfps-lightbox__count {
	position: absolute; bottom: 18px; left: 0; right: 0; text-align: center;
	color: #fff; font: 600 13px system-ui, sans-serif; opacity: .85;
}

.wfps-carousel__nav {
	position: absolute; top: 50%; transform: translateY(-50%);
	width: 30px; height: 30px; border: 0; border-radius: 50%;
	background: rgba(0,0,0,.45); color: #fff; font-size: 18px; line-height: 1;
	cursor: pointer; opacity: 0; transition: opacity .15s; z-index: 2;
}
.wfps-carousel:hover .wfps-carousel__nav,
.wfps-carousel:focus-within .wfps-carousel__nav { opacity: 1; }
.wfps-carousel__prev { left: 6px; }
.wfps-carousel__next { right: 6px; }

.wfps-carousel__dots {
	position: absolute; bottom: 6px; left: 0; right: 0;
	display: flex; gap: 5px; justify-content: center; z-index: 2;
}
.wfps-carousel__dot {
	width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%;
	background: rgba(255,255,255,.55); cursor: pointer;
}
.wfps-carousel__dot.is-active { background: #fff; }

/* ---- product table ---- */
.wfps-table-wrap { overflow-x: auto; }
.wfps-table {
	width: 100%; border-collapse: collapse;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.wfps-table th, .wfps-table td {
	padding: 10px 12px; border-bottom: 1px solid #eee; text-align: left; font-size: 14px;
}
.wfps-table th {
	cursor: pointer; user-select: none; white-space: nowrap;
	background: #fafafa; border-bottom: 2px solid #e3e3e3;
}
.wfps-table th[aria-sort="ascending"]::after  { content: " \25B2"; font-size: 10px; }
.wfps-table th[aria-sort="descending"]::after { content: " \25BC"; font-size: 10px; }
.wfps-table tbody tr:hover { background: #fcfcfc; }
.wfps-table__price { font-weight: 700; white-space: nowrap; }
.wfps-table .wfps-buy {
	display: inline-block; padding: 6px 14px; border-radius: 6px;
	background: var(--wfps-accent, #ec0000); color: #fff;
	text-decoration: none; font-weight: 600; font-size: 13px; white-space: nowrap;
}

/* ---- pack tables ([render_pdf_table table="…"]) ----
   Matches the site: white cards with a red top bar (home page tiles), soft grey
   inner tiles (account page). The theme styles bare links and buttons, so the
   interactive bits here reset text-decoration / borders / line-height. */
.wfps-ptable {
	--wfps-pt-line: #e6e6e6;
	--wfps-pt-tile: #fafafa;
	--wfps-pt-muted: #6b6b6b;
	margin: 0 auto 56px; max-width: 1100px;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	color: #1d1d1f;
}
.wfps-ptable__head { text-align: center; margin: 0 0 22px; }
.wfps-ptable__title { margin: 0 0 6px; font-size: 26px; font-weight: 800; line-height: 1.2; }
.wfps-ptable__title::after {
	content: ""; display: block; width: 56px; height: 3px; margin: 12px auto 0;
	background: var(--wfps-accent, #ec0000); border-radius: 2px;
}
.wfps-ptable__intro { margin: 10px auto 0; max-width: 40em; color: var(--wfps-pt-muted); font-size: 15px; }

.wfps-ptable__grid { display: flex; flex-direction: column; gap: 14px; }
.wfps-ptable__colheads,
.wfps-ptable__row {
	display: grid; gap: 14px; align-items: stretch;
	grid-template-columns: minmax(110px, 170px) repeat(var(--wfps-cols, 2), minmax(0, 1fr));
}
.wfps-ptable__colheads { padding: 0 18px; }
.wfps-ptable__colheads span {
	font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
	color: var(--wfps-pt-muted); padding-left: 2px;
}

.wfps-ptable__row {
	background: #fff; border: 1px solid var(--wfps-pt-line); border-top: 4px solid var(--wfps-accent, #ec0000);
	border-radius: 8px; padding: 16px 18px; box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.wfps-ptable__label {
	align-self: center; font-size: 20px; font-weight: 800; letter-spacing: .01em; line-height: 1.2;
}
/* Optional per-row tint (bronze / silver / gold …): top bar, a soft wash from
   the left, a medal dot and a deepened label colour. Buttons keep the accent. */
.wfps-ptable__row--tinted {
	border-top-color: var(--wfps-row-tint);
	background: linear-gradient(90deg, color-mix(in srgb, var(--wfps-row-tint) 14%, #fff) 0%, #fff 55%);
}
.wfps-ptable__row--tinted .wfps-ptable__label {
	display: flex; align-items: center; gap: 10px;
	color: color-mix(in srgb, var(--wfps-row-tint) 70%, #1d1d1f);
}
.wfps-ptable__row--tinted .wfps-ptable__label::before {
	content: ""; flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%;
	background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--wfps-row-tint) 35%, #fff), var(--wfps-row-tint) 70%);
	box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--wfps-row-tint) 75%, #000), 0 1px 2px rgba(0,0,0,.15);
}

.wfps-ptable__cell {
	display: flex; flex-direction: column; min-width: 0;
	background: var(--wfps-pt-tile); border: 1px solid #ececec; border-radius: 8px;
	padding: 14px 16px;
}
.wfps-ptable__cell { transition: border-color .15s, box-shadow .15s; }
.wfps-ptable__cell--paid { background: #fff; }
/* The red outline only appears on hover (or keyboard focus inside the tile). */
.wfps-ptable__cell:not(.wfps-ptable__cell--empty):hover,
.wfps-ptable__cell:not(.wfps-ptable__cell--empty):focus-within {
	border-color: var(--wfps-accent, #ec0000); box-shadow: 0 4px 14px rgba(236,0,0,.08);
}
.wfps-ptable__cell--empty { background: transparent; border: 1px dashed #e8e8e8; }
.wfps-ptable__col {
	display: none; margin-bottom: 4px;
	font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--wfps-pt-muted);
}
.wfps-ptable a.wfps-ptable__name {
	color: inherit; font-size: 16px; font-weight: 700; line-height: 1.3;
	/* The theme underlines content links hard; keep the tile titles clean. */
	text-decoration: none !important; border: 0 !important; box-shadow: none !important; background-image: none !important;
}
.wfps-ptable a.wfps-ptable__name:hover { color: var(--wfps-accent, #ec0000); }

.wfps-ptable__cell { container-type: inline-size; }
.wfps-ptable__foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 14px; }
.wfps-ptable .wfps-ptable__foot .wfps-buy,
.wfps-ptable .wfps-ptable__foot .wfps-add,
.wfps-ptable .wfps-ptable__foot .wfps-ptable__more {
	box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center;
	height: 38px; margin: 0; padding: 0 16px; border-radius: 6px; cursor: pointer;
	font: 700 14px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	letter-spacing: 0; text-transform: none; text-decoration: none; white-space: nowrap;
	box-shadow: none; transition: background-color .15s, border-color .15s, color .15s;
}
.wfps-ptable .wfps-ptable__foot .wfps-buy {
	flex: 0 0 auto; background: var(--wfps-accent, #ec0000); color: #fff; border: 1px solid var(--wfps-accent, #ec0000);
}
.wfps-ptable .wfps-ptable__foot .wfps-buy:hover { filter: brightness(.92); color: #fff; }
.wfps-ptable .wfps-ptable__foot .wfps-ptable__more {
	background: #fff; color: #1d1d1f; border: 1px solid #d6d6d6;
}
.wfps-ptable .wfps-ptable__foot .wfps-ptable__more:hover { border-color: #1d1d1f; background: #fff; color: #1d1d1f; }
.wfps-ptable .wfps-ptable__foot .wfps-add {
	gap: 6px; background: #fff; color: var(--wfps-accent, #ec0000); border: 1px solid var(--wfps-accent, #ec0000);
}
.wfps-ptable .wfps-ptable__foot .wfps-add:hover { background: color-mix(in srgb, var(--wfps-accent, #ec0000) 8%, #fff); }
.wfps-add__icon { flex: 0 0 auto; }
/* Narrow tile (phones, or 3+ columns): Add to basket collapses to its icon. */
@container (max-width: 340px) {
	.wfps-ptable .wfps-ptable__foot .wfps-add { width: 38px; padding: 0; }
	.wfps-add__label { display: none; }
}

.wfps-modal--details { width: 560px; padding-top: 44px; }
.wfps-modal--details .wfps-cards { display: block; }

@media (max-width: 760px) {
	.wfps-ptable__colheads { display: none; }
	.wfps-ptable__row { grid-template-columns: 1fr; padding: 14px; }
	.wfps-ptable__label { font-size: 18px; }
	.wfps-ptable__col { display: block; }
	.wfps-ptable__cell--empty { display: none; }
}

/* ============================================================ Phase 4: checkout */

/* Add-to-basket button (auto-injected next to a card's Buy button) */
.wfps-add {
	display: inline-block; margin-top: 8px; margin-left: 8px;
	padding: 9px 14px; border-radius: 8px; cursor: pointer;
	background: transparent; color: var(--wfps-accent, #ec0000);
	border: 1px solid currentColor; font-weight: 600; font-size: 14px;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.wfps-add:hover { background: rgba(0,0,0,.04); }

/* Floating basket button */
.wfps-basket-btn {
	position: fixed; right: 18px; bottom: 18px; z-index: 99998;
	display: inline-flex; align-items: center; gap: 6px;
	padding: 12px 16px; border: 0; border-radius: 999px; cursor: pointer;
	background: var(--wfps-accent, #ec0000); color: #fff;
	font-size: 16px; font-weight: 700; box-shadow: 0 4px 16px rgba(0,0,0,.25);
}
.wfps-basket-count {
	min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
	background: #fff; color: #111; font-size: 12px; line-height: 20px; text-align: center;
}

/* Toast */
.wfps-toast {
	position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
	z-index: 100000; background: #111; color: #fff; padding: 11px 18px;
	border-radius: 8px; font-size: 14px; opacity: 0; transition: opacity .25s, transform .25s;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.wfps-toast.is-shown { opacity: 1; transform: translate(-50%, 0); }

/* Modal */
body.wfps-modal-open { overflow: hidden; }
.wfps-modal-overlay {
	position: fixed; inset: 0; z-index: 99999;
	background: rgba(15,18,22,.55); display: flex; align-items: flex-start;
	justify-content: center; padding: 24px 16px; overflow-y: auto;
}
.wfps-modal {
	position: relative; width: 440px; max-width: 100%;
	background: #fff; border-radius: 14px; padding: 26px 24px 24px;
	box-shadow: 0 18px 60px rgba(0,0,0,.35); margin: auto;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.wfps-modal__close {
	position: absolute; top: 10px; right: 12px; width: 32px; height: 32px;
	border: 0; background: transparent; font-size: 26px; line-height: 1;
	color: #888; cursor: pointer; border-radius: 6px;
}
.wfps-modal__close:hover { background: #f1f1f1; color: #222; }

/* Checkout content */
.wfps-checkout__title { margin: 0 0 16px; font-size: 20px; }
.wfps-checkout__summary { margin-bottom: 16px; }
.wfps-checkout__line {
	display: flex; justify-content: space-between; align-items: center;
	gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px solid #f0f0f0;
}
.wfps-checkout__lineright { display: inline-flex; align-items: center; gap: 10px; }
.wfps-checkout__line--total { font-weight: 700; font-size: 16px; border-bottom: 0; border-top: 2px solid #eee; margin-top: 4px; }
.wfps-checkout__discount { color: #1a7f37; font-size: 13px; border-bottom: 0; }

/* "Got a code?" row in the basket drawer */
.wfps-checkout__code { margin: 10px 0 4px; }
.wfps-checkout__codeRow { display: flex; gap: 8px; align-items: center; }
.wfps-checkout__codeInput { flex: 1 1 auto; text-transform: uppercase; }
.wfps-checkout__codeApply { white-space: nowrap; margin: 0; }
.wfps-checkout__codeMsg { font-size: 12px; margin-top: 6px; min-height: 14px; color: #666; }
.wfps-checkout__codeMsg.is-ok { color: #1a7f37; }
.wfps-checkout__codeMsg.is-err { color: #b32d2e; }
.wfps-checkout__remove {
	border: 0; background: transparent; color: #b32d2e; font-size: 20px;
	line-height: 1; cursor: pointer; padding: 0 4px;
}
.wfps-checkout__label { display: block; font-weight: 600; font-size: 14px; margin: 4px 0 6px; }
.wfps-checkout__input {
	width: 100%; box-sizing: border-box; padding: 11px 13px; font-size: 15px;
	border: 1px solid #ccc; border-radius: 8px;
}
.wfps-checkout__help { margin: 8px 0 4px; font-size: 12px; color: #666; }
.wfps-invoice-note { margin: 12px 0; font-size: 14px; color: #666; }
.wfps-checkout__check { display: flex; align-items: center; gap: 8px; margin: 14px 0; font-size: 13px; color: #444; }
.wfps-checkout__role {
	width: 100%; box-sizing: border-box; padding: 9px 13px; font-size: 13px;
	border: 1px solid #ccc; border-radius: 8px; margin: -6px 0 14px; color: #444;
}
.wfps-checkout__field { margin: 14px 0; min-height: 10px; }
.wfps-checkout__submit { width: 100%; margin-top: 14px; padding: 13px; font-size: 16px; border: 0; cursor: pointer; }
.wfps-checkout__submit:disabled { opacity: .6; cursor: default; }
.wfps-checkout__error {
	margin-top: 12px; padding: 10px 12px; border-radius: 8px;
	background: #fcebea; color: #b32d2e; font-size: 13px;
}
.wfps-checkout__note { margin-top: 14px; color: #1a7f37; font-size: 14px; }
.wfps-checkout__divider {
	display: flex; align-items: center; text-align: center;
	margin: 16px 0 4px; color: #888; font-size: 13px;
}
.wfps-checkout__divider::before,
.wfps-checkout__divider::after {
	content: ""; flex: 1; height: 1px; background: #e3e3e3;
}
.wfps-checkout__divider span { padding: 0 12px; }
.wfps-dl-list { display: flex; flex-direction: column; gap: 10px; }
.wfps-dl-link { text-align: center; }
.wfps-pack-row { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; border-bottom: 1px solid #e5e5e5; }
.wfps-pack-row__status { margin: 0; font-size: 14px; }
.wfps-pack-row__again[hidden] { display: none; }
.wfps-pack-row__page { font-size: 14px; }
.wfps-pack-note { margin-top: 14px; font-size: 14px; color: #646970; }

/* ============================================================ full-page card */
/* Used on the single product page (see WFPS_Single_Product::inject_card). Big,
   full-width, image beside the details on desktop; stacked (portrait) on
   mobile. Layout only — colours/typography still come from the editable Card
   CSS template, so this works even when that template has been customised. */
.wfps-card.wfps-card--fullpage {
	width: 100%; max-width: 1100px; margin: 0 auto; flex-direction: row;
}
.wfps-card--fullpage .wfps-card__media { width: 50%; }
.wfps-card--fullpage .wfps-card__body {
	width: 50%; padding: 32px 36px; justify-content: center; gap: 14px;
}
.wfps-card--fullpage .wfps-card__title { font-size: 28px; line-height: 1.2; }
.wfps-card--fullpage .wfps-card__desc { font-size: 15px; }

/* ---- "read more" clamp for long descriptions (#23) ----
   Added by carousel.js only when the text actually overflows, so it works
   regardless of a customised Card CSS/HTML template. */
.wfps-card__desc.wfps-clamp {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 4;
	line-clamp: 4;
	overflow: hidden;
}
.wfps-card--fullpage .wfps-card__desc.wfps-clamp { -webkit-line-clamp: 6; line-clamp: 6; }
.wfps-card__desc.wfps-clamp--open {
	display: block; overflow: visible;
	-webkit-line-clamp: unset; line-clamp: unset;
}
.wfps-card__more {
	align-self: flex-start; background: none; border: 0; padding: 0; margin: 4px 0 0;
	color: var(--wfps-accent, #ec0000); font: inherit; font-size: 13px; font-weight: 600;
	cursor: pointer;
}
.wfps-card__more:hover { text-decoration: underline; }
.wfps-card--fullpage .wfps-card__price { font-size: 26px; }
.wfps-card--fullpage .wfps-buy,
.wfps-card--fullpage .wfps-add { font-size: 16px; padding: 13px 22px; }

@media (max-width: 782px) {
	.wfps-card.wfps-card--fullpage { flex-direction: column; max-width: 520px; }
	.wfps-card--fullpage .wfps-card__media,
	.wfps-card--fullpage .wfps-card__body { width: 100%; }
}


/* ---- account dashboard ([wfps_account_dashboard]) ----------------------
   One collapsible <details> section per thing the account holds (downloads,
   flashcards, saved starters, scenes…), each with a count in its heading, so
   a closed section still says what is inside. Items sit in a responsive tile
   grid; the whole tile is the link. No JS: <details> does the folding. */
.wfps-dash { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.wfps-dash__head {
	display: flex; flex-wrap: wrap; gap: 10px 25px;
	justify-content: space-between; align-items: baseline;
	margin-bottom: 22px;
}
.wfps-dash__who { margin: 0; color: #555; font-size: 15px; }
.wfps-dash__links { margin: 0; font-size: 14px; }
.wfps-dash__links a { color: #666; text-decoration: underline; margin-left: 18px; }
.wfps-dash__links a:first-child { margin-left: 0; }
.wfps-dash__note { color: #555; font-size: 15px; margin: 0 0 20px; }

/* sections */
.wfps-dash__sections { display: flex; flex-direction: column; gap: 12px; }
.wfps-dash__sec {
	border: 1px solid #e6e6e6; border-radius: 10px; background: #fff;
	overflow: hidden;
}
.wfps-dash__sec[open] { border-color: #d8d8d8; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04); }
.wfps-dash__sum {
	display: flex; align-items: center; gap: 12px;
	padding: 16px 20px; cursor: pointer; list-style: none;
	font-size: 17px; font-weight: 600; color: #222; user-select: none;
}
.wfps-dash__sum::-webkit-details-marker { display: none; }
.wfps-dash__sum:hover { background: #fafafa; }
.wfps-dash__sum:focus-visible { outline: 2px solid var(--wfps-accent, #ec0000); outline-offset: -2px; }
.wfps-dash__sum-title { flex: 1 1 auto; }
/* app wordmark before the title: the SVGs are 2048×550, so height sets width */
.wfps-dash__logo { flex: 0 0 auto; height: 26px; width: auto; display: block; margin-right: -2px; }
.wfps-dash__logo + .wfps-dash__sum-title { font-weight: 500; color: #555; }
.wfps-dash__count {
	flex: 0 0 auto; min-width: 26px; padding: 2px 9px; border-radius: 999px;
	background: #f1f1f1; color: #555; font-size: 13px; font-weight: 600;
	text-align: center; line-height: 1.6;
}
.wfps-dash__sec[open] .wfps-dash__count { background: var(--wfps-accent, #ec0000); color: #fff; }
.wfps-dash__chev {
	flex: 0 0 auto; width: 9px; height: 9px; margin: 0 4px 0 6px;
	border-right: 2px solid #999; border-bottom: 2px solid #999;
	transform: rotate(45deg) translateY(-2px); transition: transform 0.15s;
}
.wfps-dash__sec[open] .wfps-dash__chev { transform: rotate(-135deg) translateY(-2px); }
.wfps-dash__body { padding: 4px 20px 20px; border-top: 1px solid #f0f0f0; }
.wfps-dash__sub { font-size: 14px; font-weight: 600; color: #666; text-transform: uppercase; letter-spacing: 0.04em; margin: 22px 0 10px; }
.wfps-dash__body > .wfps-dash__sub:first-child { margin-top: 12px; }

/* item tiles */
.wfps-dash__grid {
	display: grid; gap: 12px; margin-top: 14px;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.wfps-dash__card {
	display: flex; flex-direction: column; gap: 4px; min-height: 84px;
	padding: 14px 16px; border: 1px solid #e6e6e6; border-radius: 8px;
	background: #fafafa; color: inherit; text-decoration: none;
	transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
a.wfps-dash__card:hover {
	border-color: var(--wfps-accent, #ec0000); background: #fff; transform: translateY(-1px);
}
a.wfps-dash__card:hover .wfps-dash__name { color: var(--wfps-accent, #ec0000); }
.wfps-dash__name { color: #222; font-size: 15px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.wfps-dash__hint { color: #777; font-size: 13px; }
.wfps-dash__date { color: #999; font-size: 12px; margin-top: auto; padding-top: 6px; }
.wfps-dash__card--dl .wfps-dash__date { margin-top: 0; padding-top: 0; }
.wfps-dash__dl { margin: 8px 0 0; }
.wfps-dash__files { margin-top: 10px; font-size: 14px; }
.wfps-dash__files summary { cursor: pointer; }
.wfps-dash__files ul { margin: 8px 0 0; padding: 0; list-style: none; }
.wfps-dash__files li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-top: 1px solid #e5e5e5; }
.wfps-dash__files li span { min-width: 0; overflow-wrap: anywhere; }
.wfps-dash__files button { flex: none; padding: 4px 10px; font-size: 13px; cursor: pointer; }
.wfps-dash__dl button {
	background: #d90707; color: #fff; border: 0; border-radius: 4px;
	padding: 8px 16px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.wfps-dash__dl button:hover { background: #b80606; }
.wfps-dash__empty { color: #666; font-size: 15px; line-height: 1.6; margin: 14px 0 0; }

/* flashcards: the three built-in sets as stat tiles */
.wfps-dash__stats {
	display: grid; gap: 12px; margin-top: 14px;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.wfps-dash__stat {
	display: flex; flex-direction: column; gap: 2px;
	padding: 16px 18px; border-radius: 8px; color: inherit; text-decoration: none;
	background: #fff5f5; border: 1px solid #f5d0d0;
	transition: border-color 0.15s, transform 0.15s;
}
a.wfps-dash__stat:hover { border-color: var(--wfps-accent, #ec0000); transform: translateY(-1px); }
.wfps-dash__stat--empty { background: #fafafa; border-color: #e6e6e6; color: #999; }
.wfps-dash__stat-n { font-size: 32px; font-weight: 700; line-height: 1.1; color: var(--wfps-accent, #ec0000); }
.wfps-dash__stat--empty .wfps-dash__stat-n { color: #bbb; }
.wfps-dash__stat-l { font-size: 15px; font-weight: 600; color: #222; }
.wfps-dash__stat--empty .wfps-dash__stat-l { color: #888; }
.wfps-dash__stat-b { font-size: 12px; color: #777; line-height: 1.4; }
.wfps-dash__stat-go { margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--wfps-accent, #ec0000); }

/* change-password form (inside the Account settings section) */
.wfps-dash__pw { margin: 0; }
.wfps-dash__pw form {
	max-width: 380px; padding: 18px;
	border: 1px solid #eee; border-radius: 6px; background: #fafafa;
}
.wfps-dash__pw p { margin: 0 0 14px; }
.wfps-dash__pw label { display: block; color: #333; font-size: 14px; margin-bottom: 6px; }
.wfps-dash__pw input[type="password"] {
	width: 100%; box-sizing: border-box; padding: 10px;
	border: 1px solid #ddd; border-radius: 4px; font-size: 15px; background: #fff;
}
.wfps-dash__pw input[type="password"]:focus {
	border-color: #c00; outline: none; box-shadow: 0 0 0 2px rgba(204, 0, 0, 0.12);
}
.wfps-dash__pw button {
	background: #c00; color: #fff; border: none; border-radius: 4px;
	padding: 10px 20px; font-size: 15px; cursor: pointer;
}
.wfps-dash__pw button:hover { background: #a00; }
.wfps-dash__sec--account .wfps-dash__note { margin: 14px 0 0; }
.wfps-dash__sec--account .wfps-login__ok,
.wfps-dash__sec--account .wfps-login__error { margin: 0 0 14px; }

/* ---- dashboard notices ----
   [wfps_login_form] and [wfps_register_form] moved to m4th5-core in Sep 2026
   and took their styles with them; these two stay because the dashboard's own
   notices use the same classes. m4th5-core/assets/css/identity.css carries an
   identical copy — change both together. */
.wfps-login__error {
	background: #fdecea; border: 1px solid #f5c2bd; border-radius: 4px;
	color: #a1241a; font-size: 14px; padding: 12px 15px; margin: 0 0 20px;
}
.wfps-login__ok {
	background: #edf7ed; border: 1px solid #c3e6c3; border-radius: 4px;
	color: #1e5b1e; font-size: 14px; padding: 12px 15px; margin: 0 0 20px;
}

@media (max-width: 600px) {
	.wfps-dash__sum { padding: 14px 16px; font-size: 16px; }
	.wfps-dash__logo { height: 22px; }
	.wfps-dash__body { padding: 4px 16px 16px; }
	.wfps-dash__grid { grid-template-columns: 1fr; }
}
