/*
 * FileSpark — Frontend Styles
 * Additive only; does not reset browser or theme defaults.
 */

/* =========================================================
   Container
   ========================================================= */
.filespark-container {
	max-width: 1100px;
	margin-right: auto;
	margin-left: auto;
	padding-right: 24px;
	padding-left: 24px;
	box-sizing: border-box;
}

/* =========================================================
   Archive page
   ========================================================= */
.filespark-archive {
	padding-top: 40px;
	padding-bottom: 60px;
}

.filespark-archive-title {
	margin-bottom: 32px;
	font-size: 2rem;
	line-height: 1.2;
}

.filespark-archive-empty {
	color: #666;
	font-size: 1rem;
}

/* Product grid — 3 columns, narrows on smaller screens */
.filespark-products-grid {
	display: grid;
	grid-template-columns: repeat( 3, 1fr );
	gap: 28px;
}

@media ( max-width: 900px ) {
	.filespark-products-grid {
		grid-template-columns: repeat( 2, 1fr );
	}
}

@media ( max-width: 540px ) {
	.filespark-products-grid {
		grid-template-columns: 1fr;
	}
}

/* =========================================================
   Product card (archive)
   ========================================================= */
.filespark-product-card {
	display: flex;
	flex-direction: column;
	border: 1px solid #e2e2e2;
	border-radius: 6px;
	overflow: hidden;
	background: #fff;
	transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.filespark-product-card:hover {
	box-shadow: 0 4px 18px rgba( 0, 0, 0, 0.1 );
	transform: translateY( -2px );
}

.filespark-product-card__image-link {
	display: block;
	overflow: hidden;
	line-height: 0;
}

.filespark-product-card__image {
	width: 100%;
	height: 200px;
	object-fit: cover;
	display: block;
	transition: transform 0.2s ease;
}

.filespark-product-card:hover .filespark-product-card__image {
	transform: scale( 1.03 );
}

.filespark-product-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 18px 20px 20px;
}

.filespark-product-card__title {
	margin: 0 0 8px;
	font-size: 1.05rem;
	line-height: 1.3;
}

.filespark-product-card__title a {
	text-decoration: none;
	color: inherit;
}

.filespark-product-card__title a:hover {
	text-decoration: underline;
}

.filespark-product-card__excerpt {
	margin: 0 0 14px;
	font-size: 0.9rem;
	color: #555;
	line-height: 1.5;
	flex: 1;
}

.filespark-product-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: auto;
	padding-top: 12px;
	border-top: 1px solid #f0f0f0;
}

.filespark-product-card__price {
	font-size: 1.05rem;
	font-weight: 600;
	color: #1a1a1a;
	white-space: nowrap;
}

.fspark-price-regular {
	opacity: 0.45;
}

