/*
 * PlantaHerb Social Bridge – buttons surroundings and our screens (ETAP-10 rozdz. 7).
 * Loaded only in modes test/on and only on pages with buttons and on the technical pages.
 * 0.1.1 (owner 2026-11-24): buttons at the top of the form card, consent line under the row, then "lub".
 * 0.2.0 (owner 2026-11-25, "the login button is below the screen on the phone"): compact block. One row of equal
 * pill buttons, 44 px high (touch target): one active provider = one full-width pill with logo and the full text
 * ("Kontynuuj z Google"), two or more (.ph-sl--n2/.ph-sl--n3) = equal pills side by side with the logo only, the
 * text stays in the markup for screen readers and in aria-label (frontend.php). Consent line 12 px under the row,
 * "lub" with 12 px around it.
 * Google Sign-in branding (developers.google.com/identity/branding-guidelines): full text "Continue with Google"
 * localized or the standard G logo alone; multicolour G unchanged; light theme #fff / 1 px #747775 / #1f1f1f text;
 * pill shape. Facebook: blue #1877F2 with the white f (Nextend's), same pill.
 * Selectors carry .ph-sl__row div.nsl-container… so they win over Nextend's inline <style> (wp_head @100).
 */
.ph-sl {
	--ph-sl-line: var(--ph-color-line, #e5e5e2);
	--ph-sl-muted: var(--ph-color-text-muted, #5c645f);
	--ph-sl-accent: var(--ph-color-accent, #1f4d3a);
	box-sizing: border-box;
	width: 100%;
	max-width: none;
	margin: 0 0 12px;
	text-align: left;
}

.ph-sl--test {
	margin: 16px 0 0;
}

.ph-sl .ph-sl__row div.nsl-container {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
	text-align: left;
}

.ph-sl .ph-sl__row div.nsl-container.nsl-container-block .nsl-container-buttons {
	display: flex;
	flex-flow: row nowrap;
	gap: 8px;
	justify-content: center;
	width: 100%;
	padding: 0;
}

.ph-sl .ph-sl__row div.nsl-container.nsl-container-block .nsl-container-buttons a {
	flex: 1 1 0;
	display: block;
	min-width: 0;
	max-width: none;
	width: auto;
	margin: 0 !important;
	border-radius: 999px;
	text-decoration: none;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
}

.ph-sl .ph-sl__row div.nsl-container .nsl-container-buttons a .nsl-button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	box-sizing: border-box;
	width: 100%;
	min-height: 44px;
	padding: 0 16px;
	border-radius: 999px;
	background-color: #fff !important;
	box-shadow: inset 0 0 0 1px #747775;
	color: #1f1f1f;
	transition: background-color 0.15s ease;
}

.ph-sl .ph-sl__row div.nsl-container .nsl-container-buttons a:hover .nsl-button {
	background-color: #f6f8f7 !important;
}

.ph-sl .ph-sl__row div.nsl-container .nsl-container-buttons a:active .nsl-button {
	background-color: #eef1ef !important;
}

.ph-sl .ph-sl__row div.nsl-container .nsl-container-buttons a:focus-visible {
	outline: 2px solid var(--ph-sl-accent);
	outline-offset: 2px;
}

.ph-sl .ph-sl__row div.nsl-container .nsl-button .nsl-button-svg-container {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	padding: 0;
}

.ph-sl .ph-sl__row div.nsl-container .nsl-button .nsl-button-svg-container svg {
	display: block;
	width: 22px;
	height: 22px;
}

.ph-sl .ph-sl__row div.nsl-container .nsl-button div.nsl-button-label-container {
	margin: 0;
	padding: 0;
	font-family: "Google Sans", "Roboto Medium", Roboto, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
	font-size: 15px;
	font-weight: 500;
	line-height: 20px;
	letter-spacing: 0.25px;
	text-align: center;
	text-transform: none;
	white-space: nowrap;
}

.ph-sl .ph-sl__row div.nsl-container .nsl-button div.nsl-button-label-container b {
	font-weight: inherit;
}

/* Two or more providers: logo only, the text visually hidden (still read out, like aria-label). */
.ph-sl:is(.ph-sl--n2, .ph-sl--n3) .ph-sl__row div.nsl-container .nsl-button div.nsl-button-label-container {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.ph-sl:is(.ph-sl--n2, .ph-sl--n3) .ph-sl__row div.nsl-container .nsl-button .nsl-button-svg-container svg {
	width: 24px;
	height: 24px;
}

/* 10D, browser inside Instagram / Facebook (T10-43): Nextend's script removes the Google button there (Google
 * refuses embedded browsers, js/nsl.js:353-363), so a row printed with two buttons can end with Facebook alone:
 * that one button shows its text again ("Kontynuuj z Facebookiem"). */
.ph-sl:is(.ph-sl--n2, .ph-sl--n3) .ph-sl__row div.nsl-container .nsl-container-buttons a:only-child .nsl-button div.nsl-button-label-container {
	position: static;
	width: auto;
	height: auto;
	margin: 0;
	overflow: visible;
	clip: auto;
	clip-path: none;
}

/* Facebook (10D): brand colours stay Nextend's (#1877F2, white f), same pill. */
.ph-sl .ph-sl__row div.nsl-container .nsl-container-buttons a .nsl-button-facebook {
	background-color: #1877f2 !important;
	box-shadow: none;
	color: #fff;
}

.ph-sl .ph-sl__row div.nsl-container .nsl-container-buttons a:hover .nsl-button-facebook {
	background-color: #166fe5 !important;
}

/* Consent line: 12 px, muted, centered, links underlined. It is a <div> (C/ rules for "#main .container p" and
 * their links do not reach it, UX-03); the gap above it is padding of the row, which no card rule overrides.
 * #5c645f on white 6.1:1. */
.ph-sl .ph-sl__row {
	padding: 0 0 8px;
}

.ph-sl .ph-sl__consent {
	margin: 0;
	font-size: 12px;
	line-height: 1.45;
	color: var(--ph-sl-muted);
	text-align: center;
	text-wrap: balance;
}

.ph-sl .ph-sl__consent a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
	white-space: nowrap;
}

/* Text for screen readers only ("otwiera się w nowej karcie" in the consent links). */
.ph-sl .ph-sl__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.ph-sl .ph-sl__consent a:focus-visible {
	outline: 2px solid var(--ph-sl-accent);
	outline-offset: 2px;
}

/* "lub": thin lines left and right, lowercase. */
.ph-sl .ph-sl__or {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 12px 0 0;
	color: var(--ph-sl-muted);
	font-size: 13px;
	line-height: 18px;
	text-transform: none;
}

.ph-sl .ph-sl__or::before,
.ph-sl .ph-sl__or::after {
	content: "";
	flex: 1 1 auto;
	border-top: 1px solid var(--ph-sl-line);
}

/* Our screens and the technical pages: white card like the C/ login pages (spec 7, line 655). */
/* UX-07: on the technical pages (test page, Register flow) the card sits in the theme content area; the
 * whole main area gets the beige background, so there is no beige box inside a white page. */
body.ph-sl-tech #main {
	background-color: #f6f4f0;
}

body.ph-sl-tech #main .ph-sl-screen {
	padding: 8px 0 24px;
	background: none;
}

