/**
 * EDD Custom Styles
 *
 * Main stylesheet for Easy Digital Downloads customizations.
 * Matches the isla-stud.io website design system.
 *
 * @package lund-design
 */

/* ================================================================
   CSS Custom Properties
   ================================================================ */

:root {
	--edd-color-bg-primary: #f5f0eb;
	--edd-color-bg-secondary: #ffffff;
	--edd-color-header: #3c2415;
	--edd-color-accent: #d4a847;
	--edd-color-hover: #e8735a;
	--edd-color-text-primary: #2c2c2c;
	--edd-color-text-secondary: #666666;
	--edd-color-border: #e0d9d0;
	--edd-color-success: #4caf50;
	--edd-color-error: #d32f2f;
	--edd-color-warning: #ff9800;
	--edd-color-info: #2196f3;

	--edd-font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
	--edd-font-heading: 'Castledown', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

	--edd-space-xs: 0.25rem;
	--edd-space-sm: 0.5rem;
	--edd-space-md: 1rem;
	--edd-space-lg: 1.5rem;
	--edd-space-xl: 2rem;
	--edd-space-2xl: 3rem;

	--edd-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
	--edd-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
	--edd-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);

	--edd-radius-sm: 4px;
	--edd-radius-md: 8px;
	--edd-radius-lg: 12px;
}

/* ================================================================
   Product Cards Grid - [downloads] shortcode
   ================================================================ */

.edd_downloads_list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: var(--edd-space-xl);
	list-style: none;
	padding: 0;
	margin: var(--edd-space-xl) 0;
}

.edd_download {
	background: var(--edd-color-bg-secondary);
	border-radius: var(--edd-radius-lg);
	box-shadow: var(--edd-shadow-sm);
	overflow: hidden;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.edd_download:hover {
	box-shadow: var(--edd-shadow-md);
	transform: translateY(-2px);
}

.edd_download_inner {
	display: flex;
	flex-direction: column;
	height: 100%;
}

/* Product Image */
.edd_download_image {
	position: relative;
	overflow: hidden;
}

.edd_download_image a {
	display: block;
	text-decoration: none;
}

.edd_download_image img.edd-product-thumb {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.edd_download:hover .edd_download_image img.edd-product-thumb {
	transform: scale(1.03);
}

.edd-product-thumb-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 16 / 10;
	background: var(--edd-color-bg-primary);
	color: var(--edd-color-border);
}

/* Card Body */
.edd-download-card-body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: var(--edd-space-lg);
}

/* Product Title */
.edd_download_title {
	font-family: var(--edd-font-heading);
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.3;
	margin: 0 0 var(--edd-space-sm);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.edd_download_title a {
	color: var(--edd-color-text-primary);
	text-decoration: none;
	transition: color 0.2s ease;
}

.edd_download_title a:hover,
.edd_download_title a:focus {
	color: var(--edd-color-hover);
}

/* Excerpt */
.edd_download_excerpt {
	margin: 0 0 var(--edd-space-md);
	flex: 1;
}

.edd_download_excerpt p {
	font-size: 0.9rem;
	color: var(--edd-color-text-secondary);
	line-height: 1.6;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Card Footer */
.edd-download-card-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--edd-space-md);
	margin-top: auto;
	padding-top: var(--edd-space-md);
	border-top: 1px solid var(--edd-color-border);
}

/* Price */
.edd_price_wrapper {
	display: flex;
	flex-direction: column;
}

.edd_price {
	font-family: var(--edd-font-heading);
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--edd-color-text-primary);
}

.edd-tax-notice {
	font-size: 0.75rem;
	color: var(--edd-color-text-secondary);
}

/* ================================================================
   EDD Buttons (global)
   ================================================================ */

.edd-submit,
.edd-add-to-cart,
.edd_go_to_checkout,
a.edd-add-to-cart,
.edd-product-card-btn,
#edd-purchase-button,
input#edd-purchase-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--edd-space-sm);
	padding: 0.75rem 1.5rem;
	font-family: var(--edd-font-heading);
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1;
	color: var(--edd-color-header);
	background: var(--edd-color-accent);
	border: 2px solid var(--edd-color-accent);
	border-radius: var(--edd-radius-md);
	cursor: pointer;
	text-decoration: none;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
	white-space: nowrap;
}

