/**
 * Virtualcode Click to Chat Toggle Switch Styles
 * WordPress default design for toggle switches
 * 
 * @package Virtualcode_Click_To_Chat
 */

/* Toggle Label Container */
.toggle-label {
	display: inline-flex;
	align-items: center;
	cursor: pointer;
	user-select: none;
	position: relative;
}

/* Hide the actual checkbox */
.toggle-label input[type="checkbox"] {
	position: absolute;
	left: -9999px;
	opacity: 0;
}

/* Toggle Switch Track */
.toggle-switch {
	display: inline-block;
	width: 40px;
	height: 20px;
	background-color: #ccc;
	border-radius: 20px;
	position: relative;
	margin-right: 10px;
	transition: background-color 0.2s ease;
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Toggle Switch Handle */
.toggle-switch:before {
	content: '';
	position: absolute;
	width: 18px;
	height: 18px;
	background-color: #fff;
	border-radius: 50%;
	top: 1px;
	left: 1px;
	transition: transform 0.2s ease;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Checked State */
.toggle-label input[type="checkbox"]:checked + .toggle-switch {
	background-color: #2271b1; /* WordPress primary color */
}

.toggle-label input[type="checkbox"]:checked + .toggle-switch:before {
	transform: translateX(20px);
}

/* Focus State for Accessibility */
.toggle-label input[type="checkbox"]:focus + .toggle-switch {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
	box-shadow: 0 0 0 1px #fff, 0 0 0 3px #2271b1;
}

/* Hover State */
.toggle-label:hover .toggle-switch {
	filter: brightness(0.95);
}

/* Toggle Text */
.toggle-text {
	font-size: 13px;
	color: #1e1e1e;
	font-weight: 500;
	transition: color 0.2s ease;
}

/* Disabled State */
.toggle-label input[type="checkbox"]:disabled + .toggle-switch {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Responsive Design */
@media screen and (max-width: 782px) {
	.toggle-switch {
		width: 36px;
		height: 18px;
	}
	
	.toggle-switch:before {
		width: 16px;
		height: 16px;
	}
	
	.toggle-label input[type="checkbox"]:checked + .toggle-switch:before {
		transform: translateX(18px);
	}
}