/*
 * RESUSMED ProfilePress/WooCommerce bridge.
 * All rules are scoped to .rsm-ppwc so they do not redesign the rest of WooCommerce.
 */
.rsm-ppwc {
	--rsm-ppwc-bg: #ffffff;
	--rsm-ppwc-text: #111111;
	--rsm-ppwc-muted: #5f5f5f;
	--rsm-ppwc-border: #171717;
	--rsm-ppwc-soft-border: #dedede;
	--rsm-ppwc-focus: #111111;
	--rsm-ppwc-radius: 4px;
	box-sizing: border-box;
	color: var(--rsm-ppwc-text);
	background: var(--rsm-ppwc-bg);
}

.rsm-ppwc *,
.rsm-ppwc *::before,
.rsm-ppwc *::after {
	box-sizing: border-box;
}

.rsm-ppwc-auth {
	display: grid;
	gap: 32px;
	align-items: start;
}

/* 1.1.2: one identity form at a time on WooCommerce My Account. */
.rsm-ppwc-auth--single {
	display: block;
	width: 100%;
	max-width: 740px;
	margin-inline: auto;
}

.rsm-ppwc-auth--single > section {
	width: 100%;
}

.rsm-ppwc-auth__return {
	margin: 0 0 18px;
}

.rsm-ppwc-auth--columns {
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.rsm-ppwc-auth > section,
.rsm-ppwc-global-login,
.rsm-ppwc-edit-account,
.rsm-ppwc-checkout-login {
	min-width: 0;
	padding: clamp(20px, 3vw, 32px);
	background: #ffffff;
	border: 1px solid var(--rsm-ppwc-soft-border);
	border-radius: var(--rsm-ppwc-radius);
	box-shadow: none;
}

.rsm-ppwc-auth h2,
.rsm-ppwc h1,
.rsm-ppwc h2,
.rsm-ppwc h3,
.rsm-ppwc h4,
.rsm-ppwc h5,
.rsm-ppwc h6,
.rsm-ppwc label,
.rsm-ppwc legend {
	color: var(--rsm-ppwc-text) !important;
}

.rsm-ppwc-auth h2 {
	margin-top: 0;
	margin-bottom: 24px;
	font-weight: 700;
}

.rsm-ppwc p,
.rsm-ppwc .description,
.rsm-ppwc small {
	color: var(--rsm-ppwc-muted);
}

.rsm-ppwc form,
.rsm-ppwc [class*="profilepress"],
.rsm-ppwc [class*="ppress"],
.rsm-ppwc [class*="pp-form"] {
	max-width: none;
	background-color: #ffffff !important;
	color: var(--rsm-ppwc-text) !important;
	box-shadow: none !important;
}

.rsm-ppwc input[type="text"],
.rsm-ppwc input[type="email"],
.rsm-ppwc input[type="password"],
.rsm-ppwc input[type="tel"],
.rsm-ppwc input[type="url"],
.rsm-ppwc input[type="number"],
.rsm-ppwc input[type="date"],
.rsm-ppwc input[type="search"],
.rsm-ppwc select,
.rsm-ppwc textarea {
	width: 100%;
	min-height: 46px;
	padding: 10px 12px;
	color: var(--rsm-ppwc-text) !important;
	background: #ffffff !important;
	border: 1px solid var(--rsm-ppwc-border) !important;
	border-radius: var(--rsm-ppwc-radius) !important;
	box-shadow: none !important;
	font: inherit;
}

.rsm-ppwc textarea {
	min-height: 120px;
	resize: vertical;
}

.rsm-ppwc input::placeholder,
.rsm-ppwc textarea::placeholder {
	color: #777777;
	opacity: 1;
}

.rsm-ppwc input[type="text"]:focus,
.rsm-ppwc input[type="email"]:focus,
.rsm-ppwc input[type="password"]:focus,
.rsm-ppwc input[type="tel"]:focus,
.rsm-ppwc input[type="url"]:focus,
.rsm-ppwc input[type="number"]:focus,
.rsm-ppwc input[type="date"]:focus,
.rsm-ppwc input[type="search"]:focus,
.rsm-ppwc select:focus,
.rsm-ppwc textarea:focus {
	outline: 2px solid var(--rsm-ppwc-focus) !important;
	outline-offset: 2px;
	border-color: var(--rsm-ppwc-focus) !important;
}

.rsm-ppwc input[type="checkbox"],
.rsm-ppwc input[type="radio"] {
	accent-color: #111111;
}

.rsm-ppwc input[type="submit"],
.rsm-ppwc button[type="submit"],
.rsm-ppwc form button:not([type]),
.rsm-ppwc .ppress-submit-button,
.rsm-ppwc .profilepress-submit-button,
.rsm-ppwc .pp-form-submit-button {
	min-height: 44px;
	padding: 10px 20px !important;
	color: #ffffff !important;
	background: #111111 !important;
	border: 1px solid #111111 !important;
	border-radius: var(--rsm-ppwc-radius) !important;
	box-shadow: none !important;
	font-weight: 700;
	text-decoration: none !important;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.rsm-ppwc input[type="submit"]:hover,
.rsm-ppwc input[type="submit"]:focus,
.rsm-ppwc button[type="submit"]:hover,
.rsm-ppwc button[type="submit"]:focus,
.rsm-ppwc form button:not([type]):hover,
.rsm-ppwc form button:not([type]):focus,
.rsm-ppwc .ppress-submit-button:hover,
.rsm-ppwc .ppress-submit-button:focus,
.rsm-ppwc .profilepress-submit-button:hover,
.rsm-ppwc .profilepress-submit-button:focus,
.rsm-ppwc .pp-form-submit-button:hover,
.rsm-ppwc .pp-form-submit-button:focus {
	color: #111111 !important;
	background: #ffffff !important;
	outline: 2px solid #111111 !important;
	outline-offset: 2px;
}

.rsm-ppwc a {
	color: #111111 !important;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.rsm-ppwc a:hover,
.rsm-ppwc a:focus {
	color: #000000 !important;
	text-decoration-thickness: 2px;
}

.rsm-ppwc .woocommerce-error,
.rsm-ppwc .woocommerce-info,
.rsm-ppwc .woocommerce-message,
.rsm-ppwc [class*="alert"],
.rsm-ppwc [class*="notice"] {
	color: #111111 !important;
	background: #ffffff !important;
	border-color: #111111 !important;
	box-shadow: none !important;
}

.rsm-ppwc-global-login {
	margin: 1rem 0;
}

.rsm-ppwc-showlogin {
	appearance: none;
	border: 0;
	background: transparent;
	padding: 0;
	color: #111111;
	font: inherit;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
}

.rsm-ppwc-showlogin:hover,
.rsm-ppwc-showlogin:focus {
	text-decoration-thickness: 2px;
	outline: 2px solid #111111;
	outline-offset: 3px;
}

.rsm-ppwc[hidden],
.rsm-ppwc-checkout-login[hidden],
.rsm-ppwc-global-login[hidden] {
	display: none !important;
}

@media (max-width: 760px) {
	.rsm-ppwc-auth--columns {
		grid-template-columns: 1fr;
	}

	.rsm-ppwc-auth > section,
	.rsm-ppwc-global-login,
	.rsm-ppwc-edit-account,
	.rsm-ppwc-checkout-login {
		padding: 18px;
	}
}

/* Neutralizacja kolorowego autofill w Safari i Chrome. */
.rsm-ppwc input:-webkit-autofill,
.rsm-ppwc input:-webkit-autofill:hover,
.rsm-ppwc input:-webkit-autofill:focus {
	-webkit-text-fill-color: #111111 !important;
	-webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
	transition: background-color 9999s ease-out;
}

/* Pola nieedytowalne. */
.rsm-ppwc input:disabled,
.rsm-ppwc input[readonly] {
	background: #f3f3f3 !important;
	color: #555555 !important;
	cursor: not-allowed;
}

/* Błędy walidacji. */
.rsm-ppwc input[aria-invalid="true"],
.rsm-ppwc .has-error input,
.rsm-ppwc .field-error input {
	border-color: #111111 !important;
	border-width: 2px !important;
}
