/* EDD skin for danieliser.com — maps EDD legacy markup onto the site's design tokens. */

/* ---------- Buttons ---------- */
.edd-submit.button,
.edd-submit,
input[type="submit"].edd-submit,
.edd_download_purchase_form .edd-add-to-cart,
#edd_sl_show_renewal_form,
#edd-purchase-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	padding: 0.7rem 1.4rem;
	border: 1px solid transparent;
	border-radius: var(--di-radius-sm, 8px);
	background: var(--di-accent, #34e1a1);
	color: #0b0f14;
	font-family: var(--di-font-body, Inter, system-ui, sans-serif);
	font-size: 0.95rem;
	font-weight: 650;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: filter 0.15s ease, transform 0.15s ease;
}

.edd-submit.button:hover,
.edd-submit:hover,
.edd_download_purchase_form .edd-add-to-cart:hover,
#edd-purchase-button:hover {
	filter: brightness(1.1);
	color: #0b0f14;
	text-decoration: none;
}

.edd-submit.button:focus-visible,
.edd-submit:focus-visible {
	outline: 2px solid var(--di-accent, #34e1a1);
	outline-offset: 2px;
}

/* Secondary look for the license-renewal toggle */
#edd_sl_show_renewal_form {
	background: transparent;
	border-color: var(--di-border, rgba(159, 176, 192, 0.14));
	color: var(--di-text, #e6edf3);
	font-weight: 550;
}

#edd_sl_show_renewal_form:hover {
	border-color: var(--di-accent, #34e1a1);
	color: var(--di-accent, #34e1a1);
	filter: none;
}

/* "Added to cart" inline label + loading state */
.edd_download_purchase_form .edd-cart-added-alert {
	color: var(--di-accent, #34e1a1);
}

/* ---------- Purchase form on download singles ---------- */
.edd_download_purchase_form {
	margin-block: 2rem;
}

.edd_price {
	font-family: var(--di-font-display, "Space Grotesk", sans-serif);
	font-size: 1.4rem;
	font-weight: 700;
	color: var(--di-text, #e6edf3);
}

/* ---------- Checkout: cart table ---------- */
#edd_checkout_cart_wrap {
	margin-block-end: 2rem;
}

#edd_checkout_cart {
	width: 100%;
	margin: 0;
	border: 1px solid var(--di-border, rgba(159, 176, 192, 0.14));
	border-radius: var(--di-radius-sm, 8px);
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
	background: color-mix(in srgb, currentColor 3%, transparent);
	font-size: 0.92rem;
}

#edd_checkout_cart th,
#edd_checkout_cart td {
	padding: 0.85rem 1rem;
	border: 0;
	border-bottom: 1px solid var(--di-border, rgba(159, 176, 192, 0.14));
	background: transparent;
	color: var(--di-text, #e6edf3);
	text-align: left;
	vertical-align: middle;
}

#edd_checkout_cart th {
	background: color-mix(in srgb, currentColor 8%, transparent);
	font-weight: 700;
	font-size: 0.8rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

#edd_checkout_cart .edd_cart_total,
#edd_checkout_cart tr:last-child td {
	border-bottom: 0;
}

#edd_checkout_cart .edd_cart_total {
	font-weight: 700;
}

#edd_checkout_cart .edd_cart_actions,
#edd_checkout_cart th:last-child,
#edd_checkout_cart td:last-child {
	text-align: right;
}

#edd_checkout_cart .edd_cart_remove_item_btn {
	color: var(--di-accent, #34e1a1);
	text-decoration: none;
}

#edd_checkout_cart .edd_cart_remove_item_btn:hover {
	text-decoration: underline;
}

#edd_checkout_cart .edd_cart_item_image img {
	border-radius: 4px;
	vertical-align: middle;
}

/* ---------- Checkout: form structure ---------- */
#edd_checkout_form_wrap {
	font-family: var(--di-font-body, Inter, system-ui, sans-serif);
}

#edd_checkout_form_wrap fieldset {
	margin: 0 0 1.5rem;
	padding: 1.4rem 1.4rem 1.6rem;
	border: 1px solid var(--di-border, rgba(159, 176, 192, 0.14));
	border-radius: var(--di-radius-sm, 8px);
	background: color-mix(in srgb, currentColor 3%, transparent);
}

