/* Admin styles for VW Floating Chat settings. */

.vwfc-settings-wrap {
	max-width: 1140px;
}

.vwfc-settings-wrap .vwfc-settings-grid {
	display: flex;
	flex-direction: column;
	gap: 24px;
	margin-top: 24px;
}

.vwfc-settings-wrap .vwfc-grid-row {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 24px;
}

.vwfc-settings-wrap .vwfc-grid-row .vwfc-card {
	grid-column: span 2;
}

.vwfc-settings-wrap .vwfc-card {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	padding: 24px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.vwfc-settings-wrap .vwfc-card h2 {
	margin-top: 0;
	margin-bottom: 16px;
}

.vwfc-settings-wrap .vwfc-card h3 {
	margin-top: 24px;
	margin-bottom: 12px;
	font-size: 16px;
}

.vwfc-settings-wrap .vwfc-card table.form-table {
	margin-bottom: 0;
}

.vwfc-settings-wrap .vwfc-contact-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px;
}

.vwfc-settings-wrap .vwfc-channel {
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	padding: 16px;
	margin: 0;
	position: relative;
	overflow: hidden;
	opacity: 1;
	transition: all 0.25s ease;
}

.vwfc-settings-wrap .vwfc-channel::before {
	content: '';
	position: absolute;
	right: 10px;
	top: 10px;
	width: 60px;
	height: 60px;
	background-image: var(--channel-icon);
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	opacity: 0.5;
	pointer-events: none;
	z-index: 0;
	transition: opacity 0.25s ease;
}

.vwfc-settings-wrap .vwfc-channel:hover::before {
	opacity: 0.7;
}

.vwfc-settings-wrap .vwfc-channel-disabled {
	background: #e8e8e8;
	border-color: #d0d0d0;
}

.vwfc-settings-wrap .vwfc-channel-disabled::before {
	filter: grayscale(100%) opacity(0.5);
}

.vwfc-settings-wrap .vwfc-channel > * {
	position: relative;
	z-index: 1;
}

.vwfc-settings-wrap .vwfc-channel .regular-text {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.vwfc-sticky-header {
	position: sticky;
	top: 32px;
	z-index: 999;
	background: #edffff;
	border-bottom: 1px solid #dcdcde;
	padding: 15px 20px;
	margin: -24px 0 24px 0;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.vwfc-sticky-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
}

.vwfc-quick-toggles {
	display: flex;
	align-items: center;
	gap: 24px;
	flex-wrap: wrap;
}

.vwfc-quick-toggles label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 500;
	margin: 0;
	cursor: pointer;
}

.vwfc-quick-toggles input[type='checkbox'] {
	margin: 0;
}

.vwfc-preview {
	margin-top: 40px;
	padding: 20px;
	background-color: #f6f7f7;
	border: 1px solid #ccd0d4;
}

.vwfc-preview-widget {
	position: relative;
	width: 200px;
	padding: 16px;
	border-radius: 12px;
	background: #1d2327;
	color: #fff;
}

.vwfc-preview-handle {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 18px;
	height: 18px;
	background: #2c3338;
	border-radius: 3px;
}

.vwfc-preview-widget ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.vwfc-preview-widget li {
	margin-bottom: 8px;
	padding: 8px 12px;
	background: rgba(255, 255, 255, 0.12);
	border-radius: 6px;
}

.vwfc-preview-widget li:last-child {
	margin-bottom: 0;
}

@media (max-width: 1280px) {
	.vwfc-settings-wrap .vwfc-contact-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 960px) {
	.vwfc-settings-wrap .vwfc-grid-row {
		grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	}

	.vwfc-settings-wrap .vwfc-grid-row .vwfc-card {
		grid-column: span 1;
	}

	.vwfc-settings-wrap .vwfc-contact-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 782px) {
	.vwfc-settings-wrap .vwfc-card {
		padding: 20px;
	}
}

@media (max-width: 600px) {
	.vwfc-settings-wrap .vwfc-contact-grid {
		grid-template-columns: 1fr;
	}
}
