/* IB Contact Card — Elementor widget */

.ib-ccf {
	--ib-accent: #ca3636;
	--ib-overlay: rgba(17, 20, 32, 0.62);
	--ib-modal-bg: #fff;
	--ib-modal-radius: 20px;
	--ib-field-radius: 12px;
	--ib-border: #e2e5ec;
	--ib-muted: #6b7280;

	display: flex;
	justify-content: center;
}

/* ------------------------------- Card -------------------------------- */

.ib-ccf__card {
	position: relative;
	width: 100%;
	max-width: 340px;
	background: #fff;
	border-radius: 24px;
	padding: 16px 16px 24px;
	box-sizing: border-box;
}

.ib-ccf__media {
	position: relative;
	aspect-ratio: 3 / 4;
	margin-bottom: 18px;
}

.ib-ccf__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 18px;
	position: relative;
	z-index: 2;
}

.ib-ccf__body {
	display: flex;
	flex-direction: column;
	gap: 6px;
	position: relative;
	z-index: 4;
}

.ib-ccf__name {
	font-size: 18px;
	font-weight: 700;
	color: #1b4db1;
	line-height: 1.25;
}

.ib-ccf__position {
	font-size: 14px;
	color: var(--ib-muted);
}

.ib-ccf__contacts {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin: 8px 0 16px;
	font-size: 16px;
}

.ib-ccf__contacts a {
	color: #2b2b2b;
	text-decoration: none;
	transition: color 0.2s ease;
	width: fit-content;
}

.ib-ccf__contacts a:hover,
.ib-ccf__contacts a:focus-visible {
	color: var(--ib-accent);
}

/* ------------------------------ Button ------------------------------- */

.ib-ccf__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 14px 26px;
	border: 0;
	border-radius: 40px;
	background: var(--ib-accent);
	color: #fff;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.12s ease;
	align-self: stretch;
}

.ib-ccf__btn:hover {
	background: #a82a2a;
}

.ib-ccf__btn:active {
	transform: translateY(1px);
}

.ib-ccf__btn:focus-visible {
	outline: 3px solid rgba(202, 54, 54, 0.35);
	outline-offset: 2px;
}

.ib-ccf__btn[disabled] {
	opacity: 0.6;
	cursor: progress;
}

.ib-ccf__btn-star {
	display: inline-flex;
	width: 12px;
	color: currentColor;
	flex: 0 0 auto;
}

.ib-ccf__btn-star svg {
	width: 100%;
	height: auto;
	display: block;
}

/* ------------------------------ Decor -------------------------------- */

.ib-ccf__deco {
	position: absolute;
	width: var(--ib-deco-size, 54px);
	line-height: 0;
	color: var(--ib-accent);
	pointer-events: none;
	left: calc(var(--ib-deco-ax, 100%) + var(--ib-deco-x, 0px));
	top: calc(var(--ib-deco-ay, 0%) + var(--ib-deco-y, 0px));
	transform: translate(-50%, -50%) rotate(var(--ib-deco-rotate, 0deg));
	z-index: 3;
}

.ib-ccf__deco svg,
.ib-ccf__deco img {
	width: 100%;
	height: auto;
	display: block;
}

.ib-ccf__deco--below {
	z-index: 1;
}

.ib-ccf__deco--tl { --ib-deco-ax: 0%;   --ib-deco-ay: 0%; }
.ib-ccf__deco--tc { --ib-deco-ax: 50%;  --ib-deco-ay: 0%; }
.ib-ccf__deco--tr { --ib-deco-ax: 100%; --ib-deco-ay: 0%; }
.ib-ccf__deco--ml { --ib-deco-ax: 0%;   --ib-deco-ay: 50%; }
.ib-ccf__deco--mr { --ib-deco-ax: 100%; --ib-deco-ay: 50%; }
.ib-ccf__deco--bl { --ib-deco-ax: 0%;   --ib-deco-ay: 100%; }
.ib-ccf__deco--bc { --ib-deco-ax: 50%;  --ib-deco-ay: 100%; }
.ib-ccf__deco--br { --ib-deco-ax: 100%; --ib-deco-ay: 100%; }

