/**
 * FCSA Workflow Overview Diagram Styles
 *
 * Visual overview of the decision tree with interactive nodes,
 * connectors, zoom controls, and tooltips.
 *
 * @package FCSA_End_Client_Workflow
 * @since 1.0.0
 */

/* Container */
.fcsa-overview {
	max-width: 1200px;
	margin: 0 auto;
	padding: 32px;
	font-family: var(--fcsa-font);
}

/* Header */
.fcsa-overview__header {
	text-align: center;
	margin-bottom: 24px;
}

.fcsa-overview__logo {
	max-width: 120px;
	height: auto;
	margin-bottom: 16px;
}

.fcsa-overview__title {
	font-size: 28px;
	font-weight: 700;
	color: var(--fcsa-grey);
	margin: 0 0 8px 0;
}

.fcsa-overview__subtitle {
	font-size: 14px;
	color: #666;
	margin: 0;
	font-weight: 400;
}

/* Zoom Controls */
.fcsa-overview__controls {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin: 16px 0;
}

.fcsa-overview__zoom-btn {
	width: 40px;
	height: 40px;
	border: 2px solid #ddd;
	border-radius: var(--fcsa-radius);
	background: white;
	font-size: 18px;
	cursor: pointer;
	font-family: var(--fcsa-font);
	font-weight: 700;
	color: var(--fcsa-grey);
	transition: var(--fcsa-transition);
}

.fcsa-overview__zoom-btn[data-zoom="reset"] {
	width: auto;
	padding: 0 16px;
	font-size: 14px;
}

.fcsa-overview__zoom-btn:hover {
	border-color: var(--fcsa-orange);
	color: var(--fcsa-orange);
}

.fcsa-overview__zoom-btn:focus {
	outline: 2px solid var(--fcsa-orange);
	outline-offset: 2px;
}

/* Viewport */
.fcsa-overview__viewport {
	overflow: auto;
	border: 1px solid #eee;
	border-radius: var(--fcsa-radius);
	background: #fafafa;
	position: relative;
	min-height: 500px;
	max-height: 80vh;
}

/* Canvas */
.fcsa-overview__canvas {
	position: relative;
	transform-origin: 0 0;
	transition: transform 0.3s ease;
}

/* SVG Connectors */
.fcsa-overview__connectors {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 1;
}

.fcsa-overview__connectors path {
	stroke: #999;
	stroke-width: 2;
	fill: none;
}

.fcsa-overview__connectors text {
	font-size: 12px;
	font-family: var(--fcsa-font);
	fill: #666;
	font-weight: 600;
}

/* Nodes */
.fcsa-overview__node {
	position: absolute;
	z-index: 2;
	background: white;
	border-radius: var(--fcsa-radius);
	box-shadow: var(--fcsa-shadow);
	padding: 12px 16px;
	min-width: 180px;
	max-width: 220px;
	text-align: center;
	font-size: 13px;
	font-weight: 600;
	color: var(--fcsa-grey);
	cursor: pointer;
	transition: all 0.2s ease;
	border-top: 3px solid transparent;
}

.fcsa-overview__node:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.fcsa-overview__node:focus {
	outline: 2px solid var(--fcsa-orange);
	outline-offset: 2px;
}

/* Question Nodes */
.fcsa-overview__node--question {
	border-top-color: var(--fcsa-orange);
}

/* Result Nodes */
.fcsa-overview__node--green,
.fcsa-overview__node--amber,
.fcsa-overview__node--red {
	border-top: none;
	border-left: 4px solid;
}

.fcsa-overview__node--green {
	border-left-color: var(--fcsa-green);
}

.fcsa-overview__node--amber {
	border-left-color: var(--fcsa-amber);
}

.fcsa-overview__node--red {
	border-left-color: var(--fcsa-red);
}

/* Tooltip */
.fcsa-overview__tooltip {
	position: fixed;
	z-index: 1000;
	background: var(--fcsa-grey);
	color: white;
	padding: 16px 20px;
	border-radius: var(--fcsa-radius);
	max-width: 320px;
	font-size: 14px;
	line-height: 1.5;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.2s;
}

.fcsa-overview__tooltip--visible {
	opacity: 1;
}

.fcsa-overview__tooltip strong {
	display: block;
	margin-bottom: 8px;
	font-size: 15px;
	color: var(--fcsa-orange);
}

.fcsa-overview__tooltip .severity-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	margin-bottom: 8px;
}

.fcsa-overview__tooltip .severity-badge--green {
	background: var(--fcsa-green);
	color: white;
}

.fcsa-overview__tooltip .severity-badge--amber {
	background: var(--fcsa-amber);
	color: white;
}

.fcsa-overview__tooltip .severity-badge--red {
	background: var(--fcsa-red);
	color: white;
}

/* Fullscreen */
.fcsa-overview__fullscreen-btn {
	margin-left: 8px;
}

.fcsa-overview:fullscreen,
.fcsa-overview:-webkit-full-screen {
	background: #fafafa;
	padding: 16px;
	display: flex;
	flex-direction: column;
}

.fcsa-overview:fullscreen .fcsa-overview__header,
.fcsa-overview:-webkit-full-screen .fcsa-overview__header {
	flex-shrink: 0;
}

.fcsa-overview:fullscreen .fcsa-overview__controls,
.fcsa-overview:-webkit-full-screen .fcsa-overview__controls {
	flex-shrink: 0;
}

.fcsa-overview:fullscreen .fcsa-overview__viewport,
.fcsa-overview:-webkit-full-screen .fcsa-overview__viewport {
	flex: 1;
	max-height: none;
	min-height: 0;
}

/* Mobile List */
.fcsa-overview__mobile-list {
	display: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
	.fcsa-overview {
		padding: 16px;
	}

	.fcsa-overview__viewport,
	.fcsa-overview__controls {
		display: none;
	}

	.fcsa-overview__mobile-list {
		display: block;
	}

	.fcsa-overview__mobile-node {
		margin-bottom: 12px;
		padding: 16px;
		border-radius: var(--fcsa-radius);
		box-shadow: var(--fcsa-shadow);
		background: white;
		font-size: 14px;
		line-height: 1.6;
	}

	.fcsa-overview__mobile-node--question {
		border-left: 3px solid var(--fcsa-orange);
	}

	.fcsa-overview__mobile-node--green {
		border-left: 3px solid var(--fcsa-green);
	}

	.fcsa-overview__mobile-node--amber {
		border-left: 3px solid var(--fcsa-amber);
	}

	.fcsa-overview__mobile-node--red {
		border-left: 3px solid var(--fcsa-red);
	}

	.fcsa-overview__mobile-node strong {
		display: block;
		margin-bottom: 8px;
		color: var(--fcsa-grey);
		font-size: 15px;
	}

	.fcsa-overview__mobile-node .node-options {
		margin-top: 8px;
		font-size: 13px;
		color: #666;
	}

	.fcsa-overview__mobile-node .node-body {
		margin-top: 8px;
		font-size: 13px;
		color: #666;
		font-weight: 400;
	}
}
