/**
 * Admin styles for Solutiontech Chat
 *
 * @package Solutiontech_Chat
 */

.st-wa-admin-wrap {
	max-width: 1320px;
	margin: 20px 20px 0 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	box-sizing: border-box;
}

.st-wa-admin-wrap * {
	box-sizing: border-box;
}

/* Header */
.st-wa-header {
	background: #ffffff;
	border: 1px solid #c3c4c7;
	border-radius: 8px;
	padding: 18px 24px;
	margin-bottom: 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.st-wa-header-brand {
	display: flex;
	align-items: center;
	gap: 16px;
}

.st-wa-logo-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	background: #25D366;
	color: #ffffff;
	border-radius: 12px;
	box-shadow: 0 2px 8px rgba(37, 211, 102, 0.35);
}

.st-wa-logo-icon svg {
	width: 26px;
	height: 26px;
}

.st-wa-header-text h1 {
	margin: 0;
	font-size: 20px;
	font-weight: 700;
	color: #1d2327;
	line-height: 1.2;
}

.st-wa-header-text p {
	margin: 4px 0 0;
	color: #646970;
	font-size: 13px;
}

.st-wa-header-badge span {
	display: inline-block;
	background: #f0f0f1;
	color: #50575e;
	padding: 4px 10px;
	border-radius: 12px;
	font-weight: 600;
	font-size: 12px;
}

/* Dashboard Layout (Zero Horizontal Scroll!) */
.st-wa-dashboard {
	display: flex;
	gap: 20px;
	align-items: flex-start;
}

/* 1. Left Vertical Navigation Sidebar */
.st-wa-nav-sidebar {
	width: 240px;
	flex-shrink: 0;
	background: #ffffff;
	border: 1px solid #c3c4c7;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.st-wa-nav-list {
	list-style: none;
	margin: 0;
	padding: 6px 0;
}

.st-wa-nav-list li {
	margin: 0;
}

.st-wa-nav-item {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 16px;
	border: none;
	background: transparent;
	text-align: left;
	font-size: 13px;
	font-weight: 600;
	color: #50575e;
	border-left: 3px solid transparent;
	cursor: pointer;
	transition: background-color 0.15s, color 0.15s, border-left-color 0.15s;
	text-decoration: none;
	line-height: 1.3;
}

.st-wa-nav-item:hover {
	background: #f6f7f7;
	color: #1d2327;
}

.st-wa-nav-item.active {
	background: #eefaf2;
	color: #075E54;
	border-left-color: #25D366;
	font-weight: 700;
}

.st-wa-nav-icon {
	font-size: 16px;
	width: 20px;
	display: inline-flex;
	justify-content: center;
	align-items: center;
	flex-shrink: 0;
}

.st-wa-nav-text {
	flex: 1;
	white-space: normal;
	word-break: break-word;
}

/* 2. Main Form Content Area */
.st-wa-content-area {
	flex: 1;
	min-width: 0;
}

.st-wa-form {
	background: #ffffff;
	border: 1px solid #c3c4c7;
	border-radius: 8px;
	padding: 24px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.st-wa-tab-content {
	display: none;
}

.st-wa-tab-content.active {
	display: block;
}

.st-wa-tab-content h2 {
	margin-top: 0;
	padding-bottom: 12px;
	border-bottom: 1px solid #f0f0f1;
	font-size: 18px;
	color: #1d2327;
}

.st-wa-tab-content h3 {
	font-size: 15px;
	margin: 24px 0 12px;
	color: #1d2327;
}

/* Form Rows */
.st-wa-field-row {
	display: flex;
	margin-bottom: 22px;
	align-items: flex-start;
}

.st-wa-label {
	width: 220px;
	font-weight: 600;
	font-size: 13px;
	color: #1d2327;
	padding-top: 6px;
	flex-shrink: 0;
}

.st-wa-field {
	flex: 1;
}

.st-wa-field input[type="text"],
.st-wa-field input[type="number"],
.st-wa-field input[type="time"],
.st-wa-field select,
.st-wa-field textarea {
	border-radius: 4px;
	border-color: #8c8f94;
}

.st-wa-field input[type="text"]:focus,
.st-wa-field input[type="number"]:focus,
.st-wa-field select:focus,
.st-wa-field textarea:focus {
	border-color: #25D366;
	box-shadow: 0 0 0 1px #25D366;
	outline: none;
}

.st-wa-divider {
	border: 0;
	border-top: 1px solid #f0f0f1;
	margin: 24px 0;
}

/* Switch Toggle */
.st-wa-switch {
	position: relative;
	display: inline-block;
	width: 44px;
	height: 24px;
	vertical-align: middle;
	margin-right: 8px;
}

.st-wa-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

.st-wa-slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #c3c4c7;
	transition: .25s;
	border-radius: 24px;
}

