.ezw-wrapper {
	--ezw-accent-color: var(
		--wp--preset--color--primary,
		var(
			--e-global-color-primary,
			var(
				--woocommerce,
				var(
					--wc-primary,
					var(
						--nv-primary-accent,
						var(--nv-secondary-accent, #DE447A)
					)
				)
			)
		)
	);
	max-width: 720px;
	margin: 40px auto;
	padding: 30px;
	background: var(--wp--preset--color--base, var(--nv-site-bg, #fff));
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 12px;
	box-sizing: border-box;
	font-family: inherit;
	color: inherit;
}

.ezw-account-wrapper {
	--ezw-accent-color: var(
		--wp--preset--color--primary,
		var(
			--e-global-color-primary,
			var(
				--woocommerce,
				var(
					--wc-primary,
					var(
						--nv-primary-accent,
						var(--nv-secondary-accent, #DE447A)
					)
				)
			)
		)
	);
	font-family: inherit;
}

.ezw-wrapper,
.ezw-wrapper * {
	font-family: inherit;
}

.ezw-title {
	font-size: 2rem;
	line-height: 1.2;
	margin-bottom: 10px;
	font-family: inherit;
	font-weight: 700;
	color: inherit;
}

.ezw-intro,
.ezw-help {
	color: inherit;
	opacity: 0.8;
	font-family: inherit;
}

.ezw-form,
.ezw-form p,
.ezw-form label,
.ezw-form input,
.ezw-form select,
.ezw-form textarea,
.ezw-form button {
	font-family: inherit;
	font-size: inherit;
	color: inherit;
}

.ezw-form input[type="text"],
.ezw-form input[type="email"],
.ezw-form input[type="number"],
.ezw-form textarea,
.ezw-form select {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 8px;
	background: #fff;
	box-sizing: border-box;
	line-height: 1.4;
}

.ezw-form input[type="text"]:focus,
.ezw-form input[type="email"]:focus,
.ezw-form input[type="number"]:focus,
.ezw-form textarea:focus,
.ezw-form select:focus {
	outline: none;
	border-color: var(--ezw-accent-color);
	box-shadow: 0 0 0 1px var(--ezw-accent-color);
}

.ezw-form input[type="checkbox"],
.ezw-form input[type="radio"] {
	accent-color: var(--ezw-accent-color);
}

.ezw-actions {
	margin-top: 20px;
}

.ezw-button,
.ezw-lookup-form button,
.ezw-form button[type="submit"] {
	display: inline-block;
	padding: 12px 24px;
	border: 1px solid transparent;
	border-radius: 6px;
	font: inherit;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	background-color: var(--ezw-accent-color);
	color: #fff;
}

.ezw-button:hover,
.ezw-lookup-form button:hover,
.ezw-form button[type="submit"]:hover {
	opacity: 0.92;
	color: #fff;
}

.ezw-choice-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 16px;
	margin: 20px 0 30px;
}

.ezw-choice-card {
	display: block;
	padding: 18px;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 10px;
	background: #fff;
	cursor: pointer;
	font-family: inherit;
}

.ezw-choice-title {
	display: block;
	font-weight: 700;
	margin-bottom: 6px;
	font-family: inherit;
}

.ezw-choice-desc {
	display: block;
	opacity: 0.8;
	font-size: 0.95em;
	font-family: inherit;
}

.ezw-summary-box,
.ezw-order-summary {
	padding: 18px;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 10px;
	background: rgba(0, 0, 0, 0.02);
	margin-bottom: 24px;
	font-family: inherit;
}

.ezw-product-item {
	padding: 10px 12px;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 8px;
	background: rgba(0, 0, 0, 0.02);
	font-family: inherit;
}

.ezw-error {
	padding: 12px;
	border: 1px solid #d63638;
	background: #fff0f0;
	color: #b00020;
	border-radius: 8px;
	font-family: inherit;
	margin-bottom: 16px;
}

.ezw-empty-state {
	text-align: center;
}

.ezw-empty-state .ezw-error {
	margin-bottom: 0;
}

.ezw-wrapper a,
.ezw-account-wrapper a {
	color: var(--ezw-accent-color);
}

.ezw-wrapper a:hover,
.ezw-account-wrapper a:hover {
	opacity: 0.9;
}

.ezw-account-table,
.ezw-account-details,
.ezw-account-fields {
	width: 100%;
}

.ezw-account-message {
	padding: 14px;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 8px;
	background: rgba(0, 0, 0, 0.02);
	margin-bottom: 12px;
}

.ezw-account-products,
.ezw-account-attachments {
	margin-left: 20px;
}

.ezw-summary-notices {
	margin: 18px 0 22px;
}

.ezw-summary-notices .woocommerce-error,
.ezw-summary-notices .woocommerce-message,
.ezw-summary-notices .woocommerce-info {
	margin: 0 0 12px;
}

.ezw-account-reply-form textarea {
	width: 100%;
	min-height: 120px;
}

/* Lepszy układ przycisków WooCommerce w koncie klienta na telefonie. */
.woocommerce-account .woocommerce-orders-table__cell-order-actions,
.woocommerce-account .woocommerce-orders-table__cell[data-title="Działania"] {
	white-space: normal;
}

.woocommerce-account .woocommerce-orders-table__cell-order-actions .button,
.woocommerce-account .woocommerce-orders-table__cell[data-title="Działania"] .button,
.woocommerce-account .my_account_orders .button {
	margin: 4px 4px 4px 0;
	text-align: center;
	line-height: 1.25;
	white-space: normal;
}

@media (max-width: 768px) {
	.ezw-wrapper {
		max-width: 100%;
		margin: 20px 0;
		padding: 22px;
		border-radius: 10px;
	}

	.ezw-title {
		font-size: 1.65rem;
	}

	.woocommerce-account .woocommerce-orders-table__cell-order-actions,
	.woocommerce-account .woocommerce-orders-table__cell[data-title="Działania"] {
		display: flex !important;
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
	}

	.woocommerce-account .woocommerce-orders-table__cell-order-actions .button,
	.woocommerce-account .woocommerce-orders-table__cell[data-title="Działania"] .button,
	.woocommerce-account .my_account_orders .button {
		display: block;
		width: 100%;
		box-sizing: border-box;
		margin: 0;
		padding: 12px 14px;
		font-size: 15px;
	}

	.woocommerce-account .woocommerce-orders-table__cell-order-actions .button + .button,
	.woocommerce-account .woocommerce-orders-table__cell[data-title="Działania"] .button + .button {
		margin-top: 8px;
	}
}


/* Komunikaty WooCommerce na stronie formularza zwrotów nie powinny rozciągać się na całą szerokość ekranu. */
body.ezw-return-form-page .woocommerce-notices-wrapper,
body.ezw-return-form-page .woocommerce-error,
body.ezw-return-form-page .woocommerce-message,
body.ezw-return-form-page .woocommerce-info {
	max-width: 720px;
	margin-left: auto;
	margin-right: auto;
	box-sizing: border-box;
}

body.ezw-return-form-page .woocommerce-error,
body.ezw-return-form-page .woocommerce-message,
body.ezw-return-form-page .woocommerce-info {
	padding: 12px 16px;
	border-radius: 8px;
	line-height: 1.45;
	overflow-wrap: anywhere;
}

@media (max-width: 768px) {
	body.ezw-return-form-page .woocommerce-notices-wrapper,
	body.ezw-return-form-page .woocommerce-error,
	body.ezw-return-form-page .woocommerce-message,
	body.ezw-return-form-page .woocommerce-info {
		max-width: calc(100% - 32px);
	}
}


/* Komunikaty generowane przez shortcode formularza, np. brak dostępnego statusu zamówienia. */
.ezw-notices-wrapper-only {
	max-width: 720px !important;
	width: calc(100% - 32px) !important;
	margin: 20px auto !important;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
}

.ezw-notices-wrapper-only .woocommerce-error,
.ezw-notices-wrapper-only .woocommerce-message,
.ezw-notices-wrapper-only .woocommerce-info,
.ezw-wrapper .woocommerce-error,
.ezw-wrapper .woocommerce-message,
.ezw-wrapper .woocommerce-info {
	max-width: 100% !important;
	width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	box-sizing: border-box !important;
	white-space: normal !important;
	overflow-wrap: anywhere !important;
}

/* Poprawka widoczności tekstu w kafelkach wyboru i przyciskach.
   Część motywów WooCommerce nadpisuje kolor label/button, przez co tekst znikał. */
.ezw-choice-card,
.ezw-choice-card:hover,
.ezw-choice-card:focus-within {
	color: #222 !important;
	text-decoration: none;
}

.ezw-choice-card .ezw-choice-title {
	color: #111 !important;
}

.ezw-choice-card .ezw-choice-desc {
	color: #555 !important;
	opacity: 1;
}

.ezw-choice-card input[type="radio"] {
	margin-right: 8px;
}

.ezw-wrapper .ezw-button,
.ezw-wrapper .ezw-button:visited,
.ezw-wrapper .ezw-button:hover,
.ezw-wrapper .ezw-button:focus,
.ezw-lookup-form button,
.ezw-form button[type="submit"] {
	color: #fff !important;
}

/* Czytelniejszy komunikat błędu na podsumowaniu zgłoszenia.
   Niektóre motywy/WooCommerce dokładają ikonę przez ::before i tekst nachodzi na ikonę. */
.ezw-summary-notices .woocommerce-error,
.ezw-wrapper .woocommerce-error {
	position: relative !important;
	padding: 14px 18px !important;
	padding-left: 18px !important;
	list-style: none !important;
	line-height: 1.45 !important;
}

.ezw-summary-notices .woocommerce-error::before,
.ezw-wrapper .woocommerce-error::before {
	display: none !important;
	content: none !important;
}

.ezw-summary-notices .woocommerce-error li,
.ezw-wrapper .woocommerce-error li {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}
.ezw-attachment-slot {
	display: block;
	margin: 0 0 10px;
}

.ezw-attachment-slot span {
	display: block;
	margin: 0 0 4px;
	font-weight: 600;
}

.ezw-attachments-list {
	margin: 10px 0 0;
	padding: 0;
	list-style: none;
}

.ezw-attachments-list li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 8px 10px;
	margin: 0 0 6px;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	background: #fff;
}

.ezw-attachment-remove {
	border: 0;
	background: transparent;
	color: #b91c1c;
	cursor: pointer;
	font-weight: 700;
}

.ezw-attachments-error {
	margin: 8px 0 0;
	color: #b91c1c;
}