#edd_checkout_form_wrap legend {
	padding: 0 0.6rem;
	font-family: var(--di-font-display, "Space Grotesk", sans-serif);
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--di-text, #e6edf3);
}

#edd_checkout_form_wrap label {
	display: block;
	margin: 0 0 0.3rem;
	font-size: 0.88rem;
	font-weight: 650;
	color: var(--di-text, #e6edf3);
}

#edd_checkout_form_wrap .edd-description {
	display: block;
	margin: 0.25rem 0 0;
	font-size: 0.8rem;
	color: color-mix(in srgb, var(--di-text, #e6edf3) 55%, transparent);
}

#edd_checkout_form_wrap p {
	margin: 0 0 1.1rem;
}

#edd_checkout_form_wrap p:last-child {
	margin-bottom: 0;
}

#edd_checkout_form_wrap .edd-required-indicator {
	color: #ff6b6b;
}

/* ---------- Inputs (checkout + any EDD form) ---------- */
#edd_checkout_form_wrap input[type="text"],
#edd_checkout_form_wrap input[type="email"],
#edd_checkout_form_wrap input[type="password"],
#edd_checkout_form_wrap input[type="tel"],
#edd_checkout_form_wrap input[type="number"],
#edd_checkout_form_wrap select,
#edd_checkout_form_wrap textarea,
.edd-input,
.edd-select {
	display: block;
	width: 100%;
	max-width: 28rem;
	padding: 0.6rem 0.8rem;
	border: 1px solid var(--di-border, rgba(159, 176, 192, 0.14));
	border-radius: var(--di-radius-sm, 8px);
	background: var(--di-bg, #0b0f14);
	color: var(--di-text, #e6edf3);
	font-family: inherit;
	font-size: 0.92rem;
	line-height: 1.4;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#edd_checkout_form_wrap input:focus,
#edd_checkout_form_wrap select:focus,
#edd_checkout_form_wrap textarea:focus,
.edd-input:focus,
.edd-select:focus {
	outline: none;
	border-color: var(--di-accent, #34e1a1);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--di-accent, #34e1a1) 20%, transparent);
}

#edd_checkout_form_wrap input::placeholder,
#edd_checkout_form_wrap textarea::placeholder {
	color: color-mix(in srgb, var(--di-text, #e6edf3) 35%, transparent);
}

#edd_checkout_form_wrap input[type="checkbox"],
#edd_checkout_form_wrap input[type="radio"] {
	width: auto;
	display: inline-block;
	accent-color: var(--di-accent, #34e1a1);
	margin-inline-end: 0.45rem;
}

/* ---------- Checkout: totals + submit ---------- */
#edd_purchase_final_total,
#edd_final_total_wrap {
	margin: 0 0 1.25rem;
	padding: 0.9rem 1.1rem;
	border: 1px solid var(--di-border, rgba(159, 176, 192, 0.14));
	border-radius: var(--di-radius-sm, 8px);
	background: color-mix(in srgb, currentColor 6%, transparent);
	color: var(--di-text, #e6edf3);
	font-size: 1rem;
}

#edd_purchase_final_total strong,
#edd_final_total_wrap strong {
	font-family: var(--di-font-display, "Space Grotesk", sans-serif);
}

#edd_purchase_submit {
	margin: 0;
}

#edd_purchase_submit input[type="submit"] {
	width: 100%;
	max-width: none;
	padding: 0.9rem 1.4rem;
	font-size: 1.05rem;
}

/* ---------- Notices ---------- */
.edd_errors,
.edd-alert {
	margin: 0 0 1.25rem;
	padding: 0.85rem 1.1rem;
	border: 1px solid var(--di-border, rgba(159, 176, 192, 0.14));
	border-radius: var(--di-radius-sm, 8px);
	background: color-mix(in srgb, currentColor 5%, transparent);
	color: var(--di-text, #e6edf3);
}

.edd_errors,
.edd-alert-error {
	border-color: color-mix(in srgb, #ff6b6b 45%, transparent);
}

.edd-alert-success {
	border-color: color-mix(in srgb, var(--di-accent, #34e1a1) 45%, transparent);
}

.edd_error,
.edd-alert p {
	margin: 0;
}

/* Empty cart message */
.edd-cart-empty,
.cart_item.empty {
	color: color-mix(in srgb, var(--di-text, #e6edf3) 60%, transparent);
}

/* ---------- Receipt + purchase history tables ---------- */
table#edd_purchase_receipt,
table#edd_purchase_receipt_products,
table.edd-table,
#edd_user_history {
	width: 100%;
	margin-block: 1.5rem;
	border: 1px solid var(--di-border, rgba(159, 176, 192, 0.14));
	border-radius: var(--di-radius-sm, 8px);
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
	font-size: 0.92rem;
}

table#edd_purchase_receipt th,
table#edd_purchase_receipt td,
table#edd_purchase_receipt_products th,
table#edd_purchase_receipt_products td,
table.edd-table th,
table.edd-table td,
#edd_user_history th,
#edd_user_history td {
	padding: 0.85rem 1rem;
	border: 0;
	border-bottom: 1px solid var(--di-border, rgba(159, 176, 192, 0.14));
	background: transparent;
	color: var(--di-text, #e6edf3);
	text-align: left;
	vertical-align: top;
}

table#edd_purchase_receipt thead th,
table#edd_purchase_receipt_products thead th,
table.edd-table thead th,
#edd_user_history thead th {
	background: color-mix(in srgb, currentColor 8%, transparent);
	font-weight: 700;
	font-size: 0.8rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

table#edd_purchase_receipt tbody tr:last-child td,
table#edd_purchase_receipt_products tbody tr:last-child td,
table.edd-table tbody tr:last-child td,
#edd_user_history tbody tr:last-child td {
	border-bottom: 0;
}

table a,
#edd_user_history a {
	color: var(--di-accent, #34e1a1);
}

/* ---------- Login / profile forms rendered by EDD ---------- */
#edd_login_form fieldset,
#edd_profile_editor_form fieldset {
	border: 1px solid var(--di-border, rgba(159, 176, 192, 0.14));
	border-radius: var(--di-radius-sm, 8px);
	padding: 1.4rem;
}

/* ---------- Ajax spinner visibility on dark ---------- */
.edd-loading-ajax {
	filter: invert(1);
}

/* ---------- High-specificity overrides vs edd.min.css ---------- */
#edd_checkout_cart .edd_cart_header_row th {
	background: var(--di-surface, #151c25);
	color: var(--di-text, #e6edf3);
	padding: 0.85rem 1rem;
}

#edd_checkout_cart td {
	background: transparent;
	color: var(--di-text, #e6edf3);
	line-height: 1.5;
}

#edd_checkout_cart td,
#edd_checkout_cart th {
	border: 0;
	border-bottom: 1px solid var(--di-border, rgba(159, 176, 192, 0.14));
}

#edd_checkout_cart tr:last-child td,
#edd_checkout_cart tr:last-child th {
	border-bottom: 0;
}

#edd_checkout_form_wrap #edd-login-account-wrap,
#edd_checkout_form_wrap #edd-new-account-wrap,
#edd_checkout_form_wrap #edd_final_total_wrap,
#edd_checkout_form_wrap #edd_show_discount,
#edd_checkout_form_wrap .edd-cart-adjustment {
	background: var(--di-surface, #151c25);
	color: var(--di-text, #e6edf3);
	padding: 0.9rem 1.1rem;
	border: 1px solid var(--di-border, rgba(159, 176, 192, 0.14));
	border-radius: var(--di-radius-sm, 8px);
}

#edd_checkout_form_wrap #edd_final_total_wrap {
	font-size: 1rem;
}

#edd_checkout_form_wrap #edd-login-account-wrap a,
#edd_checkout_form_wrap #edd_show_discount a {
	color: var(--di-accent, #34e1a1);
}

/* License-renewal widget: secondary treatment, not primary CTA */
.edd-renewal-form--legacy .edd-submit,
.edd-renewal-form--legacy button,
.wp-block-edd-sl-license-renewal .edd-submit,
.wp-block-edd-sl-license-renewal button {
	background: transparent;
	border: 1px solid var(--di-border, rgba(159, 176, 192, 0.14));
	color: var(--di-text, #e6edf3);
	font-weight: 550;
}

.edd-renewal-form--legacy .edd-submit:hover,
.edd-renewal-form--legacy button:hover,
.wp-block-edd-sl-license-renewal .edd-submit:hover,
.wp-block-edd-sl-license-renewal button:hover {
	border-color: var(--di-accent, #34e1a1);
	color: var(--di-accent, #34e1a1);
	filter: none;
}

/* ---------- EDD color-variant buttons (e.g. .edd-submit.button.blue) ---------- */
.edd-submit.button.blue,
.edd-submit.button.gray,
.edd-submit.button.green,
.edd-submit.button.dark-gray,
.edd-submit.button.yellow,
.edd-submit.button.orange,
.edd-submit.button.red,
.edd-submit.button.purple,
.edd-submit.button.slate,
.edd-submit.button.white {
	background: var(--di-accent, #34e1a1);
	border-color: transparent;
	color: #0b0f14;
	border-radius: var(--di-radius-sm, 8px);
}

.edd-submit.button.blue:hover,
.edd-submit.button.gray:hover,
.edd-submit.button.green:hover,
.edd-submit.button.white:hover {
	background: var(--di-accent, #34e1a1);
	border-color: transparent;
	color: #0b0f14;
	filter: brightness(1.1);
}

/* ---------- EDD blocks forms (login, register, profile) ---------- */
.edd-blocks-form {
	border: 1px solid var(--di-border, rgba(159, 176, 192, 0.14));
	border-radius: var(--di-radius-sm, 8px);
	background: color-mix(in srgb, currentColor 3%, transparent);
}

.edd-blocks-form label {
	font-size: 0.88rem;
	font-weight: 650;
	color: var(--di-text, #e6edf3);
}

.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 {
	padding: 0.6rem 0.8rem;
	border: 1px solid var(--di-border, rgba(159, 176, 192, 0.14));
	border-radius: var(--di-radius-sm, 8px);
	background: var(--di-bg, #0b0f14);
	color: var(--di-text, #e6edf3);
	font-size: 0.92rem;
}

.edd-blocks-form input:focus,
.edd-blocks-form select:focus {
	outline: none;
	border-color: var(--di-accent, #34e1a1);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--di-accent, #34e1a1) 20%, transparent);
}

.edd-blocks-form input[type="checkbox"] {
	accent-color: var(--di-accent, #34e1a1);
}

.edd-blocks-form a,
.edd-lost-password a {
	color: var(--di-accent, #34e1a1);
}

/* EDD blocks order-history / receipt / licenses tables inherit .edd-table rules above */
.edd-blocks__table th,
.edd-blocks__table td {
	border-color: var(--di-border, rgba(159, 176, 192, 0.14));
}

/* ---------- EDD blocks checkout (block version) ---------- */
:root {
	--edd-blocks-light-grey: var(--di-surface, #151c25);
}

.edd-button-secondary,
.edd-button-secondary.link {
	background: transparent;
	border: 1px solid var(--di-border, rgba(159, 176, 192, 0.14));
	border-radius: var(--di-radius-sm, 8px);
	padding: 0.45rem 0.9rem;
	color: var(--di-text, #e6edf3);
	font-size: 0.85rem;
	cursor: pointer;
}

.edd-button-secondary:hover:not(:disabled) {
	border-color: var(--di-accent, #34e1a1);
	color: var(--di-accent, #34e1a1);
}

.edd-button-secondary:disabled {
	opacity: 0.35;
	cursor: default;
}

.edd-blocks__checkout-forms {
	margin-block-end: 1rem;
	display: flex;
	gap: 0.6rem;
	justify-content: flex-end;
}

/* Block-checkout fieldsets reuse .edd-blocks-form (styled above); keep legends clear of borders */
.edd-blocks-form legend {
	padding: 0 0.5rem;
	font-family: var(--di-font-display, "Space Grotesk", sans-serif);
	font-weight: 700;
	color: var(--di-text, #e6edf3);
}

.edd-blocks-form .edd-blocks-form__group {
	margin: 0;
}

.edd-blocks__checkout .edd-description,
.edd-blocks-form .edd-description {
	font-size: 0.8rem;
	color: color-mix(in srgb, var(--di-text, #e6edf3) 55%, transparent);
}

/* Block cart table */
.edd-blocks-cart__items th,
.edd-blocks-cart__items td,
.edd-blocks__checkout table th,
.edd-blocks__checkout table td {
	border-color: var(--di-border, rgba(159, 176, 192, 0.14));
	color: var(--di-text, #e6edf3);
	background: transparent;
}