@media (max-width: 767px) {
	.ib-ccf__deco--hide-mobile {
		display: none;
	}
}

/* ------------------------------ Modal -------------------------------- */

.ib-ccf__modal[hidden] {
	display: none;
}

.ib-ccf__modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}

.ib-ccf__overlay {
	position: absolute;
	inset: 0;
	background: var(--ib-overlay);
	animation: ib-ccf-fade 0.2s ease;
}

.ib-ccf__dialog {
	position: relative;
	width: 100%;
	max-width: 440px;
	max-height: 90vh;
	overflow-y: auto;
	background: var(--ib-modal-bg);
	border-radius: var(--ib-modal-radius);
	padding: 28px 26px 24px;
	box-sizing: border-box;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
	animation: ib-ccf-pop 0.22s ease;
}

@keyframes ib-ccf-fade {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes ib-ccf-pop {
	from { opacity: 0; transform: translateY(12px) scale(0.98); }
	to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.ib-ccf__overlay,
	.ib-ccf__dialog {
		animation: none;
	}
}

.ib-ccf__close {
	position: absolute;
	top: 10px;
	right: 12px;
	width: 36px;
	height: 36px;
	border: 0;
	background: transparent;
	font-size: 28px;
	line-height: 1;
	color: #98a0ad;
	cursor: pointer;
	border-radius: 50%;
}

.ib-ccf__close:hover {
	color: #2b2b2b;
	background: #f1f3f7;
}

.ib-ccf__title {
	margin: 0 30px 6px 0;
	font-size: 22px;
	line-height: 1.25;
	color: #16181d;
}

.ib-ccf__lead {
	margin: 0 0 18px;
	color: var(--ib-muted);
	font-size: 15px;
	line-height: 1.45;
}

/* ------------------------------ Form --------------------------------- */

.ib-ccf__form {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.ib-ccf__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.ib-ccf__field label {
	font-size: 14px;
	font-weight: 600;
	color: #3a3f4a;
}

.ib-ccf__req {
	color: var(--ib-accent);
}

.ib-ccf__field input,
.ib-ccf__field textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 12px 14px;
	border: 1px solid var(--ib-border);
	border-radius: var(--ib-field-radius);
	font: inherit;
	font-size: 16px;
	color: #16181d;
	background: #fff;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ib-ccf__field textarea {
	resize: vertical;
	min-height: 84px;
}

.ib-ccf__field input:focus,
.ib-ccf__field textarea:focus {
	outline: none;
	border-color: var(--ib-accent);
	box-shadow: 0 0 0 3px rgba(202, 54, 54, 0.14);
}

.ib-ccf__field.is-invalid input,
.ib-ccf__field.is-invalid textarea {
	border-color: #d92d20;
	background: #fff7f7;
}

.ib-ccf__err {
	display: none;
	font-size: 13px;
	color: #d92d20;
}

.ib-ccf__err.is-visible {
	display: block;
}

.ib-ccf__consent {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 13px;
	line-height: 1.4;
	color: var(--ib-muted);
	cursor: pointer;
}

.ib-ccf__consent input {
	margin-top: 2px;
	width: 16px;
	height: 16px;
	accent-color: var(--ib-accent);
	flex: 0 0 auto;
}

.ib-ccf__consent a {
	color: var(--ib-accent);
}

.ib-ccf__hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.ib-ccf__status {
	font-size: 14px;
	line-height: 1.45;
	min-height: 1px;
}

.ib-ccf__status.is-error {
	color: #d92d20;
}

.ib-ccf__status.is-success {
	color: #067647;
	font-weight: 600;
}

.ib-ccf__form.is-sent .ib-ccf__field,
.ib-ccf__form.is-sent .ib-ccf__consent,
.ib-ccf__form.is-sent .ib-ccf__btn--submit {
	display: none;
}

/* Тело страницы не скроллится, пока открыт попап */
body.ib-ccf-lock {
	overflow: hidden;
}
