/* Форма «Отправить чертёж на расчёт» и первый экран страницы лазерной резки.
   Цвета - как у кнопок Elementor на сайте (см. metallokarkasy.css). */

.rq-wrap,
.rq-hero,
.rq-facts,
.rq-jump,
.rq-sticky {
	--rq-accent: #d94948;
	--rq-accent-dark: #b93a39;
	--rq-ink: #3a3a3a;
	--rq-muted: #5f6368;
	--rq-line: #d9d9d9;
	--rq-soft: #f5f5f5;
}

/* ---------- Кнопки ---------- */

.rq-btn {
	display: inline-block;
	padding: 0.8em 1.6em;
	border: 2px solid var(--rq-accent);
	border-radius: 100px;
	background: var(--rq-accent);
	color: #fff !important;
	font-weight: 600;
	font-size: 1rem;
	line-height: 1.3;
	text-align: center;
	text-decoration: none !important;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}
.rq-btn:hover,
.rq-btn:focus-visible { background: var(--rq-accent-dark); border-color: var(--rq-accent-dark); }
.rq-btn[disabled] { opacity: 0.6; cursor: default; }
.rq-btn--ghost { background: transparent; color: var(--rq-accent) !important; }
.rq-btn--ghost:hover,
.rq-btn--ghost:focus-visible { background: var(--rq-accent); color: #fff !important; }

/* ---------- Первый экран ---------- */

.rq-hero {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	gap: 2.5rem;
	align-items: center;
	color: var(--rq-ink);
}
.rq-hero__title {
	margin: 0 0 0.5em;
	font-size: clamp(1.6rem, 1.1rem + 1.8vw, 2.6rem);
	line-height: 1.15;
}
.rq-hero__lead { margin: 0 0 1.2em; font-size: 1.1rem; line-height: 1.5; }
.rq-hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0 0 1rem; }
.rq-hero__hint { margin: 0 0 1rem; color: var(--rq-muted); line-height: 1.5; }
.rq-hero__call { display: inline-block; margin-top: 0.3em; font-weight: 600; white-space: nowrap; }
.rq-hero__types { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.rq-hero__types a {
	display: inline-block;
	padding: 0.45em 0.95em;
	border: 1px solid var(--rq-line);
	border-radius: 100px;
	color: var(--rq-ink);
	font-size: 0.92rem;
	text-decoration: none;
}
.rq-hero__types a:hover,
.rq-hero__types a:focus-visible { border-color: var(--rq-accent); color: var(--rq-accent); }
.rq-hero__photo { margin: 0; }
.rq-hero__img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }

.rq-facts {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.6rem;
	margin: 1.6rem 0 0;
	padding: 1rem 1.2rem;
	list-style: none;
	background: var(--rq-soft);
	border-radius: 10px;
	color: var(--rq-ink);
}
.rq-facts li { margin: 0; }

/* ---------- Форма ---------- */

.rq-wrap {
	max-width: 860px;
	margin: 0 auto;
	padding: 1.6rem 1.6rem 1.8rem;
	background: #fff;
	border: 1px solid var(--rq-line);
	border-radius: 12px;
	color: var(--rq-ink);
	text-align: left;
	scroll-margin-top: 90px;
}
.rq-title { margin: 0 0 0.3em; font-size: clamp(1.35rem, 1.1rem + 0.8vw, 1.8rem); line-height: 1.25; color: var(--rq-ink); }
.rq-sub { margin: 0 0 1.3rem; color: var(--rq-muted); line-height: 1.5; }

.rq-form fieldset { margin: 0 0 1.1rem; padding: 0; border: 0; min-width: 0; }
.rq-form legend,
.rq-label,
.rq-field > label { display: block; margin: 0 0 0.4rem; padding: 0; font-weight: 600; font-size: 1rem; color: var(--rq-ink); }
.rq-opt { font-weight: 400; color: var(--rq-muted); }
.rq-field { margin: 0 0 1.1rem; }

/* auto-fit: в узкой колонке подвала поля сами встают в одну-две колонки. */
.rq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 1rem; }

.rq-form input[type="text"],
.rq-form input[type="tel"],
.rq-form input[type="email"],
.rq-form textarea {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 0.7em 0.85em;
	border: 1px solid var(--rq-line);
	border-radius: 8px;
	background: #fff;
	color: var(--rq-ink);
	font: inherit;
	font-size: 1rem; /* не меньше 16px - иначе iPhone увеличивает страницу при вводе */
	line-height: 1.4;
}
.rq-form textarea { resize: vertical; min-height: 6em; }
.rq-form input:focus,
.rq-form textarea:focus { border-color: var(--rq-accent); outline: none; box-shadow: 0 0 0 3px rgba(217, 73, 72, 0.18); }
.rq-field[data-rq-invalid] input,
.rq-field[data-rq-invalid] textarea { border-color: var(--rq-accent); }

.rq-chip { position: relative; display: inline-block; margin: 0 0.4rem 0.5rem 0; cursor: pointer; }
.rq-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rq-chip span {
	display: inline-block;
	padding: 0.5em 1em;
	border: 1px solid var(--rq-line);
	border-radius: 100px;
	font-size: 0.95rem;
	line-height: 1.3;
}
.rq-chip input:checked + span { border-color: var(--rq-accent); background: var(--rq-accent); color: #fff; }
.rq-chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(217, 73, 72, 0.3); }

