/**
 * Custom CSS for Stop27 theme
 * Styles that cannot be expressed in theme.json
 */

/* Geologica font variation settings */
.has-geologica-font-family,
h1, h2, h3, h4, h5, h6 {
	font-variation-settings: "CRSV" 0, "SHRP" 0;
}

/* Hero section (homepage) */
.stop27-hero {
	position: relative;
	overflow: visible;
	min-height: 70vh;
	display: flex;
	align-items: center;
}

.stop27-hero .wp-block-cover__inner-container {
	position: relative;
	z-index: 2;
	padding-top: 7rem;
}

@media (max-width: 782px) {
	.stop27-header .wp-block-site-logo img {
		width: 140px !important;
		height: auto !important;
	}
}

.stop27-hero-heading {
	mix-blend-mode: exclusion;
}

/* Act Now hero — decorative hand + dots via pseudo-elements */
.stop27-act-now-hero {
	position: relative;
	overflow: hidden;
}

.stop27-act-now-hero::before,
.stop27-act-now-hero::after {
	content: "";
	position: absolute;
	pointer-events: none;
	background-repeat: no-repeat;
	background-size: contain;
}

/* Dots pattern — centered behind hand */
.stop27-act-now-hero::before {
	top: 12%;
	left: 50%;
	transform: translateX(-20%);
	width: clamp(250px, 36vw, 500px);
	aspect-ratio: 548 / 495;
	background-image: url("../images/dots.png");
	opacity: 0.35;
	z-index: 1;
}

/* Hand image — top center, reaching down */
.stop27-act-now-hero::after {
	top: -2%;
	left: 50%;
	transform: translateX(-30%);
	width: clamp(300px, 42vw, 580px);
	aspect-ratio: 689 / 511;
	background-image: url("../images/hand.webp");
	z-index: 2;
	filter: grayscale(100%) contrast(1.15) brightness(1.05);
	mix-blend-mode: luminosity;
}

/* Act Now hero heading — constrained width, centered */
.stop27-act-now-hero h1 {
	max-width: 800px;
	margin-left: auto;
	margin-right: auto;
}

/* Smaller heading only for long translations */
.stop27-act-now-hero--long h1 {
	font-size: clamp(1.75rem, 3.5vw, 3rem) !important;
}

/* Heading sits above decorative layers */
.stop27-act-now-hero > .wp-block-group__inner-container,
.stop27-act-now-hero > * {
	position: relative;
	z-index: 3;
}

@media (max-width: 782px) {
	.stop27-act-now-hero::after {
		left: auto;
		right: -10%;
		top: 2%;
		transform: none;
		width: 65vw;
		opacity: 0.4;
	}

	.stop27-act-now-hero::before {
		left: auto;
		right: -5%;
		top: 8%;
		transform: none;
		width: 60vw;
		opacity: 0.18;
	}
}

/* About Us heading no-wrap */
.has-pink-background-color .wp-block-columns .wp-block-heading {
	white-space: nowrap;
}

/* Form input styles */
.stop27-form-container {
	border: 2px solid var(--wp--preset--color--pink);
	border-radius: 52px;
	padding: clamp(1.5rem, 4vw, 3rem);
	overflow: hidden;
	box-sizing: border-box;
}

.stop27-form-container *,
.stop27-form-container *::before,
.stop27-form-container *::after {
	box-sizing: border-box;
}

.stop27-form-container input[type="text"],
.stop27-form-container input[type="email"],
.stop27-form-container input[type="number"],
.stop27-form-container select {
	width: 100%;
	box-sizing: border-box;
	border: none;
	border-radius: 47px;
	padding: 0.85rem 1.5rem;
	font-family: var(--wp--preset--font-family--be-vietnam-pro);
	font-size: 0.95rem;
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--navy);
	outline: none;
	transition: box-shadow 0.2s;
}