.edd-submit:hover,
.edd-add-to-cart:hover,
.edd_go_to_checkout:hover,
a.edd-add-to-cart:hover,
.edd-product-card-btn:hover,
#edd-purchase-button:hover,
input#edd-purchase-button:hover {
	background: var(--edd-color-hover);
	border-color: var(--edd-color-hover);
	color: #fff;
	box-shadow: var(--edd-shadow-sm);
}

.edd-submit:focus-visible,
.edd-add-to-cart:focus-visible,
#edd-purchase-button:focus-visible,
input#edd-purchase-button:focus-visible {
	outline: 3px solid var(--edd-color-accent);
	outline-offset: 2px;
}

/* Product card button - smaller */
.edd-download-card-footer .edd_purchase_submit_wrapper {
	margin: 0;
}

.edd-download-card-footer .edd-add-to-cart,
.edd-download-card-footer .edd-product-card-btn {
	padding: 0.5rem 1rem;
	font-size: 0.85rem;
}

/* Checkout link in purchase form */
a.edd_go_to_checkout {
	background: transparent;
	color: var(--edd-color-accent);
	border-color: var(--edd-color-accent);
	font-size: 0.85rem;
	padding: 0.5rem 1rem;
}

a.edd_go_to_checkout:hover {
	background: var(--edd-color-accent);
	color: var(--edd-color-header);
}

/* ================================================================
   Single Download Page
   ================================================================ */

#et_main_content {
	z-index: 2;
	position: relative;
	background: #f0e2d2;
}

.edd-single-download {
	max-width: 1200px;
	margin: 0 auto;
	z-index: 1;
	position: relative;
	padding: 2em 0;
}

/* Sidebar Image */
.edd-image-section {
	padding: 0;
	overflow: hidden;
}

.edd-image-section img.edd-sidebar-image {
	width: 100%;
	height: auto;
	display: block;
	border-radius: var(--edd-radius-lg);
}

/* Grid Layout */
.edd-single-download-content {
	padding: 0 var(--edd-space-lg);
}

.edd-single-download-grid {
	display: grid;
	grid-template-columns: 1fr 360px;
	gap: var(--edd-space-2xl);
	align-items: start;
}

/* Main Content */
.edd-single-download-main {
	min-width: 0;
}

.edd-download-single-title {
	font-family: var(--edd-font-heading);
	font-size: 2.25rem;
	font-weight: 900;
	color: var(--edd-color-text-primary);
	line-height: 1.2;
	margin: 0 0 var(--edd-space-md);
}

.edd-download-meta-info {
	margin-bottom: var(--edd-space-xl);
}

.edd-categories-list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--edd-space-sm);
}

.edd-category-link {
	display: inline-block;
	padding: 0.25rem 0.75rem;
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--edd-color-accent);
	background: rgba(212, 168, 71, 0.1);
	border-radius: 100px;
	text-decoration: none;
	transition: background-color 0.2s ease;
}

.edd-category-link:hover {
	background: rgba(212, 168, 71, 0.2);
	color: var(--edd-color-accent);
}

.edd-download-description {
	margin-bottom: var(--edd-space-2xl);
}

.edd-download-content-main {
	font-size: 1rem;
	line-height: 1.8;
	color: var(--edd-color-text-primary);
}

.edd-download-content-main h2,
.edd-download-content-main h3,
.edd-download-content-main h4 {
	font-family: var(--edd-font-heading);
	margin-top: var(--edd-space-xl);
}

.edd-download-content-main img {
	max-width: 100%;
	height: auto;
	border-radius: var(--edd-radius-md);
}

/* Product Meta Tags */
.edd-product-meta-tags {
	display: flex;
	flex-wrap: wrap;
	gap: var(--edd-space-sm);
	margin-bottom: var(--edd-space-2xl);
}

.edd-meta-tag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 0.35rem 0.75rem;
	font-size: 0.8rem;
	font-weight: 500;
	color: var(--edd-color-text-secondary);
	background: var(--edd-color-bg-secondary);
	border: 1px solid var(--edd-color-border);
	border-radius: 100px;
	white-space: nowrap;
	line-height: 1.3;
}

