/**
 * WhatsApp Dual Chat – Stili frontend
 * Palette Triveneta Salute
 *
 * @package WhatsApp_Dual_Chat
 */

/* ------------------------------------------------------------------ */
/*  Wrapper & posizionamento                                           */
/* ------------------------------------------------------------------ */

.wdc-wrapper {
	position: fixed;
	bottom: 20px;
	z-index: 9999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	line-height: 1.4;
}

.wdc-pos-right {
	right: 25px;
}

.wdc-pos-left {
	left: 25px;
}

/* ------------------------------------------------------------------ */
/*  FAB (bottone principale WhatsApp)                                  */
/*  Colore: #0097B2 (teal primario Triveneta Salute)                   */
/* ------------------------------------------------------------------ */

.wdc-fab {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	border: none;
	border-radius: 50%;
	background-color: #5BC5A7;
	cursor: pointer;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	animation: wdc-pulse 2s infinite ease-in-out;
}

.wdc-fab:hover,
.wdc-fab:focus-visible {
	transform: scale(1.2);
	box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
	outline: none;
}

.wdc-fab svg {
	width: 35px;
	height: 35px;
	pointer-events: none;
}

@keyframes wdc-pulse {
	0%   { transform: scale(1); }
	50%  { transform: scale(1.1); }
	100% { transform: scale(1); }
}

/* ------------------------------------------------------------------ */
/*  Popup WhatsApp                                                     */
/* ------------------------------------------------------------------ */

.wdc-popup {
	position: absolute;
	bottom: 72px;
	width: 280px;
	background: #FFFFFF;
	border-radius: 12px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px) scale(0.95);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.wdc-pos-right .wdc-popup {
	right: 0;
}

.wdc-pos-left .wdc-popup {
	left: 0;
}

.wdc-popup[aria-hidden="false"] {
	opacity: 1;
	visibility: visible;
	transform: translateY(0) scale(1);
}

/* ------------------------------------------------------------------ */
/*  Popup header                                                       */
/*  Colore: #004d58 (teal scuro)                                       */
/* ------------------------------------------------------------------ */

.wdc-popup-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px;
	background-color: #004d58;
	color: #FFFFFF;
	border-radius: 12px 12px 0 0;
	font-size: 15px;
	font-weight: 600;
}

.wdc-close {
	background: none;
	border: none;
	color: #FFFFFF;
	font-size: 22px;
	cursor: pointer;
	line-height: 1;
	padding: 0 2px;
}

.wdc-close:hover,
.wdc-close:focus-visible {
	opacity: 0.7;
	outline: none;
}

/* ------------------------------------------------------------------ */
/*  Location buttons                                                   */
/*  Sfondo: #F2F2F2 → hover: teal chiaro con tinta 5BC5A7             */
/* ------------------------------------------------------------------ */

.wdc-popup-body {
	padding: 10px 12px;
}

.wdc-location-btn {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 12px 14px;
	margin-bottom: 6px;
	border-radius: 8px;
	background: #F2F2F2;
	color: #003C55;
	text-decoration: none;
	font-size: 15px;
	font-weight: 500;
	transition: background 0.15s ease, color 0.15s ease;
	box-sizing: border-box;
}

.wdc-location-btn:last-child {
	margin-bottom: 0;
}

.wdc-location-btn:hover,
.wdc-location-btn:focus-visible {
	background: #d6f2ed;
	text-decoration: none;
	color: #003C55;
	outline: none;
}

.wdc-location-icon {
	font-size: 18px;
	flex-shrink: 0;
}

/* ------------------------------------------------------------------ */
/*  Tasto Chiamata (shortcode nella topbar)                            */
/* ------------------------------------------------------------------ */

.wdc-call-wrapper {
	position: relative;
	display: inline-block;
}

.wdc-call-trigger {
	cursor: pointer;
	background: none;
	border: none;
	color: inherit;
	font: inherit;
	padding: 0;
}

/* Popup chiamata */
.wdc-call-popup {
	position: absolute;
	top: 100%;
	left: 800%;
	transform: translateX(-50%) translateY(4px) scale(0.95);
	width: 280px;
	background: #FFFFFF;
	border-radius: 12px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
	z-index: 99999;
}

.wdc-call-popup[aria-hidden="false"] {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(4px) scale(1);
}

.wdc-call-popup-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px;
	background-color: #004d58;
	color: #FFFFFF;
	border-radius: 12px 12px 0 0;
	font-size: 15px;
	font-weight: 600;
}

.wdc-call-close {
	background: none;
	border: none;
	color: #FFFFFF;
	font-size: 22px;
	cursor: pointer;
	line-height: 1;
	padding: 0 2px;
}

.wdc-call-close:hover,
.wdc-call-close:focus-visible {
	opacity: 0.7;
	outline: none;
}

.wdc-call-popup-body {
	display: flex;
	flex-direction: column;
	padding: 10px 12px;
}

.wdc-call-option {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 14px;
	margin-bottom: 6px;
	border-radius: 8px;
	background: #F2F2F2;
	color: #003C55 !important;
	text-decoration: none;
	font-size: 15px;
	font-weight: 500;
	transition: background 0.15s ease, color 0.15s ease;
}

.wdc-call-option:last-child {
	margin-bottom: 0;
}

.wdc-call-option:hover,
.wdc-call-option:focus-visible {
	background: #d6f2ed;
	text-decoration: none;
	color: #003C55;
	outline: none;
}

.wdc-call-option-icon {
	font-size: 16px;
	flex-shrink: 0;
}

/* ------------------------------------------------------------------ */
/*  Responsive                                                         */
/* ------------------------------------------------------------------ */

@media screen and (max-width: 480px) {
	.wdc-wrapper {
		bottom: 16px;
	}

	.wdc-pos-right {
		right: 16px;
	}

	.wdc-pos-left {
		left: 16px;
	}

	.wdc-popup {
		width: 260px;
	}

	.wdc-call-popup{
		left: 400%;
	}
}