.stop27-letter-wrap {
	background: var(--wp--preset--color--white);
	border-radius: 24px;
	padding: 1.25rem 0.625rem 1.25rem 1.25rem;
	max-height: 340px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.stop27-form-container textarea {
	width: 100%;
	box-sizing: border-box;
	border: none;
	border-radius: 0;
	padding: 0 0.625rem 0 0;
	font-family: var(--wp--preset--font-family--be-vietnam-pro);
	font-size: 0.95rem;
	background: transparent;
	color: var(--wp--preset--color--navy);
	outline: none;
	flex: 1;
	resize: none;
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: var(--wp--preset--color--navy) transparent;
}

.stop27-form-container textarea::-webkit-scrollbar {
	width: 8px;
}

.stop27-form-container textarea::-webkit-scrollbar-track {
	background: transparent;
}

.stop27-form-container textarea::-webkit-scrollbar-thumb {
	background: var(--wp--preset--color--navy);
	border-radius: 4px;
}

.stop27-form-container input::placeholder {
	color: rgba(0, 15, 48, 0.45);
}

.stop27-form-container textarea::placeholder {
	color: rgba(0, 15, 48, 0.45);
}

.stop27-form-container input:focus,
.stop27-form-container select:focus,
.stop27-form-container textarea:focus {
	box-shadow: 0 0 0 2px var(--wp--preset--color--pink);
}

.stop27-form-container select {
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23000f30' stroke-width='2' fill='none'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 1.25rem center;
	padding-right: 3rem;
}

.stop27-form-container select option {
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--navy);
}

/* Form layout */
.stop27-form-row {
	margin-bottom: 1.25rem;
}

.stop27-form-row label {
	display: block;
	margin-bottom: 0.5rem;
	font-size: 0.95rem;
	color: var(--wp--preset--color--white);
}

.stop27-form-row--split {
	display: flex;
	gap: 1.25rem;
}

.stop27-form-row--split > div {
	flex: 1;
}

/* Subject display */
.stop27-form-subject {
	font-size: 1rem;
	margin: 0 0 1.5rem;
	color: var(--wp--preset--color--white);
}

/* Country label with icon */
.stop27-label-icon {
	display: inline-flex !important;
	align-items: center;
	gap: 0.35rem;
}

/* To display field */
.stop27-to-display {
	border: 1.5px solid var(--wp--preset--color--white);
	border-radius: 47px;
	padding: 0.75rem 1.5rem;
	text-align: center;
	font-size: 0.95rem;
	color: var(--wp--preset--color--white);
}

/* CC display */
.stop27-cc-label {
	text-transform: lowercase;
}

.stop27-cc-display {
	font-size: 0.95rem;
	line-height: 1.6;
	color: var(--wp--preset--color--white);
}

/* Submit button */
.stop27-submit-btn {
	background: var(--wp--preset--color--pink);
	color: var(--wp--preset--color--white);
	border: none;
	border-radius: 128px;
	padding: 1rem 3rem;
	font-family: var(--wp--preset--font-family--be-vietnam-pro);
	font-weight: 700;
	font-size: 1rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	cursor: pointer;
	transition: opacity 0.2s;
}

.stop27-submit-btn:hover {
	opacity: 0.9;
}

.stop27-submit-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Privacy disclaimer */
.stop27-form-disclaimer {
	font-size: 0.75rem;
	opacity: 0.6;
	margin-top: 1.5rem;
	line-height: 1.5;
	color: var(--wp--preset--color--white);
}

.stop27-form-disclaimer a {
	color: inherit;
	text-decoration: underline;
}

/* Checkbox styles */
.stop27-checkbox {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	cursor: pointer;
	font-size: 0.875rem;
	line-height: 1.4;
}

.stop27-checkbox input[type="checkbox"],
.stop27-checkbox input[type="radio"] {
	appearance: none;
	width: 20px;
	height: 20px;
	min-width: 20px;
	border: 1.5px solid var(--wp--preset--color--white);
	border-radius: 4px;
	background: transparent;
	cursor: pointer;
	position: relative;
	margin-top: 2px;
}

.stop27-checkbox input[type="checkbox"]:checked,
.stop27-checkbox input[type="radio"]:checked {
	background: var(--wp--preset--color--pink);
	border-color: var(--wp--preset--color--pink);
}