.edd-meta-tag svg {
	flex-shrink: 0;
	opacity: 0.6;
}

/* Features */
.edd-features-section {
	margin-bottom: var(--edd-space-2xl);
}

.edd-features-section h2 {
	font-family: var(--edd-font-heading);
	font-size: 1.5rem;
	margin-bottom: var(--edd-space-md);
}

.edd-features-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.edd-features-list li {
	position: relative;
	padding: var(--edd-space-sm) 0 var(--edd-space-sm) 1.75rem;
	border-bottom: 1px solid var(--edd-color-border);
	font-size: 0.95rem;
	line-height: 1.6;
}

.edd-features-list li::before {
	content: '✓';
	position: absolute;
	left: 0;
	color: var(--edd-color-success);
	font-weight: 700;
}

/* Tags */
.edd-tags-section {
	margin-bottom: var(--edd-space-xl);
}

.edd-tags-section h3 {
	font-family: var(--edd-font-heading);
	font-size: 1.1rem;
	margin-bottom: var(--edd-space-sm);
}

.edd-tags-list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--edd-space-sm);
}

.edd-tag-badge {
	display: inline-block;
	padding: 0.2rem 0.6rem;
	font-size: 0.8rem;
	color: var(--edd-color-text-secondary);
	background: var(--edd-color-bg-primary);
	border: 1px solid var(--edd-color-border);
	border-radius: var(--edd-radius-sm);
	text-decoration: none;
	transition: border-color 0.2s ease, color 0.2s ease;
}

.edd-tag-badge:hover {
	border-color: var(--edd-color-accent);
	color: var(--edd-color-accent);
}

/* Sidebar */
.edd-download-sidebar {
	position: sticky;
	top: 100px;
}

.edd-sidebar-section {
	background: var(--edd-color-bg-secondary);
	border: 1px solid var(--edd-color-border);
	border-radius: var(--edd-radius-lg);
	padding: var(--edd-space-lg);
	margin-bottom: var(--edd-space-md);
}

.edd-sidebar-title {
	font-family: var(--edd-font-heading);
	font-size: 1rem;
	font-weight: 700;
	margin: 0 0 var(--edd-space-md);
	color: var(--edd-color-text-primary);
}

/* Price Section */
.edd-price-section {
	text-align: center;
	background: var(--edd-color-bg-primary);
}

.edd-price-display {
	margin-bottom: var(--edd-space-sm);
}

.edd-price-label {
	font-size: 0.85rem;
	color: var(--edd-color-text-secondary);
	margin-right: var(--edd-space-xs);
}

.edd-price-amount {
	font-family: var(--edd-font-heading);
	font-size: 2rem;
	font-weight: 900;
	color: var(--edd-color-text-primary);
}

.edd-price-free {
	color: var(--edd-color-success);
}

.edd-legal-notices {
	display: flex;
	flex-direction: column;
	gap: 0;
	font-size: 0.75rem;
	color: var(--edd-color-text-secondary);
	line-height: 1.4;
}

.edd-legal-notices .edd-tax-notice,
.edd-legal-notices .edd-shipping-notice {
	margin: 0;
	padding: 0;
}

/* Recurring period label in price section */
.edd-recurring-period {
	font-size: 0.85rem;
	color: var(--edd-color-text-secondary);
	font-weight: 400;
}

/* Recurring info label above options */
.edd-recurring-info {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--edd-space-xs);
	margin: 0 0 var(--edd-space-md);
	padding: var(--edd-space-sm) var(--edd-space-md);
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--edd-color-text-secondary);
	background: var(--edd-color-bg-primary);
	border-radius: var(--edd-radius-sm);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

/* Changelog section */
.edd-changelog-section {
	margin-bottom: var(--edd-space-2xl);
}

.edd-changelog-section h2 {
	font-family: var(--edd-font-heading);
	font-size: 1.5rem;
	margin-bottom: var(--edd-space-md);
}

.edd-changelog-content {
	font-size: 0.9rem;
	line-height: 1.7;
	color: var(--edd-color-text-primary);
}

