/**
 * ContactForm block — frontend styles.
 */

@import '../../assets/css/components/form.css';

.rs-contact-form-block {
	margin-top: var(--rs-margin-top-mobile, var(--rs-margin-top-tablet, var(--rs-margin-top, 0)));
	margin-bottom: var(--rs-margin-bottom-mobile, var(--rs-margin-bottom-tablet, var(--rs-margin-bottom, 0)));
}

/* ─── Status messages ────────────────────────────────── */

.rs-form__status {
	margin-top: 12px;
	padding: 12px 16px;
	border-radius: 4px;
	font-family: var(--font-primary);
	font-size: 14px;
	line-height: 1.4;
}

.rs-form__status--success {
	background: rgba(76, 175, 80, 0.1);
	color: #2e7d32;
	border: 1px solid rgba(76, 175, 80, 0.3);
}

.rs-form__status--error {
	background: rgba(255, 0, 2, 0.07);
	color: var(--color-red);
	border: 1px solid rgba(255, 0, 2, 0.2);
}

/* ─── Submit button ──────────────────────────────────── */

.rs-form-fiels--submit {
	align-items: flex-end;
}

.btn.rs-form__submit {
	padding: 14px 26px;
	font-size: 16px;
	border-radius: 5px;
	width: 100%;
}

/* ─── Submit: disabled state ─────────────────────────── */

.rs-form__submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

@media (min-width: 960px) {
	.rs-contact-form-block {
		margin-top: var(--rs-margin-top-tablet, var(--rs-margin-top, 0));
		margin-bottom: var(--rs-margin-bottom-tablet, var(--rs-margin-bottom, 0));
	}

	.btn.rs-form__submit {
		padding: 8px 16px;
		font-size: 14px;
		width: auto;
	}

	/* ─── Submit: full width ─────────────────────────────── */
	
	.rs-form-field--submit-full .btn.rs-form__submit {
		width: 100%;
	}
	
	.rs-form-field--submit-full .rs-form__submit {
		width: 100%;
	}
}

@media (min-width: 1440px) {
	.rs-contact-form-block {
		margin-top: var(--rs-margin-top, 0);
		margin-bottom: var(--rs-margin-bottom, 0);
	}

	.btn.rs-form__submit {
		padding: 14px 26px;
		font-size: 16px;
	}
}

/* ─── Modal overlay ──────────────────────────────────── */

.rs-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
}

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

.rs-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
}

/* Technical wrapper — no visual padding, just sizing + scroll */
.rs-modal__container {
	position: relative;
	z-index: 1;
	background: #fff;
	border-radius: 12px;
	max-width: 712px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
}

.rs-modal__close {
	position: absolute;
	top: 16px;
	right: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	background: none;
	border: none;
	cursor: pointer;
	color: #21272A;
	padding: 0;
	border-radius: 6px;
	transition: color .2s ease, background-color .2s ease;
	z-index: 1;
}

.rs-modal__close:hover {
	color: #0065CA;
	background-color: rgba(0, 101, 202, 0.08);
}

body.rs-modal-open {
	overflow: hidden;
}

/* Mobile: full width with 20px margin on each side */
@media (max-width: 959px) {
	.rs-modal__container {
		width: calc(100% - 40px);
		max-width: none;
		border-radius: 8px;
	}
}