.stop27-checkbox input[type="checkbox"]:checked::after,
.stop27-checkbox input[type="radio"]:checked::after {
	content: "";
	position: absolute;
	left: 5px;
	top: 1px;
	width: 6px;
	height: 11px;
	border: solid white;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

/* Read more on pink background */
.has-pink-background-color .stop27-read-more summary {
	color: var(--wp--preset--color--white);
}

/* Commissioner sidebar */
.stop27-commissioner-photo {
	width: 120px;
	height: 120px;
	border-radius: 50%;
	object-fit: cover;
	object-position: top;
	border: 3px solid var(--wp--preset--color--pink);
}

.stop27-commissioner-highlight {
	color: var(--wp--preset--color--pink);
	font-weight: 700;
}

.stop27-recipient-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.stop27-recipient-list li {
	padding: 0.75rem 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.2);
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.stop27-recipient-list li:last-child {
	border-bottom: none;
}

.stop27-recipient-arrow {
	width: 16px;
	height: 16px;
	opacity: 0.6;
}

/* Language switcher dropdown */
.stop27-lang-switcher {
	position: relative;
	margin-left: 1rem;
	display: flex;
	align-items: center;
	align-self: center;
}

.stop27-lang-switcher img {
	width: 48px;
	height: 36px;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 8px;
	display: block;
}

.stop27-lang-switcher__toggle {
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	border-radius: 8px;
	transition: opacity 0.2s;
}

.stop27-lang-switcher__toggle:hover {
	opacity: 0.8;
}

.stop27-lang-dropdown {
	position: absolute;
	top: calc(100% + 0.5rem);
	right: 0;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	background: var(--wp--preset--color--navy);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 12px;
	padding: 0.5rem;
	z-index: 200;
	max-height: 320px;
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.stop27-lang-dropdown[hidden] {
	display: none;
}

.stop27-lang-dropdown__item {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.35rem 0.5rem;
	border-radius: 8px;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.15s;
}

.stop27-lang-dropdown__item:hover {
	background: rgba(255, 255, 255, 0.1);
}

.stop27-lang-dropdown__item img {
	width: 32px;
	height: 24px;
}

.stop27-lang-dropdown__name {
	font-size: 0.8rem;
	color: var(--wp--preset--color--white);
	font-family: var(--wp--preset--font-family--be-vietnam-pro);
}

/* Header — transparent overlay */
.stop27-header {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: 100;
	background: transparent !important;
	overflow: visible !important;
}

.stop27-header .wp-block-group {
	overflow: visible !important;
}

.admin-bar .stop27-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .stop27-header {
		top: 46px;
	}
}

/* Button outline variant */
.is-style-outline .wp-block-button__link {
	background: transparent;
	border: 2px solid currentColor;
}

.is-style-outline .wp-block-button__link:hover {
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--navy);
}

/* Scroll indicator */
.stop27-scroll-indicator {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--wp--preset--color--navy);
	font-size: 0.875rem;
	font-weight: 500;
	text-decoration: none;
}

/* Campaign XIX icon */
.stop27-xix-icon {
	font-family: var(--wp--preset--font-family--geologica);
	font-weight: 900;
	font-size: clamp(6rem, 14vw, 10rem);
	line-height: 0.85;
	letter-spacing: 0.05em;
}

/* 19 Day Campaign — edge-to-edge image */
.stop27-campaign-section > .wp-block-columns {
	max-width: none;
}

.stop27-campaign-section > .wp-block-columns > .wp-block-column:first-child {
	padding-left: max(var(--wp--preset--spacing--40), calc((100vw - 1100px) / 2));
}

.stop27-campaign-image-col {
	position: relative;
	overflow: hidden;
	min-height: 400px;
}

.stop27-campaign-image-col .wp-block-image {
	position: absolute;
	inset: 0;
	margin: 0;
}

.stop27-campaign-image-col .wp-block-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	mix-blend-mode: exclusion;
}

/* Read more on navy background */
.has-navy-background-color .stop27-read-more summary {
	color: var(--wp--preset--color--white);
}

/* Form status messages */
.stop27-form-status {
	padding: 1rem 1.5rem;
	border-radius: 12px;
	font-size: 0.9rem;
	margin-top: 1rem;
}

.stop27-form-status--success {
	background: rgba(76, 175, 80, 0.15);
	color: #4caf50;
	border: 1px solid rgba(76, 175, 80, 0.3);
}

.stop27-form-status--error {
	background: rgba(244, 67, 54, 0.15);
	color: #f44336;
	border: 1px solid rgba(244, 67, 54, 0.3);
}

/* Link colors on coloured backgrounds */
.has-navy-background-color a:not(.wp-block-button__link),
.has-pink-background-color a:not(.wp-block-button__link) {
	color: var(--wp--preset--color--white);
}

/* Responsive */
@media (max-width: 782px) {
	.stop27-campaign-section .wp-block-column {
		padding-right: var(--wp--preset--spacing--40) !important;
	}

	.stop27-campaign-image-col {
		min-height: 300px;
	}
}

@media (max-width: 782px) {
	.stop27-form-container {
		border-radius: 32px;
		padding: 1.5rem;
	}

	.stop27-form-container input[type="text"],
	.stop27-form-container input[type="email"],
	.stop27-form-container input[type="number"],
	.stop27-form-container select {
		border-radius: 32px;
	}

	/* Sidebar above form on mobile */
	.wp-block-column:has(.stop27-sidebar) {
		order: -1;
	}
}