.edd-changelog-content h4,
.edd-changelog-content h3 {
	font-size: 1rem;
	margin-top: var(--edd-space-lg);
	margin-bottom: var(--edd-space-sm);
}

.edd-changelog-content ul {
	padding-left: 1.25rem;
}

/* Product notes */
.edd-notes-section .edd-product-notes-content {
	font-size: 0.9rem;
	color: var(--edd-color-text-secondary);
	line-height: 1.6;
}

.edd-notes-section .edd-product-notes-content p {
	margin: 0 0 var(--edd-space-sm);
}

/* Button Section */
.edd-button-section {
	text-align: center;
}

.edd-button-section .edd_purchase_submit_wrapper {
	display: flex;
	flex-direction: column;
	gap: var(--edd-space-sm);
}

.edd-button-section .edd-add-to-cart,
.edd-button-section .edd-submit {
	width: 100%;
}

/* Resources Section (main content area) */
.edd-resources-section {
	margin-bottom: var(--edd-space-2xl);
}

.edd-resources-section h3 {
	font-family: var(--edd-font-heading);
	font-size: 1.1rem;
	margin-bottom: var(--edd-space-md);
}

.edd-resources-list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--edd-space-sm);
}

.edd-resource-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 0.5rem 1rem;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--edd-color-accent);
	background: var(--edd-color-bg-secondary);
	border: 1px solid var(--edd-color-border);
	border-radius: var(--edd-radius-md);
	text-decoration: none;
	transition: border-color 0.2s ease, background-color 0.2s ease;
}

.edd-resource-link:hover {
	border-color: var(--edd-color-accent);
	background: rgba(212, 168, 71, 0.05);
	color: var(--edd-color-accent);
}

.edd-resource-link svg {
	flex-shrink: 0;
	opacity: 0.7;
}

/* License Section */
.edd-license-section p {
	font-size: 0.9rem;
	color: var(--edd-color-text-secondary);
	line-height: 1.6;
	margin: 0;
}

/* ================================================================
   Variable Pricing on Single Product
   ================================================================ */

.edd_price_options {
	margin: var(--edd-space-md) 0;
}

.edd_price_options ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: var(--edd-space-sm);
}

.edd_price_options li {
	padding: 0;
}

.edd_price_options label {
	display: flex;
	align-items: center;
	gap: var(--edd-space-sm);
	padding: var(--edd-space-sm) var(--edd-space-md);
	background: var(--edd-color-bg-primary);
	border: 2px solid var(--edd-color-border);
	border-radius: var(--edd-radius-md);
	cursor: pointer;
	transition: border-color 0.2s ease;
	font-size: 0.9rem;
	line-height: 1.4;
}

.edd_price_options .edd_price_option_name {
	flex: 1;
	text-align: left;
}

.edd_price_options .edd_price_option_sep,
.edd_price_options .edd_price_option_price {
	flex-shrink: 0;
	text-align: right;
	white-space: nowrap;
}

.edd_price_options label:hover {
	border-color: var(--edd-color-accent);
}

.edd_price_options input[type="radio"]:checked + .edd_price_option_name,
.edd_price_options input[type="radio"]:checked ~ span {
	font-weight: 700;
}

.edd_price_options li.edd_price_option_selected label {
	border-color: var(--edd-color-accent);
	background: rgba(212, 168, 71, 0.05);
}

/* ================================================================
   Checkout Cart
   ================================================================ */

#edd_checkout_cart {
	width: 100%;
	border-collapse: collapse;
	background: var(--edd-color-bg-secondary);
	border-radius: var(--edd-radius-lg);
	overflow: hidden;
	box-shadow: var(--edd-shadow-sm);
	margin-bottom: var(--edd-space-xl);
}

#edd_checkout_cart thead {
	background: var(--edd-color-header);
}

#edd_checkout_cart thead th {
	padding: var(--edd-space-md) var(--edd-space-lg);
	font-family: var(--edd-font-heading);
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--edd-color-bg-primary);
	text-align: left;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

#edd_checkout_cart tbody td {
	padding: var(--edd-space-md) var(--edd-space-lg);
	border-bottom: 1px solid var(--edd-color-border);
	vertical-align: middle;
}

