/* Κουμπί επικοινωνίας για κινητά (template-parts/contact-fab.php) */

.contact-fab {
	display: none;
}

@media (max-width: 991px) {
	.contact-fab {
		display: block;
		position: fixed;
		right: 16px;
		bottom: calc(16px + env(safe-area-inset-bottom, 0px));
		z-index: 9990;
	}

	/* Το "πάνω" του Porto πάει αριστερά, για να μη συγκρούεται με το κουμπί. */
	html .scroll-to-top {
		right: auto;
		left: 10px;
	}

	.contact-fab__toggle {
		position: relative;
		display: flex;
		align-items: center;
		justify-content: center;
		width: 58px;
		height: 58px;
		border: 0;
		border-radius: 50%;
		background: var(--primary, #336633);
		color: #fff;
		font-size: 22px;
		box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
		cursor: pointer;
		transition: transform .25s ease, background-color .25s ease;
	}

	/* Απαλός παλμός για να τραβά την προσοχή, όσο είναι κλειστό. */
	.contact-fab__toggle::before {
		content: "";
		position: absolute;
		inset: 0;
		border-radius: 50%;
		background: var(--tertiary, #66cc99);
		opacity: .55;
		z-index: -1;
		animation: contact-fab-pulse 2.4s ease-out infinite;
	}

	.contact-fab.is-open .contact-fab__toggle::before {
		animation: none;
		opacity: 0;
	}

	.contact-fab__toggle:focus-visible {
		outline: 3px solid var(--tertiary, #66cc99);
		outline-offset: 3px;
	}

	.contact-fab__close {
		display: none;
	}

	.contact-fab.is-open .contact-fab__open {
		display: none;
	}

	.contact-fab.is-open .contact-fab__close {
		display: inline-block;
	}

	.contact-fab.is-open .contact-fab__toggle {
		transform: rotate(90deg);
		background: #3E3E3E;
	}

	.contact-fab__actions {
		position: absolute;
		right: 4px;
		bottom: 70px;
		margin: 0;
		padding: 0;
		list-style: none;
		pointer-events: none;
	}

	.contact-fab__actions li {
		margin: 0 0 12px;
		opacity: 0;
		transform: translateY(12px) scale(.9);
		transition: opacity .2s ease, transform .2s ease;
	}

	.contact-fab.is-open .contact-fab__actions {
		pointer-events: auto;
	}

	.contact-fab.is-open .contact-fab__actions li {
		opacity: 1;
		transform: none;
	}

	.contact-fab.is-open .contact-fab__actions li:nth-child(1) {
		transition-delay: .05s;
	}

	.contact-fab__action {
		display: flex;
		align-items: center;
		justify-content: flex-end;
		gap: 10px;
		text-decoration: none !important;
	}

	.contact-fab__label {
		padding: 7px 12px;
		border-radius: 6px;
		background: #fff;
		color: #3E3E3E;
		font-size: 14px;
		line-height: 1.3;
		white-space: nowrap;
		box-shadow: 0 3px 12px rgba(0, 0, 0, .15);
	}

	.contact-fab__label strong {
		display: block;
		color: var(--primary, #336633);
		font-weight: 600;
	}

	.contact-fab__icon {
		display: flex;
		align-items: center;
		justify-content: center;
		flex: 0 0 50px;
		width: 50px;
		height: 50px;
		border-radius: 50%;
		background: var(--tertiary, #66cc99);
		color: #fff;
		font-size: 19px;
		box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
	}
}

@keyframes contact-fab-pulse {
	0% {
		transform: scale(1);
		opacity: .55;
	}
	70%,
	100% {
		transform: scale(1.6);
		opacity: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.contact-fab__toggle,
	.contact-fab__actions li {
		transition: none;
	}

	.contact-fab__toggle::before {
		animation: none;
		opacity: 0;
	}
}
