/**
 * Socios Modals — base styles
 *
 * Structural, theme-agnostic styles: full-screen overlay, centered dialog,
 * size modifiers, close button, transitions and accessibility. Colours,
 * typography and button skins live in the per-theme stylesheets under
 * assets/css/themes/.
 *
 * @package Socios_Modals
 * @since   1.0.0
 */

.socios-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}

.socios-modal[hidden] {
	display: none;
}

.socios-modal.is-open {
	opacity: 1;
	visibility: visible;
}

.socios-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	cursor: pointer;
}

.socios-modal__dialog {
	position: relative;
	width: 100%;
	max-width: 560px;
	max-height: calc(100vh - 48px);
	overflow-y: auto;
	background: #fff;
	border-radius: 24px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	transform: translateY(12px);
	transition: transform 0.2s ease;
}

.socios-modal.is-open .socios-modal__dialog {
	transform: translateY(0);
}

/* Size modifiers. */
.socios-modal.is-size-small .socios-modal__dialog {
	max-width: 420px;
}

.socios-modal.is-size-medium .socios-modal__dialog {
	max-width: 560px;
}

.socios-modal.is-size-large .socios-modal__dialog {
	max-width: 800px;
}

.socios-modal__close {
	position: absolute;
	top: 12px;
	right: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	color: #333;
	background: transparent;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	transition: background 0.15s ease;
}

.socios-modal__close-icon {
	display: block;
}

.socios-modal__close:hover,
.socios-modal__close:focus {
	background: rgba(0, 0, 0, 0.08);
}

.socios-modal__body {
	/* Extra top padding clears the absolutely-positioned close button
		(top: 12px + 36px height) so content never sits underneath it. */
	padding: 60px 32px 32px;
}

.socios-modal__image {
	display: block;
	width: 100%;
	height: auto;
	margin: 0 0 20px;
	border-radius: 8px;
}

.socios-modal__heading {
	margin: 0 0 12px;
	font-size: 1.5rem;
	line-height: 1.25;
	text-align: center;
}

.socios-modal__content {
	margin: 0 0 24px;
}

.socios-modal__content:last-child {
	margin-bottom: 0;
}

.socios-modal__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	justify-content: center;
}

/* CTA buttons mirror the Hero Header block CTAs (acf/hero-header). */
.socios-modal__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 16px 40px;
	font-family: var(--font-family-display);
	font-size: 18px;
	font-weight: 500;
	line-height: 100%;
	letter-spacing: 0.5px;
	text-align: center;
	text-decoration: none !important;
	border: 1.5px solid transparent;
	border-radius: 100px;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.socios-modal__cta:hover,
.socios-modal__cta:focus {
	opacity: 0.9;
}

/* Prevent the page behind the modal from scrolling while one is open. */
body.socios-modal-open {
	overflow: hidden;
}

/* Small screens: full-width dialog anchored to the bottom of the padding. */
@media (max-width: 600px) {
	.socios-modal {
		padding: 16px;
	}

	.socios-modal__body {
		padding: 56px 24px 24px;
	}

	.socios-modal__actions {
		flex-direction: column;
	}

	.socios-modal__cta {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.socios-modal,
	.socios-modal__dialog {
		transition: none;
	}
}