#edd_checkout_cart .edd_cart_item_name {
	display: flex;
	align-items: center;
	gap: var(--edd-space-md);
}

#edd_checkout_cart .edd_cart_item_image {
	flex-shrink: 0;
}

#edd_checkout_cart .edd_cart_item_image img {
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: var(--edd-radius-sm);
}

.edd_checkout_cart_item_title {
	font-weight: 600;
	color: var(--edd-color-text-primary);
}

.edd_cart_item_price {
	font-family: var(--edd-font-heading);
	font-weight: 700;
	white-space: nowrap;
}

.edd_cart_remove_item_btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	font-size: 1.2rem;
	color: var(--edd-color-text-secondary);
	text-decoration: none;
	border-radius: 50%;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.edd_cart_remove_item_btn:hover {
	background: rgba(211, 47, 47, 0.1);
	color: var(--edd-color-error);
}

/* Cart Footer */
#edd_checkout_cart tfoot th,
#edd_checkout_cart tfoot td {
	padding: var(--edd-space-md) var(--edd-space-lg);
	text-align: right;
}

.edd_cart_subtotal,
.edd_cart_tax,
.edd_cart_total {
	font-size: 0.95rem;
	color: var(--edd-color-text-primary);
}

.edd_cart_total {
	font-family: var(--edd-font-heading);
	font-size: 1.2rem;
	font-weight: 900;
	border-top: 2px solid var(--edd-color-header);
}

.edd-digital-notice {
	display: block;
	text-align: center;
	font-size: 0.8rem;
	color: var(--edd-color-text-secondary);
	font-style: italic;
}

/* ================================================================
   Checkout Form
   ================================================================ */

#edd_checkout_form_wrap {
	max-width: 800px;
	margin: 0 auto;
}

.edd-checkout-notice.edd-info-notice {
	background: rgba(33, 150, 243, 0.08);
	border: 1px solid rgba(33, 150, 243, 0.2);
	border-radius: var(--edd-radius-md);
	padding: var(--edd-space-md) var(--edd-space-lg);
	margin-bottom: var(--edd-space-xl);
	font-size: 0.9rem;
	color: var(--edd-color-text-primary);
}

.edd-checkout-notice.edd-info-notice p {
	margin: 0;
}

/* Checkout Sections */
#edd_checkout_form_wrap fieldset {
	border: 1px solid var(--edd-color-border);
	border-radius: var(--edd-radius-lg);
	padding: var(--edd-space-xl);
	margin-bottom: var(--edd-space-xl);
	background: var(--edd-color-bg-secondary);
}

#edd_checkout_form_wrap legend {
	font-family: var(--edd-font-heading);
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--edd-color-text-primary);
	padding: 0 var(--edd-space-sm);
}

/* Form Fields */
#edd_checkout_form_wrap input[type="text"],
#edd_checkout_form_wrap input[type="email"],
#edd_checkout_form_wrap input[type="url"],
#edd_checkout_form_wrap input[type="tel"],
#edd_checkout_form_wrap input[type="number"],
#edd_checkout_form_wrap input[type="password"],
#edd_checkout_form_wrap select,
#edd_checkout_form_wrap textarea {
	width: 100%;
	padding: 0.75rem 1rem;
	font-size: 0.95rem;
	color: var(--edd-color-text-primary);
	background: var(--edd-color-bg-secondary);
	border: 2px solid var(--edd-color-border);
	border-radius: var(--edd-radius-md);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	font-family: var(--edd-font-primary);
}

#edd_checkout_form_wrap input:focus,
#edd_checkout_form_wrap select:focus,
#edd_checkout_form_wrap textarea:focus {
	border-color: var(--edd-color-accent);
	box-shadow: 0 0 0 3px rgba(212, 168, 71, 0.15);
	outline: none;
}

#edd_checkout_form_wrap label {
	display: block;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--edd-color-text-primary);
	margin-bottom: var(--edd-space-xs);
}

/* ================================================================
   Compliance Checkboxes (German Legal)
   ================================================================ */

.edd-compliance-fieldset {
	background: var(--edd-color-bg-primary) !important;
	border: 2px solid var(--edd-color-border) !important;
}