.rq-check { display: inline-flex; align-items: center; gap: 0.4rem; margin: 0 1.2rem 0.4rem 0; font-weight: 400; cursor: pointer; }
.rq-check input { width: 1.1rem; height: 1.1rem; margin: 0; }

.rq-hint { display: block; margin-top: 0.35rem; font-size: 0.88rem; color: var(--rq-muted); line-height: 1.5; }
.rq-hint--contacts { margin: -0.6rem 0 1.1rem; }
.rq-err { display: block; margin-top: 0.35rem; font-size: 0.88rem; color: var(--rq-accent-dark); font-weight: 600; }
.rq-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.rq-files__drop {
	position: relative;
	display: block;
	padding: 1rem 1.1rem;
	border: 2px dashed var(--rq-line);
	border-radius: 10px;
	background: var(--rq-soft);
	text-align: center;
	cursor: pointer;
}
.rq-files__drop:hover,
.rq-files__drop.is-over,
.rq-files__drop:focus-within { border-color: var(--rq-accent); }
.rq-files__cta { display: block; margin-bottom: 0.25rem; font-weight: 700; color: var(--rq-accent); }
.rq-files__hint { display: block; font-size: 0.9rem; color: var(--rq-muted); line-height: 1.45; }
.rq-files__drop input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.rq-files__list { margin: 0.6rem 0 0; padding: 0; list-style: none; }
.rq-files__list li {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	margin: 0 0 0.4rem;
	padding: 0.45rem 0.6rem;
	border: 1px solid var(--rq-line);
	border-radius: 8px;
	font-size: 0.95rem;
}
.rq-files__name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.rq-files__size { flex: none; color: var(--rq-muted); }
.rq-files__list button {
	flex: none;
	width: 2rem;
	height: 2rem;
	padding: 0;
	border: 1px solid var(--rq-line);
	border-radius: 50%;
	background: #fff;
	color: var(--rq-ink);
	font-size: 1.1rem;
	line-height: 1;
	cursor: pointer;
}
.rq-files__list button:hover,
.rq-files__list button:focus-visible { border-color: var(--rq-accent); color: var(--rq-accent); }

.rq-consent label { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 400; line-height: 1.5; }
.rq-consent input { width: 1.1rem; height: 1.1rem; margin: 0.2rem 0 0; flex: none; }

.rq-submit { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; margin-top: 1.2rem; }
.rq-status { font-size: 0.95rem; color: var(--rq-muted); line-height: 1.45; }
.rq-status.is-err { color: var(--rq-accent-dark); font-weight: 600; }

.rq-msg { margin: 0 0 1.2rem; padding: 1rem 1.2rem; border-radius: 10px; line-height: 1.5; }
.rq-msg p { margin: 0 0 0.3rem; }
.rq-msg p:last-child { margin-bottom: 0; }
.rq-msg--ok { background: #eef7ee; border: 1px solid #b9dcb9; }
.rq-msg--err { background: #fdf0f0; border: 1px solid #efc0bf; }
.rq-msg__id { font-weight: 600; }
.rq-msg:focus { outline: none; }

.rq-jump { margin: 0.5rem 0; }

/* ---------- Кнопка внизу экрана (только телефоны) ---------- */

.rq-sticky { display: none; }

@media (max-width: 767px) {
	.rq-hero { grid-template-columns: 1fr; gap: 1.2rem; }
	.rq-hero__lead { font-size: 1.02rem; margin-bottom: 1em; }
	.rq-hero__actions .rq-btn { flex: 1 1 100%; }
	.rq-hero__photo { order: 2; }
	.rq-hero__img { aspect-ratio: 16 / 9; }
	.rq-facts { gap: 0.35rem 1rem; padding: 0.8rem 1rem; font-size: 0.95rem; }
	.rq-wrap { padding: 1.1rem 1rem 1.3rem; border-radius: 10px; scroll-margin-top: 70px; }
	.rq-submit .rq-btn { width: 100%; }

	.rq-sticky {
		display: block;
		position: fixed;
		left: 16px;
		right: 16px;
		bottom: 12px;
		z-index: 99980; /* ниже плашки cookie (99990) */
		padding: 0.85em 1em;
		border-radius: 100px;
		background: var(--rq-accent);
		color: #fff !important;
		font-weight: 700;
		text-align: center;
		text-decoration: none !important;
		box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
		transform: translateY(160%);
		transition: transform 0.2s ease;
	}
	.rq-sticky.is-on { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.rq-sticky { transition: none; }
}

/* ---------- Страница лазерной резки: текст из Elementor ---------- */

/* Таблица «Возможности станка» на узком экране вылезала за край на ~10px:
   ужимаем поля ячеек и разрешаем переносы по слогам, а не посреди слова. */
.page-id-1186 .elementor-widget-text-editor table { width: 100%; max-width: 100%; }
.page-id-1186 .elementor-widget-text-editor td { hyphens: auto; overflow-wrap: break-word; }
@media (max-width: 767px) {
	.page-id-1186 .elementor-widget-text-editor td { padding: 8px 10px; }
}
/* Подчёркивание ссылок от темы делает «чипы» похожими на текст. */
.rq-hero .rq-hero__types a { text-decoration: none !important; }