.st-wa-slider:before {
	position: absolute;
	content: "";
	height: 18px;
	width: 18px;
	left: 3px;
	bottom: 3px;
	background-color: white;
	transition: .25s;
	border-radius: 50%;
}

.st-wa-switch input:checked + .st-wa-slider {
	background-color: #25D366;
}

.st-wa-switch input:checked + .st-wa-slider:before {
	transform: translateX(20px);
}

/* Multi-Agent Cards */
.st-wa-agents-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 16px 0;
}

.st-wa-agent-card {
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	padding: 14px;
}

.st-wa-agent-row {
	display: flex;
	gap: 12px;
	align-items: flex-end;
}

.st-wa-agent-col {
	flex: 1;
	min-width: 0;
}

.st-wa-agent-col label {
	display: block;
	font-size: 11px;
	font-weight: 600;
	color: #50575e;
	margin-bottom: 4px;
	text-transform: uppercase;
}

.st-wa-agent-col input {
	width: 100%;
}

.st-wa-avatar-col {
	flex: 1.2;
}

.st-wa-avatar-input-wrap {
	display: flex;
	gap: 4px;
}

.st-wa-agent-col-action {
	flex-shrink: 0;
	padding-bottom: 2px;
}

.st-wa-remove-agent-btn {
	color: #d63638 !important;
	font-size: 18px !important;
	padding: 2px 8px !important;
	line-height: 1 !important;
	border: none !important;
	background: none !important;
	cursor: pointer;
}

.st-wa-remove-agent-btn:hover {
	color: #b32d2e !important;
}

.st-wa-add-agent-wrap {
	margin-top: 14px;
}

/* Working days checkboxes grid */
.st-wa-days-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.st-wa-day-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #f0f0f1;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	padding: 6px 12px;
	cursor: pointer;
	user-select: none;
	font-size: 13px;
	font-weight: 500;
}

.st-wa-day-item:hover {
	background: #e6e7e8;
}

.st-wa-day-item input[type="checkbox"] {
	margin: 0;
	accent-color: #25D366;
}

/* 3. Right Sidebar Cards */
.st-wa-right-sidebar {
	width: 290px;
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.st-wa-card {
	background: #ffffff;
	border: 1px solid #c3c4c7;
	border-radius: 8px;
	padding: 18px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.st-wa-card h3 {
	margin-top: 0;
	font-size: 15px;
	color: #1d2327;
}

.st-wa-preview-stage {
	background: #efeae2;
	background-image: radial-gradient(#d5cebe 1px, transparent 1px);
	background-size: 12px 12px;
	border-radius: 8px;
	padding: 26px 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 110px;
	margin-top: 10px;
}

.st-wa-preview-button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #25D366;
	color: #ffffff;
	padding: 10px 18px;
	border-radius: 24px;
	font-weight: 600;
	box-shadow: 0 4px 12px rgba(0,0,0,0.15);
	cursor: pointer;
	transition: background-color 0.2s;
}

.st-wa-preview-icon svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
	display: block;
}

/* Code box */
.st-wa-code-box {
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	padding: 12px 16px;
	margin: 12px 0;
	font-family: monospace;
	font-size: 13px;
	user-select: all;
}

.st-wa-submit-wrap {
	margin-top: 24px;
	padding-top: 16px;
	border-top: 1px solid #f0f0f1;
}

/* Responsive adjustments */
@media (max-width: 1100px) {
	.st-wa-dashboard {
		flex-direction: column;
	}
	.st-wa-nav-sidebar {
		width: 100%;
	}
	.st-wa-nav-list {
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
		gap: 4px;
		padding: 8px;
	}
	.st-wa-nav-item {
		border-left: none;
		border-radius: 6px;
		padding: 10px 12px;
	}
	.st-wa-nav-item.active {
		border-left: none;
		background: #25D366;
		color: #ffffff;
	}
	.st-wa-right-sidebar {
		width: 100%;
	}
}

@media (max-width: 768px) {
	.st-wa-field-row {
		flex-direction: column;
	}
	.st-wa-label {
		width: 100%;
		margin-bottom: 6px;
	}
	.st-wa-agent-row {
		flex-direction: column;
		align-items: stretch;
	}
}