.edd-compliance-checkbox-wrap {
	margin-bottom: var(--edd-space-md);
}

.edd-compliance-checkbox-wrap label {
	display: flex;
	align-items: flex-start;
	gap: var(--edd-space-sm);
	font-weight: 400;
	font-size: 0.9rem;
	line-height: 1.5;
	cursor: pointer;
}

.edd-compliance-checkbox-wrap input[type="checkbox"] {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	margin-top: 2px;
	accent-color: var(--edd-color-accent);
	cursor: pointer;
}

.edd-compliance-checkbox-wrap a {
	color: var(--edd-color-accent);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.edd-compliance-checkbox-wrap a:hover {
	color: var(--edd-color-hover);
}

.edd-required-indicator {
	color: var(--edd-color-error);
	font-weight: 700;
}

.edd-compliance-required-note {
	margin: var(--edd-space-sm) 0 0;
	color: var(--edd-color-text-secondary);
}

/* ================================================================
   Purchase Button (Checkout)
   ================================================================ */

#edd_purchase_submit {
	text-align: center;
	padding: var(--edd-space-xl) 0;
}

#edd-purchase-button,
input#edd-purchase-button {
	padding: 1rem 2.5rem;
	font-size: 1.1rem;
	font-weight: 900;
	letter-spacing: 0.02em;
	min-width: 300px;
}

/* ================================================================
   Discount Code Field
   ================================================================ */

#edd_discount_code {
	background: var(--edd-color-bg-secondary);
	border: 1px solid var(--edd-color-border);
	border-radius: var(--edd-radius-md);
	padding: var(--edd-space-md);
	margin-bottom: var(--edd-space-xl);
}

#edd_discount_code label {
	font-family: var(--edd-font-heading);
	font-weight: 700;
}

#edd-discount {
	border-radius: var(--edd-radius-md) 0 0 var(--edd-radius-md);
}

#edd-apply-discount {
	border-radius: 0 var(--edd-radius-md) var(--edd-radius-md) 0;
}

/* ================================================================
   Error Messages
   ================================================================ */

.edd_errors,
.edd-alert {
	padding: var(--edd-space-md) var(--edd-space-lg);
	border-radius: var(--edd-radius-md);
	margin-bottom: var(--edd-space-lg);
	font-size: 0.9rem;
}

.edd-alert-error,
.edd_errors {
	background: rgba(211, 47, 47, 0.08);
	border: 1px solid rgba(211, 47, 47, 0.2);
	color: var(--edd-color-error);
}

.edd-alert-success {
	background: rgba(76, 175, 80, 0.08);
	border: 1px solid rgba(76, 175, 80, 0.2);
	color: var(--edd-color-success);
}

.edd-alert-info {
	background: rgba(33, 150, 243, 0.08);
	border: 1px solid rgba(33, 150, 243, 0.2);
	color: var(--edd-color-info);
}

/* ================================================================
   Receipt / Order Confirmation
   ================================================================ */

.edd-receipt-wrapper {
	max-width: 700px;
	margin: 0 auto;
}

.edd-receipt-header {
	text-align: center;
	margin-bottom: var(--edd-space-2xl);
}

.edd-receipt-header h2 {
	font-family: var(--edd-font-heading);
	font-size: 2rem;
	font-weight: 900;
	color: var(--edd-color-text-primary);
	margin-bottom: var(--edd-space-sm);
}

.edd-receipt-thank-you {
	font-size: 1.1rem;
	color: var(--edd-color-text-secondary);
}

.edd-receipt-details {
	margin-bottom: var(--edd-space-2xl);
}

.edd-receipt-info-table {
	width: 100%;
	border-collapse: collapse;
}

.edd-receipt-info-table th,
.edd-receipt-info-table td {
	padding: var(--edd-space-md) var(--edd-space-lg);
	border-bottom: 1px solid var(--edd-color-border);
	font-size: 0.95rem;
}

.edd-receipt-info-table th {
	text-align: left;
	font-weight: 600;
	color: var(--edd-color-text-secondary);
	width: 40%;
}

