/* Dolna belka CTA (DM26-CTA), do 1199px. Markup: inc/sticky-cta.php */

.dm-cta,
.dm-cta-sheet {
	display: none;
}

.wpcf7 {
	scroll-margin-top: 90px;
}

@media (max-width: 1199.98px) {
	:root {
		--dm-cta-gap: 10px;
		--dm-cta-height: 66px;
		--dm-cta-bottom: calc(var(--dm-cta-gap) + env(safe-area-inset-bottom, 0px));
	}

	.dm-cta {
		display: block;
		position: fixed;
		z-index: 1040;
		left: var(--dm-cta-gap);
		right: var(--dm-cta-gap);
		bottom: var(--dm-cta-bottom);
		max-width: 560px;
		margin: 0 auto;
		background: rgba(255, 255, 255, 0.84);
		-webkit-backdrop-filter: saturate(180%) blur(18px);
		backdrop-filter: saturate(180%) blur(18px);
		border: 1px solid rgba(0, 0, 0, 0.06);
		border-radius: 22px;
		box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14), 0 1px 3px rgba(0, 0, 0, 0.06);
		transition: transform 0.25s ease, opacity 0.25s ease, visibility 0s linear 0s;
	}

	@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
		.dm-cta {
			background: rgba(255, 255, 255, 0.97);
		}
	}

	/* Menu, okno modalne, otwarty czat i klawiatura przy polu formularza. */
	body.modal-open .dm-cta,
	body:has(#navbarMain.open) .dm-cta,
	body:has(:is(input:not([type="checkbox"], [type="radio"], [type="submit"], [type="button"], [type="hidden"]), textarea, select):focus) .dm-cta,
	.dm-chat-open .dm-cta {
		transform: translateY(calc(100% + var(--dm-cta-bottom) + 10px));
		opacity: 0;
		visibility: hidden;
		transition: transform 0.25s ease, opacity 0.25s ease, visibility 0s linear 0.25s;
	}

	.dm-cta__list {
		display: flex;
		margin: 0;
		padding: 5px;
		list-style: none;
	}

	.dm-cta__cell {
		flex: 1 1 0;
		min-width: 0;
		margin: 0;
	}

	.dm-cta .dm-cta__item {
		position: relative;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 4px;
		width: 100%;
		min-height: 54px;
		margin: 0;
		padding: 6px 2px 5px;
		border: 0;
		border-radius: 17px;
		background: transparent;
		color: #000;
		font-family: Manrope, Helvetica, Arial, sans-serif;
		font-size: 11px;
		font-weight: 600;
		line-height: 1.15;
		letter-spacing: 0.01em;
		text-decoration: none;
		text-transform: none;
		cursor: pointer;
		-webkit-tap-highlight-color: transparent;
		transition: background-color 0.15s ease, color 0.15s ease;
	}

	.dm-cta .dm-cta__item:hover {
		color: #000;
		text-decoration: none;
	}

	.dm-cta .dm-cta__item[aria-current="page"] {
		color: #7f1041;
	}

	@media (hover: hover) {
		.dm-cta .dm-cta__item:hover {
			color: #7f1041;
		}
	}

	.dm-cta .dm-cta__item:active {
		background: rgba(127, 16, 65, 0.08);
		color: #7f1041;
	}

	.dm-cta .dm-cta__item:focus {
		outline: none;
	}

	.dm-cta .dm-cta__item:focus-visible {
		outline: 2px solid #7f1041;
		outline-offset: -2px;
	}

	.dm-cta__icon {
		flex: none;
		width: 22px;
		height: 22px;
	}

	.dm-cta__label {
		display: block;
		max-width: 100%;
		overflow: hidden;
		white-space: nowrap;
		text-overflow: ellipsis;
	}

	.dm-cta__item.has-unread::after {
		content: "";
		position: absolute;
		top: 7px;
		left: calc(50% + 7px);
		width: 9px;
		height: 9px;
		border: 2px solid #fff;
		border-radius: 50%;
		background: #7f1041;
	}

	.footer {
		padding-bottom: calc(57px + var(--dm-cta-height) + var(--dm-cta-bottom));
	}

	/* Domyślny dymek LiveChat: czat otwiera się z belki. */
	html:not(.dm-chat-open) #chat-widget-container {
		visibility: hidden !important;
		opacity: 0 !important;
		pointer-events: none !important;
	}

	/* Panel z numerami oddziałów */
	.dm-cta-sheet[open] {
		display: block;
		position: fixed;
		inset: auto var(--dm-cta-gap) var(--dm-cta-bottom) var(--dm-cta-gap);
		width: auto;
		max-width: 560px;
		max-height: calc(100% - 2 * var(--dm-cta-gap));
		margin: 0 auto;
		padding: 0;
		overflow: auto;
		border: 0;
		border-radius: 22px;
		background: rgba(255, 255, 255, 0.94);
		-webkit-backdrop-filter: saturate(180%) blur(18px);
		backdrop-filter: saturate(180%) blur(18px);
		box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
		color: #000;
		animation: dm-cta-sheet-in 0.22s ease-out;
	}

	.dm-cta-sheet::backdrop {
		background: rgba(0, 0, 0, 0.35);
	}

	.dm-cta-sheet__panel {
		padding: 8px 8px 10px;
		font-family: Manrope, Helvetica, Arial, sans-serif;
	}

	.dm-cta-sheet__head {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 6px 6px 6px 14px;
	}

	.dm-cta-sheet__title {
		margin: 0;
		font-size: 17px;
		font-weight: 700;
		line-height: 1.3;
	}

	.dm-cta-sheet .dm-cta-sheet__close {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 40px;
		height: 40px;
		margin: 0;
		padding: 0;
		border: 0;
		border-radius: 50%;
		background: rgba(0, 0, 0, 0.05);
		color: #000;
		cursor: pointer;
	}

	.dm-cta-sheet__close .dm-cta__icon {
		width: 20px;
		height: 20px;
	}

	.dm-cta-sheet__list {
		margin: 4px 0 0;
		padding: 0;
		list-style: none;
	}

	.dm-cta-sheet__list li {
		margin: 0;
	}

	.dm-cta-sheet__list li + li {
		border-top: 1px solid rgba(0, 0, 0, 0.07);
	}

	.dm-cta-sheet .dm-cta-sheet__phone {
		display: flex;
		align-items: center;
		gap: 12px;
		padding: 12px 14px;
		border-radius: 16px;
		color: #000;
		text-decoration: none;
		-webkit-tap-highlight-color: transparent;
	}

	.dm-cta-sheet .dm-cta-sheet__phone:hover {
		color: #000;
		text-decoration: none;
	}

	.dm-cta-sheet .dm-cta-sheet__phone:active {
		background: rgba(127, 16, 65, 0.06);
	}

	@media (hover: hover) {
		.dm-cta-sheet .dm-cta-sheet__phone:hover {
			background: rgba(127, 16, 65, 0.06);
		}
	}

	.dm-cta-sheet .dm-cta-sheet__phone:focus-visible {
		outline: 2px solid #7f1041;
		outline-offset: -2px;
	}

	.dm-cta-sheet__icon {
		display: inline-flex;
		flex: none;
		align-items: center;
		justify-content: center;
		width: 40px;
		height: 40px;
		border: 1px solid rgba(127, 16, 65, 0.35);
		border-radius: 50%;
		color: #7f1041;
	}

	.dm-cta-sheet__icon .dm-cta__icon {
		width: 19px;
		height: 19px;
	}

	.dm-cta-sheet__place {
		display: flex;
		flex: 1 1 auto;
		flex-direction: column;
		min-width: 0;
	}

	.dm-cta-sheet__street {
		font-size: 14px;
		font-weight: 600;
		line-height: 1.3;
	}

	.dm-cta-sheet__city {
		font-size: 12px;
		line-height: 1.3;
		color: #5c5c5c;
	}

	.dm-cta-sheet__number {
		flex: none;
		font-size: 15px;
		font-weight: 700;
		color: #7f1041;
		white-space: nowrap;
	}

	@keyframes dm-cta-sheet-in {
		from {
			transform: translateY(24px);
			opacity: 0;
		}

		to {
			transform: none;
			opacity: 1;
		}
	}
}

@media (max-width: 1199.98px) and (prefers-reduced-motion: reduce) {
	.dm-cta,
	body.modal-open .dm-cta,
	body:has(#navbarMain.open) .dm-cta,
	.dm-chat-open .dm-cta {
		transition: none;
	}

	.dm-cta-sheet[open] {
		animation: none;
	}
}