.fspark-sale-badge {
	display: inline-block;
	padding: 1px 6px;
	background: var(--filespark-sale-bg, #dc2626);
	color: var(--filespark-sale-text, #ffffff);
	font-size: 0.7rem;
	font-weight: 700;
	border-radius: 3px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	vertical-align: middle;
	line-height: 1.6;
	margin-left: 4px;
}

.filespark-product-card__cta {
	font-size: 0.875rem;
	font-weight: var(--filespark-btn-weight, 600);
	text-decoration: none;
	color: var(--filespark-btn-text, #fff);
	background: var(--filespark-btn-color, #5b50d6);
	padding: 6px 14px;
	border-radius: var(--filespark-btn-radius, 6px);
	white-space: nowrap;
	transition: background 0.15s ease;
}

.filespark-product-card__cta:hover {
	background: var(--filespark-btn-hover, #4740c0);
	text-decoration: none;
	color: var(--filespark-btn-text, #fff);
}

/* =========================================================
   Archive filter bar
   ========================================================= */
.filespark-filters {
	margin-bottom: 28px;
}

.filespark-filters__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	flex-wrap: wrap;
}

.filespark-filters__left {
	display: flex;
	align-items: center;
	gap: 15px;
	flex-wrap: wrap;
	flex: 1;
}

.filespark-filters__right {
	display: flex;
	align-items: center;
	gap: 8px;
}

.filespark-filters__search {
	padding: 8px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 0.875rem;
	color: #333;
	background: #fff;
	box-sizing: border-box;
	width: 200px;
	max-width: 300px;
	transition: border-color 0.15s;
}

.filespark-filters__search:focus {
	outline: none;
	border-color: var( --filespark-btn-color, #5b50d6 );
	box-shadow: 0 0 0 2px rgba( 91, 80, 214, 0.12 );
}

.filespark-filters__group {
	position: relative;
}

.filespark-filters__trigger {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 8px 2px;
	background: none;
	border: none;
	font-size: 0.875rem;
	font-family: inherit;
	color: #374151;
	cursor: pointer;
	white-space: nowrap;
	line-height: 1.4;
}

.filespark-filters__trigger:hover {
	color: #111827;
}

.filespark-filters__chevron {
	display: inline-block;
	width: 0;
	height: 0;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid currentColor;
	flex-shrink: 0;
	transition: transform 0.15s;
}

.filespark-filters__trigger[aria-expanded="true"] .filespark-filters__chevron {
	transform: rotate( 180deg );
}

.filespark-filters__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	background: var( --filespark-btn-color, #5b50d6 );
	color: #fff;
	border-radius: 10px;
	font-size: 0.7rem;
	font-weight: 700;
	line-height: 1;
}

.filespark-filters__menu {
	position: absolute;
	top: calc( 100% + 4px );
	left: 0;
	z-index: 100;
	min-width: 180px;
	background: #fff;
	border: 1px solid #e2e2e2;
	border-radius: 6px;
	box-shadow: 0 4px 16px rgba( 0, 0, 0, 0.1 );
	padding: 6px 0;
	max-height: 280px;
	overflow-y: auto;
}

.filespark-filters__menu--right {
	left: auto;
	right: 0;
}

.filespark-filters__option {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 14px;
	font-size: 0.875rem;
	color: #374151;
	cursor: pointer;
	user-select: none;
}

.filespark-filters__option:hover {
	background: #f9fafb;
}

.filespark-filters__option input[type="checkbox"],
.filespark-filters__option input[type="radio"] {
	accent-color: var( --filespark-btn-color, #5b50d6 );
	cursor: pointer;
	flex-shrink: 0;
}

.filespark-btn-primary {
	display: inline-flex;
	align-items: center;
	padding: 8px 18px;
	background: var( --filespark-btn-color, #5b50d6 );
	color: var( --filespark-btn-text, #fff );
	border: none;
	border-radius: var( --filespark-btn-radius, 6px );
	font-size: 0.875rem;
	font-weight: var( --filespark-btn-weight, 600 );
	font-family: inherit;
	cursor: pointer;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.15s;
	flex-shrink: 0;
	line-height: 1.4;
}

.filespark-btn-primary:hover {
	background: var( --filespark-btn-hover, #4740c0 );
}

.filespark-filters__clear {
	font-size: 0.875rem;
	color: #6b7280;
	text-decoration: none;
	white-space: nowrap;
}

.filespark-filters__clear:hover {
	color: #374151;
	text-decoration: underline;
}

/* =========================================================
   Product page categories
   ========================================================= */
.filespark-product-categories {
	margin-top: 12px;
	font-size: 0.875rem;
	color: #6b7280;
}

.filespark-product-category-link {
	color: inherit;
}

.filespark-product-category-link:hover {
	text-decoration: underline;
}

/* =========================================================
   Pagination
   ========================================================= */
.filespark-pagination {
	margin-top: 40px;
	text-align: center;
}

.filespark-pagination .page-numbers {
	display: inline-flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.filespark-pagination .page-numbers li {
	margin: 0;
}

.filespark-pagination .page-numbers a,
.filespark-pagination .page-numbers span {
	display: inline-block;
	min-width: 38px;
	padding: 6px 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 0.9rem;
	text-align: center;
	text-decoration: none;
	color: #0073aa;
	background: #fff;
	transition: background 0.14s ease, color 0.14s ease;
}

.filespark-pagination .page-numbers a:hover {
	background: #0073aa;
	color: #fff;
	border-color: #0073aa;
}

.filespark-pagination .page-numbers .current {
	background: #0073aa;
	color: #fff;
	border-color: #0073aa;
	font-weight: 600;
}

/* =========================================================
   Single product page
   ========================================================= */
.filespark-single-product {
	padding-top: 40px;
	padding-bottom: 60px;
}

/* Two-column layout: image left, summary right */
.filespark-product-layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: 32px;
	margin-bottom: 40px;
}

.filespark-product-layout.has-image {
	grid-template-columns: 1fr 1fr;
	align-items: start;
}

@media ( max-width: 720px ) {
	.filespark-product-layout.has-image {
		grid-template-columns: 1fr;
	}
}

/* Product image */
.filespark-product-image {
	border-radius: 6px;
	overflow: hidden;
	line-height: 0;
}

.filespark-product-image__img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 6px;
}

/* Product summary */
.filespark-product-title {
	margin: 0 0 16px;
	font-size: 2rem;
	line-height: 1.2;
}

.filespark-product-excerpt {
	font-size: 1rem;
	color: #555;
	line-height: 1.6;
	margin: 0 0 20px;
}

.filespark-product-price {
	font-size: 1.6rem;
	font-weight: 700;
	color: #1a1a1a;
	margin-bottom: 24px;
}

.filespark-product-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

/* Full description below the fold */
.filespark-product-description {
	border-top: 1px solid #e2e2e2;
	padding-top: 32px;
	font-size: 1rem;
	line-height: 1.7;
	color: #333;
}

.filespark-product-description p:first-child {
	margin-top: 0;
}

.filespark-product-description p:last-child {
	margin-bottom: 0;
}

/* =========================================================
   Notices
   ========================================================= */
.filespark-notices {
	margin-bottom: 20px;
}

.filespark-notice {
	padding: 12px 16px;
	border-radius: 4px;
	margin-bottom: 8px;
	font-size: 0.9rem;
	line-height: 1.5;
}

.filespark-notice--success {
	background: #ecf7ed;
	border-left: 4px solid #46a049;
	color: #2d6a30;
}

.filespark-notice--error {
	background: #fdf0f0;
	border-left: 4px solid #cc4444;
	color: #8b1c1c;
}

.filespark-notice--info {
	background: #eef5fb;
	border-left: 4px solid #0073aa;
	color: #0a4a70;
}

/* =========================================================
   Shared button system
   ========================================================= */
.filespark-btn {
	display: inline-block;
	padding: 10px 20px;
	border: none;
	border-radius: 4px;
	font-size: 0.9rem;
	font-weight: 500;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	white-space: nowrap;
	line-height: 1.4;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
	box-sizing: border-box;
}

.filespark-btn--primary {
	background: var(--filespark-btn-color, #5b50d6);
	color: var(--filespark-btn-text, #fff);
	border-radius: var(--filespark-btn-radius, 6px);
	font-weight: var(--filespark-btn-weight, 600);
}

.filespark-btn--primary:hover {
	background: var(--filespark-btn-hover, #4740c0);
	color: var(--filespark-btn-text, #fff);
	text-decoration: none;
}

.filespark-btn--secondary {
	background: #f0f0f0;
	color: #333;
	border: 1px solid #ddd;
}

.filespark-btn--secondary:hover {
	background: #e0e0e0;
	color: #333;
}

.filespark-btn--ghost {
	background: transparent;
	color: #0073aa;
	border: 1px solid #0073aa;
}

.filespark-btn--ghost:hover {
	background: #0073aa;
	color: #fff;
}

.filespark-btn--sm {
	padding: 5px 12px;
	font-size: 0.8rem;
}

.filespark-btn--lg {
	padding: 14px 28px;
	font-size: 1rem;
}

.filespark-btn--full {
	display: block;
	width: 100%;
}

/* =========================================================
   Shared input
   ========================================================= */
.filespark-input {
	display: block;
	width: 100%;
	padding: 9px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 0.9rem;
	line-height: 1.4;
	color: #333;
	background: #fff;
	box-sizing: border-box;
	transition: border-color 0.15s ease;
}

.filespark-input:focus {
	outline: none;
	border-color: #0073aa;
	box-shadow: 0 0 0 2px rgba( 0, 115, 170, 0.15 );
}

/* =========================================================
   Status badges
   ========================================================= */
.filespark-status {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 12px;
	font-size: 0.8rem;
	font-weight: 500;
}

.filespark-status--pending   { background: #fff3cd; color: #856404; }
.filespark-status--complete  { background: #d4edda; color: #155724; }
.filespark-status--failed    { background: #f8d7da; color: #721c24; }
.filespark-status--refunded  { background: #e2e3e5; color: #383d41; }
.filespark-status--cancelled { background: #e2e3e5; color: #383d41; }

/* =========================================================
   Purchase link
   ========================================================= */
.filespark-purchase-link-form {
	display: inline-block;
}

/* =========================================================
   Pay what you want (Pro)
   ========================================================= */
.filespark-pwyw {
	margin-bottom: 10px;
}

.filespark-pwyw__label {
	display: block;
	margin-bottom: 5px;
	font-size: 0.875rem;
	font-weight: 600;
	color: #1e1e1e;
}

.filespark-pwyw__input-wrap {
	display: flex;
	align-items: stretch;
	max-width: 160px;
	border: 1px solid #d0d0d0;
	border-radius: 4px;
	overflow: hidden;
	background: #fff;
	transition: border-color 0.15s ease;
}

.filespark-pwyw__input-wrap:focus-within {
	border-color: #0073aa;
	box-shadow: 0 0 0 2px rgba( 0, 115, 170, 0.15 );
}

.filespark-pwyw__symbol {
	display: flex;
	align-items: center;
	padding: 0 10px;
	background: #f5f5f5;
	border-right: 1px solid #d0d0d0;
	font-size: 0.875rem;
	color: #555;
	white-space: nowrap;
	user-select: none;
}

.filespark-pwyw__input {
	flex: 1;
	min-width: 0;
	padding: 9px 10px;
	border: none;
	outline: none;
	background: transparent;
	font-size: 0.9rem;
	color: #1e1e1e;
}

/* =========================================================
   Variations (Pro)
   ========================================================= */
.filespark-variations {
	margin-bottom: 10px;
}

.filespark-variations__label {
	margin: 0 0 6px;
	font-size: 0.875rem;
	font-weight: 600;
	color: #1e1e1e;
}

.filespark-variations__options {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.filespark-var-btn {
	display: inline-flex;
	align-items: center;
	padding: 8px 16px;
	border: 2px solid #d0d0d0;
	border-radius: 6px;
	background: #fff;
	cursor: pointer;
	font-size: 0.875rem;
	line-height: 1.4;
	transition: border-color 0.15s, background 0.15s;
}

.filespark-var-btn:hover {
	border-color: #0073aa;
}

.filespark-var-btn.is-selected {
	border-color: #0073aa;
	background: rgba(0, 115, 170, 0.06);
}

.filespark-var-btn__label {
	font-weight: 500;
}

/* =========================================================
   Cart page
   ========================================================= */
.filespark-cart-empty {
	color: #666;
}

.filespark-cart-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 24px;
}

.filespark-cart-table th,
.filespark-cart-table td {
	padding: 12px 14px;
	text-align: left;
	border-bottom: 1px solid #e2e2e2;
	font-size: 0.9rem;
}

.filespark-cart-table thead th {
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #888;
	border-bottom-width: 2px;
}

.filespark-cart-col-remove {
	width: 48px;
	text-align: center;
}

.filespark-remove-btn {
	background: none;
	border: none;
	cursor: pointer;
	font-size: 1.2rem;
	color: #bbb;
	padding: 0 4px;
	line-height: 1;
	transition: color 0.15s;
}

.filespark-remove-btn:hover {
	color: #cc4444;
}

.filespark-cart-lower {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 32px;
	flex-wrap: wrap;
}

.filespark-coupon-section {
	flex: 1;
	min-width: 200px;
}

.filespark-coupon-applied {
	margin-bottom: 8px;
	font-size: 0.9rem;
}

.filespark-coupon-row {
	display: flex;
	gap: 8px;
}

.filespark-coupon-row .filespark-input {
	max-width: 220px;
}

.filespark-continue-shopping {
	display: inline-block;
	margin-bottom: 16px;
	font-size: 0.875rem;
	color: #6b7280;
	text-decoration: none;
}

.filespark-continue-shopping:hover {
	color: #374151;
	text-decoration: underline;
}

.filespark-cart-totals {
	min-width: 240px;
}

.filespark-cart-totals table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 16px;
}

.filespark-cart-totals th,
.filespark-cart-totals td {
	padding: 8px 4px;
	font-size: 0.9rem;
	border-bottom: 1px solid #f0f0f0;
}

.filespark-cart-totals th {
	text-align: left;
	color: #555;
	font-weight: normal;
}

.filespark-cart-totals td {
	text-align: right;
}

.filespark-row-discount td,
.filespark-row-discount th {
	color: #46a049;
}

.filespark-row-total th,
.filespark-row-total td {
	font-weight: 700;
	font-size: 1rem;
	border-top: 2px solid #e2e2e2;
	border-bottom: none;
	padding-top: 12px;
}

/* =========================================================
   Checkout page
   ========================================================= */
.filespark-checkout-columns {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 48px;
	align-items: start;
}

@media ( max-width: 720px ) {
	.filespark-checkout-columns {
		grid-template-columns: 1fr;
		gap: 32px;
	}
}

.filespark-checkout-section-title {
	font-size: 1.2rem;
	margin: 0 0 20px;
	padding-bottom: 12px;
	border-bottom: 1px solid #e2e2e2;
}

.filespark-field {
	margin-bottom: 16px;
}

.filespark-field label {
	display: block;
	margin-bottom: 5px;
	font-size: 0.875rem;
	font-weight: 500;
	color: #333;
}

.filespark-field label span {
	color: #cc4444;
	margin-left: 2px;
}

.filespark-field-row {
	display: grid;
	gap: 16px;
}

.filespark-field-row--two {
	grid-template-columns: 1fr 1fr;
}

@media ( max-width: 540px ) {
	.filespark-field-row--two {
		grid-template-columns: 1fr;
	}
}

.filespark-order-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 20px;
}

.filespark-order-table th,
.filespark-order-table td {
	padding: 10px 8px;
	font-size: 0.9rem;
	border-bottom: 1px solid #e2e2e2;
	text-align: left;
}

.filespark-order-table tfoot th {
	color: #555;
	font-weight: normal;
}

.filespark-order-table th:last-child,
.filespark-order-table td:last-child {
	text-align: right;
}

.filespark-order-table tfoot .filespark-row-total th,
.filespark-order-table tfoot .filespark-row-total td {
	font-weight: 700;
	font-size: 1rem;
	border-top: 2px solid #e2e2e2;
	border-bottom: none;
	padding-top: 12px;
}

.filespark-payment-section {
	margin-bottom: 20px;
	min-height: 4px;
}

.filespark-stripe-wrap {
	padding: 4px 0;
}

#fspark-payment-element {
	min-height: 40px;
}

.filespark-stripe-loading {
	font-size: 13px;
	color: #888;
	padding: 10px 0;
}

.filespark-agreement {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin-bottom: 14px;
	font-size: 0.875rem;
	color: #374151;
	cursor: pointer;
	line-height: 1.4;
}

.filespark-agreement input[type="checkbox"] {
	margin-top: 2px;
	flex-shrink: 0;
	accent-color: var(--filespark-btn-color, #5b50d6);
}

.filespark-secure-badge {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	margin-top: 10px;
	font-size: 0.8rem;
	color: #6b7280;
}

.filespark-secure-badge__logo {
	height: 20px;
	width: auto;
	vertical-align: middle;
	opacity: 0.75;
}

/* Gateway picker (rendered by Pro when multiple gateways are active) */
.filespark-gateway-picker {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 16px;
}

.filespark-gateway-picker__heading {
	margin: 0 0 4px;
	font-size: 0.8125rem;
	font-weight: 600;
	color: #6b7280;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.filespark-gateway-option {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	border: 2px solid #e5e7eb;
	border-radius: var(--filespark-btn-radius, 6px);
	cursor: pointer;
	background: #fff;
	transition: border-color 0.15s;
	user-select: none;
}

.filespark-gateway-option input[type="radio"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.filespark-gateway-option__radio {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	border: 2px solid #d1d5db;
	border-radius: 50%;
	background: #fff;
	transition: border-color 0.15s;
	position: relative;
}

.filespark-gateway-option__radio::after {
	content: '';
	position: absolute;
	inset: 3px;
	border-radius: 50%;
	background: var(--filespark-btn-color, #5b50d6);
	opacity: 0;
	transition: opacity 0.15s;
}

.filespark-gateway-option.is-active .filespark-gateway-option__radio,
.filespark-gateway-option:hover .filespark-gateway-option__radio {
	border-color: var(--filespark-btn-color, #5b50d6);
}

.filespark-gateway-option.is-active .filespark-gateway-option__radio::after {
	opacity: 1;
}

.filespark-gateway-option.is-active,
.filespark-gateway-option:hover {
	border-color: var(--filespark-btn-color, #5b50d6);
}

.filespark-gateway-option__logo {
	height: 22px;
	width: auto;
}

.filespark-gateway-option__label {
	font-size: 0.9375rem;
	font-weight: 500;
	color: #374151;
}

.filespark-gateway-option__balance {
	margin-left: auto;
	font-size: 0.75rem;
	color: var(--filespark-text-muted, #6b7280);
}

.filespark-terms-note {
	margin-top: 12px;
	font-size: 0.8rem;
	color: #888;
	text-align: center;
}

/* =========================================================
   Receipt / confirmation page
   ========================================================= */
.filespark-receipt-header {
	text-align: center;
	padding: 32px 0 24px;
}

.filespark-receipt-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #d4edda;
	color: #155724;
	font-size: 1.6rem;
	margin-bottom: 16px;
}

.filespark-receipt-title {
	margin: 0 0 8px;
	font-size: 1.6rem;
}

.filespark-receipt-subtitle {
	color: #555;
	margin: 0;
}

.filespark-receipt-details {
	max-width: 600px;
	margin: 24px auto 0;
}

.filespark-receipt-meta {
	display: grid;
	grid-template-columns: repeat( 2, 1fr );
	gap: 16px;
	margin-bottom: 28px;
	padding: 20px;
	background: #f9f9f9;
	border-radius: 6px;
}

@media ( max-width: 480px ) {
	.filespark-receipt-meta {
		grid-template-columns: 1fr;
	}
}

.filespark-receipt-meta-label {
	display: block;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #888;
	margin-bottom: 4px;
}

.filespark-receipt-meta-value {
	font-size: 0.95rem;
	font-weight: 500;
	color: #1a1a1a;
}

.filespark-receipt-items {
	width: 100%;
	border-collapse: collapse;
}

.filespark-receipt-items th,
.filespark-receipt-items td {
	padding: 10px 8px;
	font-size: 0.9rem;
	border-bottom: 1px solid #e2e2e2;
	text-align: left;
}

.filespark-receipt-items tfoot th {
	color: #555;
	font-weight: normal;
}

.filespark-receipt-items tfoot td {
	text-align: right;
}

.filespark-receipt-items tfoot .filespark-row-total th,
.filespark-receipt-items tfoot .filespark-row-total td {
	font-weight: 700;
	font-size: 1rem;
	border-top: 2px solid #e2e2e2;
	border-bottom: none;
	padding-top: 12px;
}

/* =========================================================
   Purchase history / account page
   ========================================================= */
.filespark-account-wrap {
	width: 100%;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
}

.filespark-account-empty,
.filespark-account-guest {
	padding: 32px 24px;
	margin: 0;
	color: #6b7280;
	font-size: 0.9rem;
}

.filespark-account-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9rem;
}
.filespark-account-table th,
.filespark-account-table td {
	padding: 13px 16px;
	text-align: left;
	border-bottom: 1px solid #e5e7eb;
	vertical-align: middle;
}
.filespark-account-table thead th {
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #9ca3af;
	background: #f9fafb;
	border-bottom: 1px solid #e5e7eb;
	white-space: nowrap;
}
.filespark-account-table tbody tr:last-child td { border-bottom: none; }
.filespark-account-table tbody tr:hover td { background: #fafafa; }

.filespark-account-col-order { font-weight: 600; white-space: nowrap; }
.filespark-account-col-date  { white-space: nowrap; color: #6b7280; }
.filespark-account-col-items {
	color: #6b7280;
	max-width: 240px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.filespark-account-col-total  { white-space: nowrap; }
.filespark-account-col-status { white-space: nowrap; }
.filespark-account-col-downloads { white-space: nowrap; position: relative; }

.filespark-account-pending-note { font-size: 0.8rem; color: #6b7280; font-style: italic; }

/* Details / summary download toggle */
.filespark-downloads-details summary {
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	list-style: none;
}
.filespark-downloads-details summary::-webkit-details-marker { display: none; }
.filespark-downloads-details .filespark-downloads-list {
	min-width: 220px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	padding: 4px 12px;
	margin-top: 6px;
	position: absolute;
	right: 0;
	z-index: 20;
	box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

/* Mobile: hide less critical columns, let order/status/downloads remain */
@media (max-width: 640px) {
	.filespark-account-col-items,
	.filespark-account-col-date { display: none; }
	.filespark-account-table th,
	.filespark-account-table td { padding: 11px 12px; }
}

/* =========================================================
   Account page — tabs
   ========================================================= */
.filespark-account-nav {
	display: flex;
	border-bottom: 1px solid #e5e7eb;
	background: #f9fafb;
}

.filespark-account-tab {
	padding: 13px 20px;
	font-size: 0.875rem;
	font-weight: 500;
	background: none;
	border: none;
	border-bottom: 2px solid transparent;
	cursor: pointer;
	color: #6b7280;
	margin-bottom: -1px;
	transition: color 0.15s, border-color 0.15s;
}

.filespark-account-tab:hover {
	color: #374151;
}

.filespark-account-tab.is-active {
	color: var(--filespark-btn-color, #5b50d6);
	border-bottom-color: var(--filespark-btn-color, #5b50d6);
	background: #fff;
}

.filespark-account-panel {
	display: none;
	padding: 28px;
}

.filespark-account-panel.is-active {
	display: block;
}

.filespark-account-panel--flush {
	padding: 0;
}

/* Profile form */
.filespark-profile-section {
	max-width: 480px;
}

.filespark-profile-section + .filespark-profile-section {
	margin-top: 28px;
	padding-top: 24px;
	border-top: 1px solid #e5e7eb;
}

.filespark-profile-section-title {
	font-size: 1rem;
	font-weight: 600;
	margin: 0 0 16px;
	color: #111827;
}

.filespark-field-note {
	margin: 4px 0 0;
	font-size: 0.8rem;
	color: #9ca3af;
}

/* Downloads flat list */
.filespark-account-downloads {
	display: flex;
	flex-direction: column;
}

.filespark-account-download-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 0;
	border-bottom: 1px solid #e5e7eb;
}

.filespark-account-download-item:last-child { border-bottom: none; }
.filespark-account-download-item.is-unavailable { opacity: 0.55; }

.filespark-account-download-meta {
	margin-top: 3px;
	font-size: 0.8rem;
	color: #9ca3af;
}

/* =========================================================
   Login page
   ========================================================= */
.filespark-login-wrap {
	max-width: 420px;
}

.filespark-login-links {
	margin-top: 12px;
	font-size: 0.875rem;
	color: #555;
}

.filespark-login-links a {
	color: #0073aa;
}

/* WordPress default login form overrides */
.filespark-login-form .login-username,
.filespark-login-form .login-password,
.filespark-login-form .login-remember {
	margin-bottom: 14px;
}

.filespark-login-form label {
	display: block;
	margin-bottom: 5px;
	font-size: 0.875rem;
	font-weight: 500;
}

.filespark-login-form input[type="text"],
.filespark-login-form input[type="password"] {
	display: block;
	width: 100%;
	padding: 9px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 0.9rem;
	box-sizing: border-box;
}

.filespark-login-form input[type="submit"] {
	display: inline-block;
	padding: 10px 24px;
	background: #0073aa;
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 0.9rem;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.15s ease;
}

.filespark-login-form input[type="submit"]:hover {
	background: #005b8a;
}

/* ── Download links ─────────────────────────────────────────────────── */

.filespark-receipt-downloads {
	margin-top: 28px;
	padding-top: 20px;
	border-top: 1px solid #e5e7eb;
}
.filespark-receipt-downloads__heading {
	font-size: 1rem;
	font-weight: 600;
	margin: 0 0 12px;
}

.filespark-downloads-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.filespark-downloads-list__item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px solid #e5e7eb;
}
.filespark-downloads-list__item:last-child { border-bottom: none; }
.filespark-downloads-list__item.is-unavailable { opacity: 0.55; }
.filespark-downloads-list__name { font-size: 0.9rem; }
.filespark-downloads-list__note {
	font-size: 0.8rem;
	color: #6b7280;
	font-style: italic;
}

.filespark-receipt-pending {
	margin-top: 20px;
	padding: 14px 16px;
	background: #fef9c3;
	border-radius: 6px;
	font-size: 0.9rem;
	color: #854d0e;
}



