/* ОтПроффи — калькулятор ворот и заборов */
.opc-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.opc {
	--opc-accent: #0abab5;
	--opc-dark: #1d2733;
	--opc-bg: #f5f7fa;
	--opc-line: #dde3ea;
	--opc-text: #1d2733;
	font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	color: var(--opc-text);
	max-width: 1100px;
	margin: 0 auto;
}
.opc * { box-sizing: border-box; }

/* Шаги */
.opc__steps { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.opc__step {
	flex: 1 1 200px; display: flex; align-items: center; gap: 10px;
	padding: 12px 16px; background: #fff; border: 1px solid var(--opc-line);
	border-radius: 10px; cursor: pointer; font-size: 15px; font-weight: 600;
	color: #8a96a3; transition: .15s;
}
.opc__step span {
	display: inline-flex; align-items: center; justify-content: center;
	width: 26px; height: 26px; border-radius: 50%; background: var(--opc-bg);
	font-size: 14px; flex: none;
}
.opc__step.is-active { color: var(--opc-dark); border-color: var(--opc-accent); }
.opc__step.is-active span { background: var(--opc-accent); color: #fff; }

/* Панели */
.opc__panel { display: none; animation: opc-fade .2s ease; }
.opc__panel.is-active { display: block; }
@keyframes opc-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.opc__panel-head h3 { margin: 0 0 6px; font-size: 22px; }
.opc__panel-head p { margin: 0 0 16px; color: #6b7785; font-size: 14px; }

/* Кнопки */
.opc__btn {
	padding: 11px 18px; border: 1px solid var(--opc-line); background: #fff;
	border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 600; transition: .15s;
}
.opc__btn:hover { border-color: var(--opc-accent); }
.opc__btn--accent { background: var(--opc-accent); color: #fff; border-color: var(--opc-accent); }
.opc__btn--accent:hover { filter: brightness(1.06); }
.opc__btn--ghost { color: #8a96a3; }
.opc__btn--lg { padding: 14px 26px; font-size: 16px; width: 100%; }
.opc__btn.is-active { background: var(--opc-dark); color: #fff; border-color: var(--opc-dark); }

.opc__input {
	padding: 11px 14px; border: 1px solid var(--opc-line); border-radius: 8px;
	font-size: 14px; width: 100%;
}
.opc__input:focus { outline: none; border-color: var(--opc-accent); }

/* Карта */
.opc__map-toolbar { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.opc__map-toolbar #opc-address { flex: 1 1 280px; }
.opc__map-types { display: inline-flex; gap: 0; margin-bottom: 10px; border: 1px solid var(--opc-line); border-radius: 9px; overflow: hidden; }
.opc__map-types button { border: none; background: #fff; color: var(--opc-dark); padding: 8px 16px; font-size: 13px; font-weight: 600; cursor: pointer; border-right: 1px solid var(--opc-line); transition: .12s; }
.opc__map-types button:last-child { border-right: none; }
.opc__map-types button:hover { background: var(--opc-bg); }
.opc__map-types button.is-active { background: var(--opc-accent); color: #fff; }
.opc__num { width: 86px; padding: 6px 8px; border: 1px solid var(--opc-line); border-radius: 7px; font-size: 16px; font-weight: 700; color: var(--opc-dark); }
.opc__num:focus { outline: none; border-color: var(--opc-accent); }
.opc__map { width: 100%; height: 460px; border-radius: 12px; overflow: hidden; background: var(--opc-bg); border: 1px solid var(--opc-line); }
.opc__map-result {
	display: flex; align-items: center; gap: 24px; margin-top: 14px; padding: 14px 18px;
	background: #fff; border: 1px solid var(--opc-line); border-radius: 10px; flex-wrap: wrap;
}
.opc__metric { font-size: 15px; color: #6b7785; }
.opc__metric b { font-size: 20px; color: var(--opc-dark); }
.opc__map-result .opc__next { margin-left: auto; }
.opc__hint { color: #6b7785; font-size: 13px; margin-top: 10px; }
.opc__hint--warn { color: #b4690e; }

/* 3D */
.opc__view { display: grid; grid-template-columns: 1fr 320px; gap: 18px; }
.opc__3d { height: 480px; border-radius: 12px; overflow: hidden; background: linear-gradient(#cfe5f5, #eef4f8); border: 1px solid var(--opc-line); }
.opc__3d--rebuild { display: flex; align-items: center; justify-content: center; color: #8a96a3; font-size: 15px; font-weight: 600; }
.opc__controls { background: #fff; border: 1px solid var(--opc-line); border-radius: 12px; padding: 18px; }
.opc__field { margin-bottom: 14px; }
.opc__field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: #6b7785; }
.opc__field select { width: 100%; padding: 10px 12px; border: 1px solid var(--opc-line); border-radius: 8px; font-size: 14px; background: #fff; }
.opc__field--row label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.opc__controls hr { border: none; border-top: 1px solid var(--opc-line); margin: 16px 0; }
.opc__perim { background: #eef7f5; border: 1px solid #cfe7e2; color: #14202b; border-radius: 8px; padding: 10px 12px; font-size: 13px; margin-bottom: 14px; }
.opc__perim b { color: #15807a; }
.opc__perim--empty { background: #fff6ec; border-color: #f0d9bd; color: #8a5a1e; }
.opc__colors { display: flex; gap: 8px; flex-wrap: wrap; }
.opc__color { width: 30px; height: 30px; border-radius: 6px; cursor: pointer; border: 2px solid transparent; }
.opc__color.is-active { border-color: var(--opc-dark); box-shadow: 0 0 0 2px #fff inset; }

/* Фото-визуализатор (блок 2) */
.opc__viz { display: grid; grid-template-columns: 1fr 340px; gap: 18px; }
.opc__viz-stage {
	position: relative; height: 520px; border-radius: 14px; overflow: hidden;
	background: #11202b; border: 1px solid var(--opc-line); cursor: crosshair;
}
.opc__viz-img {
	position: absolute; inset: 0; background-size: cover; background-position: center;
	opacity: 0; transition: opacity .55s ease, transform .25s ease;
	will-change: transform, opacity;
}
.opc__viz-img.is-visible { opacity: 1; animation: opc-kenburns 14s ease-in-out infinite alternate; }
@keyframes opc-kenburns { from { transform: scale(1.0); } to { transform: scale(1.07); } }
.opc__viz-badge {
	position: absolute; top: 14px; left: 14px; z-index: 3; background: rgba(20,32,43,.82);
	color: #fff; font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 20px;
}
.opc__viz-switch {
	position: absolute; top: 14px; right: 14px; z-index: 3; display: flex; gap: 4px;
	background: rgba(20,32,43,.72); padding: 4px; border-radius: 26px; backdrop-filter: blur(4px);
}
.opc__viz-switch button {
	border: none; background: transparent; color: #d7dee4; padding: 8px 18px; border-radius: 22px;
	cursor: pointer; font-weight: 600; font-size: 14px; transition: .15s;
}
.opc__viz-switch button.is-active { background: var(--opc-accent); color: #fff; }
.opc__viz-caption {
	position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 22px 20px 18px;
	display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
	background: linear-gradient(transparent, rgba(10,18,24,.86)); color: #fff;
}
.opc__viz-caption span { font-size: 20px; font-weight: 700; font-family: inherit; }
.opc__viz-caption b { font-size: 18px; color: #ffd9a8; white-space: nowrap; }

.opc__viz-stage #opc-3d { position: absolute; inset: 0; height: 100%; border: none; border-radius: 14px; background: transparent; }
.opc__viz-tools { position: absolute; top: 14px; left: 14px; z-index: 4; display: flex; gap: 10px; align-items: center; background: rgba(20,32,43,.72); backdrop-filter: blur(5px); padding: 8px 12px; border-radius: 24px; }
.opc__viz-tools label { color: #dfe7ec; font-size: 12px; display: flex; align-items: center; gap: 6px; }
.opc__viz-tools input[type=range] { width: 90px; accent-color: var(--opc-accent); }
.opc__viz-tools button { background: transparent; border: 1px solid #3a4d5b; color: #dfe7ec; border-radius: 18px; padding: 6px 12px; font-size: 12px; cursor: pointer; }
.opc__viz-tools button:hover { border-color: var(--opc-accent); }
.opc__viz-controls { background: #fff; border: 1px solid var(--opc-line); border-radius: 12px; padding: 16px; overflow-y: auto; max-height: 520px; }

.opc__thumbs { display: flex; flex-wrap: wrap; gap: 6px; }
.opc__opt { border: 1px solid var(--opc-line); background: #fff; color: var(--opc-dark); border-radius: 8px; padding: 7px 11px; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: .12s; line-height: 1.15; }
.opc__opt:hover { border-color: var(--opc-accent); }
.opc__opt.is-active { background: var(--opc-accent); border-color: var(--opc-accent); color: #fff; }
.opc__thumb {
	border: 2px solid transparent; border-radius: 9px; overflow: hidden; cursor: pointer; background: var(--opc-bg);
	padding: 0; display: flex; flex-direction: column; transition: .15s; text-align: center;
}
.opc__thumb:hover { border-color: #c3ccd4; transform: translateY(-2px); }
.opc__thumb.is-active { border-color: var(--opc-accent); box-shadow: 0 4px 12px rgba(232,116,12,.25); }
.opc__thumb-img { height: 52px; background-size: cover; background-position: center; background-color: #dde3e6; }
.opc__thumb-label { font-size: 10.5px; line-height: 1.2; padding: 4px 3px; color: var(--opc-dark); font-weight: 600; }
.opc__thumb.is-active .opc__thumb-label { color: var(--opc-accent); }

@media (max-width: 760px) {
	.opc__viz { grid-template-columns: 1fr; }
	.opc__viz-stage { height: 300px; }
	.opc__viz-controls { max-height: none; }
	.opc__thumbs { grid-template-columns: repeat(4, 1fr); }
}

/* Смета */
.opc__estimate { background: #fff; border: 1px solid var(--opc-line); border-radius: 12px; padding: 8px 18px 18px; }
.opc__estimate-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--opc-line); font-size: 14px; }
.opc__estimate-row:last-child { border-bottom: none; }
.opc__estimate-row .opc__er-name { color: #4a5663; }
.opc__estimate-row .opc__er-calc { color: #9aa6b2; font-size: 12px; }
.opc__estimate-row .opc__er-sum { font-weight: 700; white-space: nowrap; }
.opc__estimate-total { text-align: right; font-size: 18px; padding: 16px 18px 4px; }
.opc__estimate-total b { font-size: 26px; color: var(--opc-accent); }

.opc__lead { margin-top: 18px; background: var(--opc-dark); color: #fff; border-radius: 12px; padding: 22px; }
.opc__lead h4 { margin: 0 0 14px; font-size: 18px; }
.opc__lead-fields { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.opc__lead-fields .opc__input { flex: 1 1 200px; }
.opc__consent { font-size: 12px; color: #9aa6b2; margin: 10px 0 0; }
.opc__lead-msg { margin-top: 12px; font-size: 14px; }
.opc__lead-msg.is-ok { color: #6fe09a; }
.opc__lead-msg.is-err { color: #ff9a9a; }

@media (max-width: 760px) {
	.opc__view { grid-template-columns: 1fr; }
	.opc__map { height: 360px; }
	.opc__3d { height: 360px; }
	.opc__map-result .opc__next { margin-left: 0; width: 100%; }
}
