/**
 * EDD Responsive Styles
 *
 * @package lund-design
 */

/* ================================================================
   Tablet (max-width: 980px)
   ================================================================ */

@media (max-width: 980px) {
	/* Single download: stack columns */
	.edd-single-download-grid {
		grid-template-columns: 1fr;
		gap: var(--edd-space-xl);
	}

	.edd-download-sidebar {
		position: static;
	}

	.edd-single-download-sidebar {
		order: -1;
	}

	.edd-download-single-title {
		font-size: 1.75rem;
	}

	/* Product grid: 2 columns */
	.edd_downloads_list {
		grid-template-columns: repeat(2, 1fr);
		gap: var(--edd-space-lg);
	}

	/* Checkout form full width */
	#edd_checkout_form_wrap {
		max-width: 100%;
	}
}

/* ================================================================
   Mobile (max-width: 767px)
   ================================================================ */

@media (max-width: 767px) {
	/* Product grid: single column */
	.edd_downloads_list {
		grid-template-columns: 1fr;
		gap: var(--edd-space-lg);
	}

	.edd-download-single-title {
		font-size: 1.5rem;
	}

	.edd-price-amount {
		font-size: 1.5rem;
	}

	/* Checkout cart: responsive table */
	#edd_checkout_cart thead {
		display: none;
	}

	#edd_checkout_cart tbody tr {
		display: flex;
		flex-wrap: wrap;
		padding: var(--edd-space-md);
		border-bottom: 1px solid var(--edd-color-border);
	}

	#edd_checkout_cart tbody td {
		display: flex;
		align-items: center;
		padding: var(--edd-space-sm) 0;
		border-bottom: none;
	}

	#edd_checkout_cart tbody td::before {
		content: attr(data-th);
		font-weight: 600;
		font-size: 0.8rem;
		color: var(--edd-color-text-secondary);
		margin-right: var(--edd-space-sm);
		text-transform: uppercase;
	}

	#edd_checkout_cart .edd_cart_item_name {
		width: 100%;
		flex-direction: row;
	}

	#edd_checkout_cart .edd_cart_item_price {
		flex: 1;
	}

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

	/* Cart footer */
	#edd_checkout_cart tfoot th,
	#edd_checkout_cart tfoot td {
		padding: var(--edd-space-sm) var(--edd-space-md);
		font-size: 0.9rem;
	}

	.edd_cart_total {
		font-size: 1rem;
	}

	/* Checkout form */
	#edd_checkout_form_wrap fieldset {
		padding: var(--edd-space-md);
	}

	/* Purchase button */
	#edd-purchase-button,
	input#edd-purchase-button {
		min-width: auto;
		width: 100%;
		padding: 0.875rem 1.5rem;
		font-size: 1rem;
	}

	/* Compliance checkboxes */
	.edd-compliance-checkbox-wrap label {
		font-size: 0.85rem;
	}

	.edd-compliance-checkbox-wrap input[type="checkbox"] {
		width: 24px;
		height: 24px;
	}

	/* Receipt */
	.edd-receipt-wrapper {
		padding: 0 var(--edd-space-sm);
	}

	.edd-receipt-header h2 {
		font-size: 1.5rem;
	}

	.edd-receipt-info-table th,
	.edd-receipt-info-table td {
		padding: var(--edd-space-sm) var(--edd-space-md);
		font-size: 0.9rem;
	}

	.edd-receipt-info-table th {
		width: auto;
	}

	.edd-receipt-products-table th,
	.edd-receipt-products-table td {
		padding: var(--edd-space-sm) var(--edd-space-md);
	}

	/* Purchase history: responsive */
	.edd-purchase-history-table thead {
		display: none;
	}

	.edd-purchase-history-table tbody tr {
		display: block;
		padding: var(--edd-space-md);
		border-bottom: 2px solid var(--edd-color-border);
	}

	.edd-purchase-history-table tbody td {
		display: flex;
		justify-content: space-between;
		padding: var(--edd-space-xs) 0;
		border-bottom: none;
		font-size: 0.9rem;
	}

	.edd-purchase-history-table tbody td::before {
		content: attr(data-label);
		font-weight: 600;
		color: var(--edd-color-text-secondary);
	}

	/* Login/Register forms */
	#edd_login_form,
	#edd_register_form,
	#edd_profile_editor_form {
		padding: var(--edd-space-lg);
	}

	/* Hero image */
	.edd-download-hero-image {
		border-radius: 0;
	}

	.edd-single-download-content {
		padding: 0 var(--edd-space-md);
	}
}

/* ================================================================
   Small Mobile (max-width: 479px)
   ================================================================ */

@media (max-width: 479px) {
	.edd-download-card-footer {
		flex-direction: column;
		align-items: stretch;
	}

	.edd-download-card-footer .edd_purchase_submit_wrapper {
		width: 100%;
	}

	.edd-download-card-footer .edd-add-to-cart,
	.edd-download-card-footer .edd-product-card-btn {
		width: 100%;
		justify-content: center;
	}

	.edd_price_wrapper {
		align-items: center;
	}

	/* Sidebar sections */
	.edd-sidebar-section {
		padding: var(--edd-space-md);
	}
}

/* ================================================================
   Print Styles
   ================================================================ */

@media print {
	.edd-receipt-wrapper {
		max-width: 100%;
	}

	.edd-receipt-download-link {
		color: #000;
	}

	.edd-receipt-download-link::after {
		content: " (" attr(href) ")";
		font-size: 0.8em;
	}

	.edd-compliance-fieldset,
	#edd_purchase_submit,
	.edd_cart_remove_item_btn,
	.edd_cart_actions {
		display: none;
	}
}
