/**
 * BubblaV Chat Widget - Admin Styles
 *
 * @package BubblaV_Chat
 */

/* CSS Variables - Matching Dashboard Design System */
:root {
	--bv-bg-primary: #ffffff;
	--bv-bg-secondary: rgb(250, 250, 250);
	--bv-bg-tertiary: rgb(245, 245, 245);
	--bv-text-primary: rgb(17, 24, 39);
	--bv-text-secondary: rgb(107, 114, 128);
	--bv-text-muted: rgb(156, 163, 175);
	--bv-border-color: rgb(229, 231, 235);
	--bv-border-color-light: rgb(243, 244, 246);
	--bv-primary-color: rgb(64, 64, 64);
	--bv-primary-hover: rgb(80, 80, 80);
	--bv-primary-light: rgb(250, 250, 250);
	--bv-blue-accent: #3b82f6;
	--bv-green-bg: rgb(239, 246, 255);
	--bv-green-text: rgb(34, 197, 94);
	--bv-green-bg-subtle: rgb(239, 253, 235);
	--bv-green-border: rgb(220, 252, 220);
	--bv-red-text: rgb(239, 68, 68);
	--bv-red-bg: rgb(254, 242, 242);
	--bv-red-border: rgb(254, 226, 226);
	--bv-blue-bg: rgb(239, 246, 255);
	--bv-blue-text: rgb(59, 130, 246);
	--bv-blue-border: rgb(219, 234, 254);
	--bv-radius-sm: 6px;
	--bv-radius-md: 8px;
	--bv-radius-lg: 12px;
	--bv-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
	--bv-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

/* Base Styles */
.bubblav-settings-wrap {
	max-width: 700px;
	margin: 0;
}

/* Header with Logo */
.bubblav-header {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 24px;
}

.bubblav-logo-img {
	width: 48px;
	height: 48px;
	border-radius: 8px;
	object-fit: contain;
}

.bubblav-header h1 {
	margin: 0;
	font-size: 24px;
	font-weight: 700;
	color: var(--bv-text-primary);
}

/* Layout Containers */
.bubblav-connected,
.bubblav-disconnected {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* Card Base Styles */
.bubblav-card {
	background: var(--bv-bg-primary);
	border: 1px solid var(--bv-border-color);
	border-radius: var(--bv-radius-lg);
	padding: 24px;
	box-shadow: var(--bv-shadow-sm);
}

/* Success Card (Connected State) */
.bubblav-card-success {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	background: var(--bv-green-bg-subtle);
	border-color: var(--bv-green-border);
}

.bubblav-status-icon-success {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--bv-green-bg-subtle);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	color: var(--bv-green-text);
}

.bubblav-status-icon-success svg {
	width: 24px;
	height: 24px;
}

.bubblav-status-content h2 {
	margin: 0 0 4px 0;
	font-size: 18px;
	font-weight: 600;
	color: var(--bv-text-primary);
}

.bubblav-status-content p {
	margin: 0;
	font-size: 14px;
	color: var(--bv-text-secondary);
	line-height: 1.5;
}

.bubblav-website-id {
	margin-top: 12px;
	font-size: 13px;
	color: var(--bv-text-secondary);
}

.bubblav-website-id code {
	background: var(--bv-bg-tertiary);
	padding: 3px 8px;
	border-radius: var(--bv-radius-sm);
	font-family: 'SF Mono', Monaco, Consolas, 'Courier New', monospace;
	font-size: 12px;
	color: var(--bv-text-primary);
}

/* Info Card (Site Information) */
.bubblav-card-info h3 {
	margin: 0 0 16px 0;
	font-size: 16px;
	font-weight: 600;
	color: var(--bv-text-primary);
}

.bubblav-info-table {
	width: 100%;
	border-collapse: collapse;
}

.bubblav-info-table th {
	text-align: left;
	padding: 12px 0;
	border-bottom: 1px solid var(--bv-border-color-light);
	color: var(--bv-text-secondary);
	font-weight: 500;
	font-size: 14px;
	width: 40%;
}

.bubblav-info-table td {
	padding: 12px 0;
	border-bottom: 1px solid var(--bv-border-color-light);
	font-size: 14px;
	color: var(--bv-text-primary);
}

.bubblav-info-table tr:last-child th,
.bubblav-info-table tr:last-child td {
	border-bottom: none;
}

/* Badge Styles */
.bubblav-badge {
	display: inline-flex;
	align-items: center;
	padding: 4px 10px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.01em;
}

.bubblav-badge-success {
	background: var(--bv-green-bg-subtle);
	color: var(--bv-green-text);
}

.bubblav-badge-neutral {
	background: var(--bv-bg-tertiary);
	color: var(--bv-text-secondary);
}

.bubblav-badge-desc {
	margin-left: 8px;
	font-size: 13px;
	color: var(--bv-text-secondary);
	font-weight: 400;
}

/* Actions */
.bubblav-actions {
	display: flex;
	gap: 12px;
	align-items: center;
	flex-wrap: wrap;
}

/* Button Base Styles - Matching Dashboard */
.bubblav-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 40px;
	padding: 0 16px;
	font-size: 14px;
	font-weight: 500;
	border-radius: var(--bv-radius-sm);
	border: 1px solid transparent;
	cursor: pointer;
	transition: background-color 150ms ease, border-color 150ms ease, transform 100ms ease;
	text-decoration: none;
	white-space: nowrap;
	outline: none;
	box-shadow: none;
}

