/* ==========================================================================
   PortHosted × Easy Digital Downloads
   ========================================================================== */

/* -------- Buttons -------- */
.edd-submit,
.edd-submit.button,
a.edd-submit,
input.edd-submit,
.edd_go_to_checkout,
#edd-purchase-button,
.edd-blocks-form .edd-submit,
.wp-block-edd-buy-button .edd-submit {
	display: inline-block;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--medium) !important;
	font-weight: 500;
	line-height: 1.25 !important;
	padding: 12px 20px !important;
	border-radius: 2px !important;
	border: 1px solid #000 !important;
	background: #000 !important;
	color: #fff !important;
	text-decoration: none !important;
	box-shadow: none !important;
	cursor: pointer;
	transition: background .15s, color .15s;
	width: auto;
}
.edd-submit:hover,
.edd_go_to_checkout:hover,
#edd-purchase-button:hover { background: var(--wp--preset--color--line-dark) !important; }

/* On dark backgrounds: white buttons. */
.has-contrast-background-color .edd-submit,
.has-contrast-background-color .edd_go_to_checkout,
.is-style-card-dark .edd-submit {
	background: #fff !important;
	color: #000 !important;
	border-color: #fff !important;
}
.has-contrast-background-color .edd-submit:hover,
.has-contrast-background-color .edd_go_to_checkout:hover { background: #e4e4e4 !important; }

.edd_purchase_submit_wrapper { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0; }
.edd-cart-ajax-alert, .edd-cart-added-alert { font-size: var(--wp--preset--font-size--small); }
.edd_download_purchase_form { margin: 0; }

/* -------- Variable price options -------- */
.edd_price_options { margin: 0 0 16px; }
.edd_price_options ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.edd_price_options li { margin: 0; }
.edd_price_options label {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 14px;
	border: 1px solid color-mix(in srgb, currentColor 25%, transparent);
	border-radius: 2px;
	cursor: pointer;
	font-size: var(--wp--preset--font-size--small);
}
.edd_price_options label:hover { border-color: currentColor; }
.edd_price_options input { accent-color: currentColor; margin: 0; }
.edd_price_option_price { margin-left: auto; font-family: var(--wp--preset--font-family--heading); font-size: 18px; }

/* -------- Theme cards -------- */
.ph-theme-card .wp-block-post-featured-image img { aspect-ratio: 4 / 3; object-fit: cover; }
.ph-theme-card .wp-block-post-title a:hover { text-decoration: none; opacity: .85; }
.ph-theme-card .wp-block-read-more::after { content: " \2192"; }
.ph-theme-card .wp-block-read-more:hover { text-decoration: none; }
.ph-price { font-family: var(--wp--preset--font-family--heading); letter-spacing: -.02em; }

/* Single theme */
.ph-theme-hero .wp-block-post-featured-image img { box-shadow: 0 30px 60px -20px rgba(0,0,0,.8); }
.ph-theme-meta p { margin: 0; }

/* -------- Forms (checkout, login, profile) -------- */
.edd-blocks-form input[type="text"],
.edd-blocks-form input[type="email"],
.edd-blocks-form input[type="password"],
.edd-blocks-form input[type="tel"],
.edd-blocks-form select,
.edd-blocks-form textarea,
#edd_checkout_form_wrap input.edd-input,
#edd_checkout_form_wrap select.edd-select,
.edd-input,
.edd-select {
	width: 100%;
	font: inherit;
	font-size: var(--wp--preset--font-size--medium);
	padding: 12px 14px;
	border: 1px solid #cfcfcf;
	border-radius: 2px;
	background: #fff;
	color: #000;
	box-shadow: none;
}
.edd-blocks-form input:focus,
.edd-blocks-form select:focus,
.edd-input:focus,
.edd-select:focus { outline: 2px solid #000; outline-offset: 1px; border-color: #000; }

.edd-blocks-form label,
#edd_checkout_form_wrap label.edd-label {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
}
.edd-blocks-form legend,
#edd_checkout_form_wrap legend {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 500;
	letter-spacing: -.02em;
	padding: 0;
	margin-bottom: 12px;
}
.edd-blocks-form fieldset,
#edd_checkout_form_wrap fieldset {
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 2px;
	padding: 24px;
	margin: 0 0 24px;
	background: #fff;
}
.edd-description,
.edd-blocks-form .edd-description { color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--x-small); }

/* -------- Cart (checkout) -------- */
.edd-blocks-cart,
#edd_checkout_cart {
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 2px;
	background: #fff;
}
.edd-blocks-cart__row,
#edd_checkout_cart th,
#edd_checkout_cart td { padding: 14px 18px; border-color: var(--wp--preset--color--line) !important; }
.edd-blocks-cart__row-header,
#edd_checkout_cart thead th {
	background: var(--wp--preset--color--base-2);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}
.edd-blocks-cart__row-footer,
.edd_cart_total { font-family: var(--wp--preset--font-family--heading); font-size: 22px; }
.edd-blocks-cart .edd_cart_remove_item_btn,
.edd_cart_remove_item_btn { color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--small); }
.edd-blocks-cart__items .edd_checkout_cart_item_title { font-weight: 500; }

/* Order history / receipts */
.edd-blocks-orders__order,
.edd-blocks-receipt__items,
.edd-blocks-receipt__totals,
#edd_purchase_receipt,
#edd_user_history {
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 2px;
	background: #fff;
}
#edd_purchase_receipt th, #edd_purchase_receipt td,
#edd_user_history th, #edd_user_history td { padding: 12px 16px; border-color: var(--wp--preset--color--line); }

/* Notices */
.edd-alert, .edd_errors {
	border-radius: 2px;
	padding: 14px 18px;
	font-size: var(--wp--preset--font-size--small);
}
.edd-alert-info { background: var(--wp--preset--color--base-2); border: 1px solid var(--wp--preset--color--line); color: #000; }

/* EDD product grid block (if used on a page) */
.edd_downloads_list .edd_download_inner { text-align: left; }
.edd_downloads_list .edd_download_title { font-family: var(--wp--preset--font-family--heading); font-weight: 500; letter-spacing: -.02em; }
.edd_downloads_list .edd_download_image img { border-radius: 2px; aspect-ratio: 4 / 3; object-fit: cover; }
