/**
 * Soulful Healing Contact Modal widget — base styles.
 * All Elementor style controls override these via inline selectors;
 * values here are sensible defaults consuming theme CSS variables.
 */

.sh-modal-trigger-wrap {
	display: flex;
}

.sh-modal {
	position: fixed;
	inset: 0;
	z-index: 2000;
}

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

.sh-modal__overlay {
	position: absolute;
	inset: 0;
	background: var(--sh-overlay);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	opacity: 0;
	transition: opacity var(--sh-transition-base);
}

.sh-modal.is-open .sh-modal__overlay {
	opacity: 1;
}

.sh-modal__box {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) scale(0.96);
	width: min(calc(100% - 32px), 640px);
	max-height: calc(100vh - 48px);
	overflow-y: auto;
	background: var(--sh-background);
	border: 1px solid var(--sh-border);
	border-radius: 24px;
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
	opacity: 0;
	transition: opacity var(--sh-transition-base), transform var(--sh-transition-base);
}

.sh-modal.is-open .sh-modal__box {
	opacity: 1;
	transform: translate(-50%, -50%) scale(1);
}

.sh-modal__close {
	position: absolute;
	top: var(--sh-space-5);
	right: var(--sh-space-5);
	width: 40px;
	height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--sh-heading);
	border-radius: var(--sh-radius-pill);
	border: 1px solid var(--sh-border);
	z-index: 1;
}

.sh-modal__content {
	padding: var(--sh-space-6) var(--sh-space-6) var(--sh-space-5);
}

.sh-modal__title {
	font-family: var(--sh-font-heading);
	font-weight: 600;
	font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
	color: var(--sh-heading);
	margin-bottom: var(--sh-space-2);
}

.sh-modal__subtitle {
	font-family: var(--sh-font-body);
	color: var(--sh-text-muted);
	font-size: 0.9375rem;
	line-height: 1.5;
	margin-bottom: var(--sh-space-5);
}

/* Form */
.sh-form__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 var(--sh-space-4);
}

.sh-form__row {
	margin-bottom: var(--sh-space-4);
}

.sh-form__row--full {
	grid-column: 1 / -1;
}

@media (max-width: 560px) {
	.sh-form__grid {
		grid-template-columns: 1fr;
	}
}

.sh-form__label {
	display: block;
	font-family: var(--sh-font-nav);
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--sh-heading);
	margin-bottom: var(--sh-space-2);
}

.sh-form__input,
.sh-form__select,
.sh-form__textarea {
	width: 100%;
	font-family: var(--sh-font-body);
	font-size: 0.9375rem;
	color: #241832;
	background: #FFFFFF;
	border: 1px solid var(--sh-border);
	border-radius: var(--sh-radius-sm);
	padding: var(--sh-space-3) var(--sh-space-4);
	transition: border-color var(--sh-transition-fast);
}

.sh-form__textarea {
	resize: vertical;
	min-height: 64px;
}

.sh-form__input:focus,
.sh-form__select:focus,
.sh-form__textarea:focus {
	outline: none;
	border-color: var(--sh-accent);
}

.sh-form__input.has-error,
.sh-form__select.has-error,
.sh-form__textarea.has-error {
	border-color: var(--sh-error);
}

.sh-form__error {
	color: var(--sh-error);
	font-size: 0.8125rem;
	margin: var(--sh-space-2) 0 0;
	min-height: 1em;
}

.sh-form__status {
	font-size: 0.875rem;
	margin: 0 0 var(--sh-space-4);
	min-height: 1.2em;
}

.sh-form__status.is-success {
	color: var(--sh-success);
}

.sh-form__status.is-error {
	color: var(--sh-error);
}

.sh-form__submit {
	width: 100%;
	justify-content: center;
}

.sh-form__submit:disabled {
	opacity: 0.6;
	pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
	.sh-modal__overlay,
	.sh-modal__box {
		transition: none;
	}
}

/**
 * Theme-wide floating contact button (FAB).
 * Fixed to the right edge, vertically centered, with a label rotated
 * anticlockwise beside the icon. Always present via footer.php
 * regardless of Elementor / page content.
 */
.sh-fab {
	position: fixed;
	top: 50%;
	right: 0;
	transform: translateY(-50%);
	z-index: 900;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: var(--sh-space-2);
	padding: var(--sh-space-4) var(--sh-space-2);
	background: var(--sh-accent);
	color: var(--sh-button-text);
	border-radius: var(--sh-radius-md) 0 0 var(--sh-radius-md);
	box-shadow: -4px 6px 24px rgba(0, 0, 0, 0.35);
	transition: background-color var(--sh-transition-fast);
}

.sh-fab:hover,
.sh-fab:focus-visible {
	background: var(--sh-accent-hover);
}

.sh-fab__icon {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
}

.sh-fab__label {
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	font-family: var(--sh-font-button);
	font-weight: 600;
	font-size: 0.8125rem;
	letter-spacing: 0.02em;
	white-space: nowrap;
}

@media (max-width: 640px) {
	.sh-fab {
		padding: var(--sh-space-3) var(--sh-space-2);
		gap: var(--sh-space-1);
	}

	.sh-fab__icon {
		width: 16px;
		height: 16px;
	}

	.sh-fab__label {
		font-size: 0.6875rem;
	}
}