.edd-order-status {
	display: inline-block;
	padding: 0.2rem 0.6rem;
	border-radius: 100px;
	font-size: 0.8rem;
	font-weight: 600;
}

.edd-order-status--complete {
	background: rgba(76, 175, 80, 0.1);
	color: var(--edd-color-success);
}

.edd-order-status--pending {
	background: rgba(255, 152, 0, 0.1);
	color: var(--edd-color-warning);
}

.edd-order-status--processing {
	background: rgba(33, 150, 243, 0.1);
	color: var(--edd-color-info);
}

/* Receipt Products */
.edd-receipt-products h3 {
	font-family: var(--edd-font-heading);
	font-size: 1.25rem;
	margin-bottom: var(--edd-space-md);
}

.edd-receipt-products-table {
	width: 100%;
	border-collapse: collapse;
	background: var(--edd-color-bg-secondary);
	border-radius: var(--edd-radius-lg);
	overflow: hidden;
	box-shadow: var(--edd-shadow-sm);
}

.edd-receipt-products-table thead {
	background: var(--edd-color-bg-primary);
}

.edd-receipt-products-table th {
	padding: var(--edd-space-md) var(--edd-space-lg);
	font-size: 0.85rem;
	font-weight: 600;
	text-align: left;
	color: var(--edd-color-text-secondary);
}

.edd-receipt-products-table td {
	padding: var(--edd-space-md) var(--edd-space-lg);
	border-bottom: 1px solid var(--edd-color-border);
}

.edd-receipt-amount-col {
	text-align: right;
	white-space: nowrap;
}

.edd-receipt-product-name {
	font-weight: 600;
	display: block;
}

.edd-receipt-refunded {
	display: inline-block;
	padding: 0.15rem 0.5rem;
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--edd-color-error);
	background: rgba(211, 47, 47, 0.1);
	border-radius: 100px;
	margin-left: var(--edd-space-sm);
}

.edd-receipt-download-files {
	margin-top: var(--edd-space-sm);
	display: flex;
	flex-direction: column;
	gap: var(--edd-space-xs);
}

.edd-receipt-download-link {
	display: inline-flex;
	align-items: center;
	gap: var(--edd-space-xs);
	color: var(--edd-color-accent);
	text-decoration: none;
	font-size: 0.9rem;
	font-weight: 600;
	transition: color 0.2s ease;
}

.edd-receipt-download-link:hover {
	color: var(--edd-color-hover);
}

.edd-receipt-download-link svg {
	flex-shrink: 0;
}

.edd-receipt-license-key {
	margin-top: var(--edd-space-sm);
	font-size: 0.85rem;
}

.edd-receipt-license-key code {
	background: var(--edd-color-bg-primary);
	padding: 0.2rem 0.5rem;
	border-radius: var(--edd-radius-sm);
	font-size: 0.85rem;
	word-break: break-all;
}

/* Receipt Footer */
.edd-receipt-products-table tfoot th {
	background: transparent;
	color: var(--edd-color-text-primary);
}

.edd-receipt-subtotal-row th,
.edd-receipt-subtotal-row td {
	border-bottom: 1px solid var(--edd-color-border);
}

.edd-receipt-tax-row th,
.edd-receipt-tax-row td {
	border-bottom: 1px solid var(--edd-color-border);
}

.edd-receipt-total-row th,
.edd-receipt-total-row td {
	border-top: 2px solid var(--edd-color-header);
	font-size: 1.1rem;
}

/* ================================================================
   Purchase History
   ================================================================ */

.edd-purchase-history-wrapper {
	max-width: 900px;
	margin: 0 auto;
}

.edd-purchase-history-table {
	width: 100%;
	border-collapse: collapse;
	background: var(--edd-color-bg-secondary);
	border-radius: var(--edd-radius-lg);
	overflow: hidden;
	box-shadow: var(--edd-shadow-sm);
}

.edd-purchase-history-table thead {
	background: var(--edd-color-header);
}

.edd-purchase-history-table thead th {
	padding: var(--edd-space-md) var(--edd-space-lg);
	font-family: var(--edd-font-heading);
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--edd-color-bg-primary);
	text-align: left;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.edd-purchase-history-table tbody td {
	padding: var(--edd-space-md) var(--edd-space-lg);
	border-bottom: 1px solid var(--edd-color-border);
	font-size: 0.95rem;
}