.bubblav-btn:focus-visible {
	outline: 2px solid var(--bv-blue-accent);
	outline-offset: 2px;
}

.bubblav-btn:hover,
.bubblav-btn:active,
.bubblav-btn:focus {
	box-shadow: none !important;
	outline: none !important;
}

.bubblav-btn svg {
	flex-shrink: 0;
}

/* Primary Button */
.bubblav-btn-primary {
	background: var(--bv-primary-color);
	color: #ffffff !important;
	border-color: var(--bv-primary-color);
}

.bubblav-btn-primary:hover,
.bubblav-btn-primary:focus,
.bubblav-btn-primary:active {
	color: #ffffff !important;
	background: var(--bv-primary-hover);
	border-color: var(--bv-primary-hover);
	box-shadow: none !important;
}

.bubblav-btn-primary:active {
	background: var(--bv-primary-color);
	transform: translateY(1px);
}

/* Large Primary Button */
.bubblav-btn-large {
	height: 44px;
	padding: 0 24px;
	font-size: 15px;
	font-weight: 600;
}

/* Secondary Button */
.bubblav-btn-secondary {
	background: var(--bv-primary-light);
	color: var(--bv-text-primary);
	border-color: var(--bv-border-color);
}

.bubblav-btn-secondary:hover {
	background: #ffffff;
	border-color: var(--bv-border-color);
	box-shadow: none !important;
}

.bubblav-btn-secondary:active {
	background: var(--bv-bg-tertiary);
	border-color: var(--bv-border-color);
	transform: translateY(1px);
	box-shadow: none !important;
}

/* Hero Section (Disconnected State) */
.bubblav-hero {
	text-align: center;
	padding: 32px 0 16px;
}

.bubblav-hero-logo {
	width: 80px;
	height: 80px;
	border-radius: var(--bv-radius-lg);
	margin-bottom: 24px;
	object-fit: contain;
}

.bubblav-hero h2 {
	font-size: 28px;
	margin: 0 0 12px 0;
	font-weight: 700;
	color: var(--bv-text-primary);
}

.bubblav-hero-description {
	font-size: 16px;
	color: var(--bv-text-secondary);
	max-width: 500px;
	margin: 0 auto;
	line-height: 1.6;
}

/* Connect Card */
.bubblav-card-connect {
	text-align: center;
	padding: 40px 32px;
}

.bubblav-card-connect > p {
	font-size: 15px;
	color: var(--bv-text-secondary);
	margin-bottom: 24px;
}

.bubblav-card-connect form {
	margin-bottom: 24px;
}

.bubblav-terms {
	font-size: 13px;
	color: var(--bv-text-muted);
	line-height: 1.5;
}

.bubblav-terms a {
	color: var(--bv-blue-accent);
	text-decoration: none;
}

.bubblav-terms a:hover {
	text-decoration: underline;
}

/* Notice Card (WooCommerce) */
.bubblav-card-notice {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	background: var(--bv-blue-bg);
	border-color: var(--bv-blue-border);
}

.bubblav-notice-icon {
	width: 32px;
	height: 32px;
	border-radius: var(--bv-radius-sm);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.bubblav-notice-icon-woo {
	background: #ffffff;
	color: var(--bv-blue-text);
}

.bubblav-notice-icon svg {
	width: 18px;
	height: 18px;
}

.bubblav-notice-content {
	flex: 1;
}

.bubblav-notice-content p {
	margin: 0;
	font-size: 14px;
	color: var(--bv-text-primary);
	line-height: 1.5;
}

/* Footer */
.bubblav-footer {
	margin-top: 40px;
	padding-top: 24px;
	border-top: 1px solid var(--bv-border-color-light);
	text-align: center;
}

.bubblav-footer p {
	font-size: 13px;
	color: var(--bv-text-muted);
	margin: 0;
	line-height: 1.6;
}

.bubblav-footer a {
	color: var(--bv-text-secondary);
	text-decoration: none;
	font-weight: 500;
}

.bubblav-footer a:hover {
	color: var(--bv-blue-accent);
	text-decoration: underline;
}

/* Responsive */
@media (max-width: 782px) {
	.bubblav-card-success {
		flex-direction: column;
		text-align: center;
	}

	.bubblav-info-table th,
	.bubblav-info-table td {
		display: block;
		width: 100%;
		padding: 8px 0;
	}

	.bubblav-info-table th {
		padding-bottom: 2px;
		color: var(--bv-text-muted);
		font-size: 12px;
	}

	.bubblav-actions {
		flex-direction: column;
		align-items: stretch;
	}

	.bubblav-btn {
		width: 100%;
		justify-content: center;
	}

	.bubblav-hero {
		padding: 24px 0 8px;
	}

	.bubblav-hero-logo {
		width: 64px;
		height: 64px;
	}

	.bubblav-hero h2 {
		font-size: 22px;
	}

	.bubblav-hero-description {
		font-size: 14px;
	}

	.bubblav-card-connect {
		padding: 32px 24px;
	}

	.bubblav-badge-desc {
		display: block;
		margin-left: 0;
		margin-top: 4px;
	}
}