.ph-sl-screen {
	display: flex;
	justify-content: center;
	box-sizing: border-box;
	width: 100%;
	padding: 32px 16px 56px;
	background: #f6f4f0;
}

.ph-sl-card {
	box-sizing: border-box;
	width: 100%;
	max-width: 480px;
	padding: 24px 20px;
	color: #1f2421;
	text-align: left;
	background: #fff;
	border: 1px solid #e5e5e2;
	border-radius: 16px;
}

.ph-sl-card__title {
	margin: 0 0 12px;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.3;
	text-align: left;
}

.ph-sl-card__text,
.ph-sl-card__notice,
.ph-sl-card--flow #registerform p {
	margin: 0 0 16px;
	font-size: 16px;
	line-height: 1.5;
}

.ph-sl-card a {
	color: #1f4d3a;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.ph-sl-card .ph-sl .ph-sl__consent a {
	color: inherit;
}

.ph-sl-card__notice {
	padding: 8px 12px;
	border-left: 3px solid var(--ph-color-accent, #8c644d);
	background: rgba(140, 100, 77, 0.08);
}

.ph-sl-card__form {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.ph-sl-card__input {
	min-height: 48px;
	font-size: 16px;
	letter-spacing: 0.3em;
	text-align: center;
	border: 1px solid #6b757d;
	border-radius: 10px;
}

.ph-sl-card__button,
.ph-sl-card--flow #registerform input[type="submit"] {
	box-sizing: border-box;
	display: block;
	width: 100%;
	min-height: 48px;
	padding: 12px 20px;
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	color: #fff;
	text-transform: none;
	cursor: pointer;
	background: #1f4d3a;
	border: 0;
	border-radius: 999px;
	box-shadow: none;
}

.ph-sl-card__button:hover,
.ph-sl-card--flow #registerform input[type="submit"]:hover {
	background: #163a2b;
}

.ph-sl-card__button:focus-visible,
.ph-sl-card--flow #registerform input[type="submit"]:focus-visible {
	outline: 2px solid #1f4d3a;
	outline-offset: 2px;
}

.ph-sl-card--flow #registerform {
	margin: 0;
	padding: 0;
	background: none;
	border: 0;
	box-shadow: none;
}

.ph-sl-card--flow #registerform .submit {
	margin: 16px 0 0;
	padding: 0;
}

.ph-sl-card--flow #registerform br.clear {
	display: none;
}

.ph-sl-card__resend {
	align-self: center;
	min-height: 44px;
	background: none;
	border: 0;
	text-decoration: underline;
	cursor: pointer;
	font-size: 14px;
}

@media (min-width: 1024px) {
	.ph-sl-card {
		padding: 32px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ph-sl .ph-sl__row div.nsl-container .nsl-container-buttons a .nsl-button {
		transition: none;
	}
}