.edd-purchase-history-table tbody tr:last-child td {
	border-bottom: none;
}

.edd-purchase-history-table .edd-btn {
	display: inline-block;
	padding: 0.4rem 0.8rem;
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--edd-color-accent);
	background: transparent;
	border: 1px solid var(--edd-color-accent);
	border-radius: var(--edd-radius-sm);
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.edd-purchase-history-table .edd-btn:hover {
	background: var(--edd-color-accent);
	color: var(--edd-color-header);
}

.edd-purchase-history-empty {
	text-align: center;
	padding: var(--edd-space-2xl);
	color: var(--edd-color-text-secondary);
}

/* ================================================================
   EDD Login / Register Forms
   ================================================================ */

#edd_login_form,
#edd_register_form,
#edd_profile_editor_form {
	max-width: 500px;
	margin: 0 auto;
	background: var(--edd-color-bg-secondary);
	border: 1px solid var(--edd-color-border);
	border-radius: var(--edd-radius-lg);
	padding: var(--edd-space-2xl);
	box-shadow: var(--edd-shadow-sm);
}

#edd_login_form legend,
#edd_register_form legend {
	font-family: var(--edd-font-heading);
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--edd-color-text-primary);
}

#edd_login_form p,
#edd_register_form p {
	margin-bottom: var(--edd-space-md);
}

#edd_login_form input[type="text"],
#edd_login_form input[type="password"],
#edd_login_form input[type="email"],
#edd_register_form input[type="text"],
#edd_register_form input[type="password"],
#edd_register_form input[type="email"] {
	width: 100%;
	padding: 0.75rem 1rem;
	border: 2px solid var(--edd-color-border);
	border-radius: var(--edd-radius-md);
	font-size: 0.95rem;
	transition: border-color 0.2s ease;
}

#edd_login_form input:focus,
#edd_register_form input:focus {
	border-color: var(--edd-color-accent);
	outline: none;
	box-shadow: 0 0 0 3px rgba(212, 168, 71, 0.15);
}

/* ================================================================
   EDD Default Template Overrides (edd_purchase_receipt table)
   ================================================================ */

#edd_purchase_receipt {
	border-collapse: collapse;
	width: 100%;
}

#edd_purchase_receipt th,
#edd_purchase_receipt td {
	padding: var(--edd-space-md) var(--edd-space-lg);
	border-bottom: 1px solid var(--edd-color-border);
}

/* ================================================================
   Misc / Utility
   ================================================================ */

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Empty cart */
.edd-empty-cart {
	text-align: center;
	padding: var(--edd-space-2xl);
}

/* Loading spinner */
.edd-loading-ajax {
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid var(--edd-color-border);
	border-top-color: var(--edd-color-accent);
	border-radius: 50%;
	animation: edd-spin 0.6s linear infinite;
}

@keyframes edd-spin {
	to { transform: rotate(360deg); }
}

/* Stripe Elements Integration */
.edd-stripe-card-element {
	padding: 0.75rem 1rem;
	border: 2px solid var(--edd-color-border);
	border-radius: var(--edd-radius-md);
	background: var(--edd-color-bg-secondary);
	transition: border-color 0.2s ease;
}

.edd-stripe-card-element.StripeElement--focus {
	border-color: var(--edd-color-accent);
	box-shadow: 0 0 0 3px rgba(212, 168, 71, 0.15);
}

.edd-stripe-card-element.StripeElement--invalid {
	border-color: var(--edd-color-error);
}

/* Hide EDD's redundant tax rate text under purchase button (shown in sidebar instead) */
.edd_purchase_tax_rate {
	display: none;
}

/* Purchase form margin fix */
.single-download .edd_download_purchase_form {
	margin-bottom: 0;
}

/* Gateway selection */
#edd_payment_mode_select {
	margin-bottom: var(--edd-space-xl);
}

#edd-gateway-option-stripe label {
	display: flex;
	align-items: center;
	gap: var(--edd-space-sm);
	cursor: pointer;
}
