/**
 * Elementor Custom Widget: kew-world-sourcing-network (International Sourcing Network)
 * Stylesheet with CSS Custom Properties, GPU-accelerated Animations, RTL & Accessibility
 *
 * @package Khalaf_Elementor_Addons_P2
 */

/* ==========================================================================
   1. Root Widget Container & CSS Variables Defaults
   ========================================================================== */
.kew-wsn-wrapper {
	/* Colors */
	--kew-wsn-bg-color: #061527;
	--kew-wsn-text-color: #ffffff;
	--kew-wsn-kicker-color: #30bfc2;
	--kew-wsn-kicker-line-color: #d4af37;
	--kew-wsn-heading-color: #ffffff;
	--kew-wsn-highlight-color: #30bfc2;
	--kew-wsn-intro-color: #9cb0c9;
	--kew-wsn-closing-color: #8da4c0;
	--kew-wsn-divider-color: rgba(255, 255, 255, 0.12);

	/* Hub Defaults */
	--kew-wsn-hub-bg: #30bfc2;
	--kew-wsn-hub-text: #051423;
	--kew-wsn-hub-glow: rgba(48, 191, 194, 0.45);
	--kew-wsn-hub-size: 72px;

	/* Markers Defaults */
	--kew-wsn-marker-color: #d4af37;
	--kew-wsn-marker-pulse-color: rgba(212, 175, 55, 0.6);
	--kew-wsn-marker-size: 14px;
	--kew-wsn-pulse-speed: 2.4s;

	/* Arcs Defaults */
	--kew-wsn-arc-color: rgba(212, 175, 55, 0.35);
	--kew-wsn-arc-width: 1.5px;
	--kew-wsn-arc-speed: 4s;

	/* Chips Defaults */
	--kew-wsn-chip-default-text: #e1ebf5;
	--kew-wsn-chip-default-border: rgba(255, 255, 255, 0.28);
	--kew-wsn-chip-default-bg: rgba(255, 255, 255, 0.04);
	--kew-wsn-chip-accent-text: #f0cb67;
	--kew-wsn-chip-accent-border: rgba(212, 175, 55, 0.65);
	--kew-wsn-chip-accent-bg: rgba(212, 175, 55, 0.08);

	/* Map Defaults */
	--kew-wsn-map-bg-color: transparent;
	--kew-wsn-map-color: #2d306d;
	--kew-wsn-map-opacity: 1;
	--kew-wsn-map-height: 520px;

	/* Tooltip Defaults */
	--kew-wsn-tooltip-bg: #0d2238;
	--kew-wsn-tooltip-text: #ffffff;
	--kew-wsn-tooltip-border: rgba(48, 191, 194, 0.4);
	--kew-wsn-tooltip-z-index: 99999;

	position: relative;
	width: 100%;
	box-sizing: border-box;
	overflow: hidden;
	background: var(--kew-wsn-bg, radial-gradient(ellipse at 35% 50%, #0d2747 0%, #061527 65%, #030c17 100%));
	color: var(--kew-wsn-text-color);
	font-family: inherit;
}

.kew-wsn-wrapper *,
.kew-wsn-wrapper *::before,
.kew-wsn-wrapper *::after {
	box-sizing: border-box;
}

/* Background Overlay */
.kew-wsn-overlay {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 1;
}

/* Main Two-Column Flex Container */
.kew-wsn-container {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	max-width: 1320px;
	margin: 0 auto;
	padding: 60px 30px;
	gap: 48px;
}

/* Columns */
.kew-wsn-col-map {
	position: relative;
	flex: 1 1 50%;
	min-width: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.kew-wsn-col-content {
	position: relative;
	flex: 1 1 50%;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

/* Reversed Columns modifier */
.kew-wsn-wrapper.kew-wsn-layout--map-right .kew-wsn-container {
	flex-direction: row-reverse;
}

/* ==========================================================================
   2. Map Viewport & Interactive Layers
   ========================================================================== */
.kew-wsn-map-viewport {
	position: relative;
	width: 100%;
	height: var(--kew-wsn-map-height);
	max-height: 80vh;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: visible;
	user-select: none;
	perspective: 1000px;
}

.kew-wsn-map-canvas {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	transform-style: preserve-3d;
	transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1);
}

/* Background Map Graphic */
.kew-wsn-map-image-wrapper {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	opacity: var(--kew-wsn-map-opacity, 1);
	background-color: var(--kew-wsn-map-bg-color, transparent);
	color: var(--kew-wsn-map-color, #2d306d);
	border-radius: var(--kew-wsn-map-border-radius, 12px);
	overflow: hidden;
	transition: background-color 0.3s ease, opacity 0.3s ease;
}

.kew-wsn-map-image-wrapper img,
.kew-wsn-map-image-wrapper svg {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.kew-wsn-world-svg {
	fill: currentColor;
	color: inherit;
}

.kew-wsn-map-bg {
	fill: var(--kew-wsn-map-bg-color, transparent);
	transition: fill 0.3s ease;
}

.kew-wsn-map-continents {
	fill: var(--kew-wsn-map-color, #2d306d);
	transition: fill 0.3s ease;
}

/* Concentric Radar Rings around Hub */
.kew-wsn-orbit-rings {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 2;
}

.kew-wsn-orbit-ring {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	border: 1px solid var(--kew-wsn-orbit-color, rgba(48, 191, 194, 0.16));
	pointer-events: none;
	transition: border-color 0.3s ease;
}

.kew-wsn-orbit-ring--1 { width: 150px; height: 150px; }
.kew-wsn-orbit-ring--2 { width: 280px; height: 280px; }
.kew-wsn-orbit-ring--3 { width: 420px; height: 420px; }
.kew-wsn-orbit-ring--4 { width: 560px; height: 560px; }

/* SVG Arcs Overlay */
.kew-wsn-arcs-svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 3;
	overflow: visible;
}

.kew-wsn-arc-path {
	fill: none;
	stroke: var(--kew-wsn-arc-color);
	stroke-width: var(--kew-wsn-arc-width);
	stroke-linecap: round;
	stroke-dasharray: 6 6;
	animation: kew-wsn-dash-flow var(--kew-wsn-arc-speed) linear infinite;
	opacity: 0.7;
	transition: stroke 0.3s, opacity 0.3s;
}

.kew-wsn-arc-path.kew-wsn-arc--static {
	stroke-dasharray: none;
	animation: none;
}

.kew-wsn-arc-path.kew-wsn-arc--draw-in {
	stroke-dasharray: 1000;
	stroke-dashoffset: 1000;
	animation: kew-wsn-draw-in 2.5s ease-out forwards;
}

.kew-wsn-arc-path.is-active {
	stroke: var(--kew-wsn-highlight-color);
	opacity: 1;
	filter: drop-shadow(0 0 4px var(--kew-wsn-highlight-color));
}

@keyframes kew-wsn-dash-flow {
	from {
		stroke-dashoffset: 48;
	}
	to {
		stroke-dashoffset: 0;
	}
}

@keyframes kew-wsn-draw-in {
	to {
		stroke-dashoffset: 0;
	}
}

/* ==========================================================================
   3. Hub (Central Node - Kuwait)
   ========================================================================== */
.kew-wsn-hub {
	position: absolute;
	transform: translate(-50%, -50%);
	z-index: 6;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: default;
}

.kew-wsn-hub-pulse-ring {
	position: absolute;
	inset: -14px;
	border-radius: 50%;
	border: 2px solid var(--kew-wsn-hub-glow);
	animation: kew-wsn-hub-wave 3s cubic-bezier(0.2, 0.8, 0.4, 1) infinite;
	pointer-events: none;
}

.kew-wsn-hub-pulse-ring--second {
	animation-delay: 1.5s;
}

.kew-wsn-hub-inner {
	position: relative;
	width: var(--kew-wsn-hub-size);
	height: var(--kew-wsn-hub-size);
	border-radius: 50%;
	background: var(--kew-wsn-hub-bg);
	color: var(--kew-wsn-hub-text);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 14px;
	letter-spacing: 0.5px;
	box-shadow: 0 0 28px var(--kew-wsn-hub-glow), inset 0 0 12px rgba(255, 255, 255, 0.35);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	z-index: 2;
}

.kew-wsn-hub:hover .kew-wsn-hub-inner {
	transform: scale(1.08);
	box-shadow: 0 0 38px var(--kew-wsn-hub-glow), inset 0 0 16px rgba(255, 255, 255, 0.5);
}

@keyframes kew-wsn-hub-wave {
	0% {
		transform: scale(0.9);
		opacity: 0.9;
	}
	100% {
		transform: scale(2.2);
		opacity: 0;
	}
}

/* ==========================================================================
   4. Markers & Pulsing Pins
   ========================================================================== */
.kew-wsn-markers-layer {
	position: absolute;
	inset: 0;
	z-index: 5;
	pointer-events: none;
}

/* Entrance animation state */
.kew-wsn-wrapper.kew-wsn-js-ready:not(.is-visible) .kew-wsn-marker {
	opacity: 0;
	transform: translate(-50%, -50%) scale(0.3);
}

.kew-wsn-wrapper.kew-wsn-js-ready:not(.is-visible) .kew-wsn-arc-path {
	opacity: 0;
}

.kew-wsn-wrapper.is-visible .kew-wsn-marker {
	opacity: 1;
	transform: translate(-50%, -50%) scale(1);
	transition: opacity 0.5s cubic-bezier(0.2, 0.8, 0.3, 1), transform 0.5s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.kew-wsn-wrapper.is-visible .kew-wsn-arc-path {
	opacity: 1;
	transition: opacity 0.6s ease;
}

.kew-wsn-marker {
	position: absolute;
	transform: translate(-50%, -50%);
	pointer-events: auto;
	cursor: pointer;
	outline: none;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.25s ease;
	z-index: 10;
}

.kew-wsn-marker:hover,
.kew-wsn-marker:focus,
.kew-wsn-marker.is-active {
	z-index: var(--kew-wsn-tooltip-z-index, 99999) !important;
}

.kew-wsn-marker:focus-visible {
	outline: 2px solid var(--kew-wsn-highlight-color);
	outline-offset: 4px;
	border-radius: 50%;
}

.kew-wsn-marker-pulse {
	position: absolute;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background: var(--marker-pulse-color, var(--kew-wsn-marker-pulse-color));
	pointer-events: none;
	animation: kew-wsn-pulse var(--marker-pulse-speed, var(--kew-wsn-pulse-speed)) cubic-bezier(0.2, 0.7, 0.4, 1) infinite;
	animation-delay: var(--marker-pulse-delay, 0s);
	opacity: 0;
}

.kew-wsn-marker-pulse--2 {
	animation-delay: calc(var(--marker-pulse-delay, 0s) + 0.8s);
}

.kew-wsn-marker-pulse--3 {
	animation-delay: calc(var(--marker-pulse-delay, 0s) + 1.6s);
}

.kew-wsn-marker-dot {
	position: relative;
	width: var(--marker-size, var(--kew-wsn-marker-size));
	height: var(--marker-size, var(--kew-wsn-marker-size));
	border-radius: 50%;
	background: var(--marker-color, var(--kew-wsn-marker-color));
	box-shadow: 0 0 10px var(--marker-color, var(--kew-wsn-marker-color));
	transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #061527;
	font-size: 10px;
}

.kew-wsn-marker:hover .kew-wsn-marker-dot,
.kew-wsn-marker.is-active .kew-wsn-marker-dot {
	transform: scale(1.45);
	box-shadow: 0 0 18px var(--marker-color, var(--kew-wsn-marker-color)), 0 0 8px #ffffff;
}

.kew-wsn-marker-dot svg,
.kew-wsn-marker-dot i {
	width: 65%;
	height: 65%;
	display: block;
}

/* Permanent Label Option */
.kew-wsn-marker-label {
	position: absolute;
	white-space: nowrap;
	font-size: 11px;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.85);
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
	pointer-events: none;
	transition: opacity 0.2s, transform 0.2s;
}

.kew-wsn-marker-label--top    { bottom: 100%; margin-bottom: 6px; }
.kew-wsn-marker-label--bottom { top: 100%; margin-top: 6px; }
.kew-wsn-marker-label--right  { left: 100%; margin-left: 8px; }
.kew-wsn-marker-label--left   { right: 100%; margin-right: 8px; }

@keyframes kew-wsn-pulse {
	0% {
		transform: scale(0.9);
		opacity: 0.85;
	}
	60% {
		opacity: 0.3;
	}
	100% {
		transform: scale(3.2);
		opacity: 0;
	}
}

/* ==========================================================================
   5. Interactive Tooltip
   ========================================================================== */
.kew-wsn-tooltip {
	position: absolute;
	bottom: calc(100% + 12px);
	left: 50%;
	transform: translateX(-50%) translateY(6px) scale(0.95);
	background: var(--kew-wsn-tooltip-bg);
	color: var(--kew-wsn-tooltip-text);
	border: 1px solid var(--kew-wsn-tooltip-border);
	padding: 8px 14px;
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	white-space: normal;
	min-width: 120px;
	max-width: 240px;
	text-align: center;
	z-index: var(--kew-wsn-tooltip-z-index, 99999) !important;
	transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.2, 0.8, 0.4, 1), visibility 0.2s;
}

.kew-wsn-tooltip::after {
	content: '';
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	border-width: 6px;
	border-style: solid;
	border-color: var(--kew-wsn-tooltip-border) transparent transparent transparent;
}

.kew-wsn-marker:hover .kew-wsn-tooltip,
.kew-wsn-marker:focus .kew-wsn-tooltip,
.kew-wsn-marker.is-active .kew-wsn-tooltip {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(0) scale(1);
}

.kew-wsn-tooltip-title {
	font-size: 13px;
	font-weight: 700;
	color: #ffffff;
	margin: 0;
	line-height: 1.3;
}

.kew-wsn-tooltip-desc {
	font-size: 11px;
	color: var(--kew-wsn-intro-color);
	margin-top: 4px;
	line-height: 1.4;
}

/* ==========================================================================
   6. Content Column (Kicker, Title, Intro, Chips, Divider, Closing)
   ========================================================================== */
/* Kicker */
.kew-wsn-kicker {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 20px;
}

.kew-wsn-kicker-line {
	display: inline-block;
	width: var(--kew-wsn-kicker-line-width, 32px);
	height: var(--kew-wsn-kicker-line-height, 2px);
	background-color: var(--kew-wsn-kicker-line-color);
	border-radius: 2px;
}

.kew-wsn-kicker-text {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--kew-wsn-kicker-color);
}

/* Heading H2 */
.kew-wsn-heading {
	margin: 0 0 22px 0;
	font-size: 38px;
	line-height: 1.25;
	font-weight: 700;
	color: var(--kew-wsn-heading-color);
}

.kew-wsn-heading-highlight {
	color: var(--kew-wsn-highlight-color);
	transition: color 0.3s ease;
}

/* Paragraphs */
.kew-wsn-intro {
	margin: 0 0 28px 0;
	font-size: 15px;
	line-height: 1.65;
	color: var(--kew-wsn-intro-color);
	max-width: 580px;
}

/* Chips / Pills */
.kew-wsn-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 32px 0;
	padding: 0;
	list-style: none;
}

.kew-wsn-chip-item {
	display: inline-flex;
}

.kew-wsn-chip {
	display: inline-flex;
	align-items: center;
	padding: 7px 18px;
	border-radius: 9999px;
	font-size: 13.5px;
	font-weight: 500;
	text-decoration: none;
	line-height: 1.2;
	transition: all 0.25s cubic-bezier(0.2, 0.8, 0.4, 1);
	border-width: 1px;
	border-style: solid;
	cursor: default;
}

a.kew-wsn-chip {
	cursor: pointer;
}

/* Chip Styles: Default vs Accent */
.kew-wsn-chip--default {
	color: var(--kew-wsn-chip-default-text);
	border-color: var(--kew-wsn-chip-default-border);
	background-color: var(--kew-wsn-chip-default-bg);
}

.kew-wsn-chip--default:hover {
	border-color: #ffffff;
	background-color: rgba(255, 255, 255, 0.12);
	color: #ffffff;
	transform: translateY(-2px);
}

.kew-wsn-chip--accent {
	color: var(--kew-wsn-chip-accent-text);
	border-color: var(--kew-wsn-chip-accent-border);
	background-color: var(--kew-wsn-chip-accent-bg);
}

.kew-wsn-chip--accent:hover {
	border-color: #fce39e;
	background-color: rgba(212, 175, 55, 0.18);
	color: #ffffff;
	transform: translateY(-2px);
	box-shadow: 0 4px 14px rgba(212, 175, 55, 0.2);
}

/* Active linked chip */
.kew-wsn-chip.is-active {
	border-color: var(--kew-wsn-highlight-color);
	color: var(--kew-wsn-highlight-color);
	background-color: rgba(48, 191, 194, 0.12);
}

/* Thin Divider Line */
.kew-wsn-divider {
	width: 100%;
	height: var(--kew-wsn-divider-height, 1px);
	background-color: var(--kew-wsn-divider-color);
	margin: 0 0 24px 0;
	border: none;
}

/* Closing Paragraph */
.kew-wsn-closing {
	margin: 0;
	font-size: 13.5px;
	line-height: 1.6;
	color: var(--kew-wsn-closing-color);
	max-width: 580px;
}

/* ==========================================================================
   7. RTL Support
   ========================================================================== */
[dir="rtl"] .kew-wsn-wrapper,
.rtl .kew-wsn-wrapper {
	text-align: right;
}

[dir="rtl"] .kew-wsn-kicker,
.rtl .kew-wsn-kicker {
	flex-direction: row;
}

[dir="rtl"] .kew-wsn-chips,
.rtl .kew-wsn-chips {
	justify-content: flex-start;
}

/* ==========================================================================
   8. Responsive Breakpoints
   ========================================================================== */
/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
	.kew-wsn-container {
		padding: 50px 24px;
		gap: 36px;
	}

	.kew-wsn-heading {
		font-size: 30px;
	}

	.kew-wsn-map-viewport {
		height: 420px;
	}
}

/* Mobile (max-width: 767px) */
@media (max-width: 767px) {
	.kew-wsn-container {
		flex-direction: column !important;
		padding: 40px 16px;
		gap: 36px;
	}

	.kew-wsn-wrapper.kew-wsn-mobile-order--content-first .kew-wsn-container {
		flex-direction: column-reverse !important;
	}

	.kew-wsn-col-map,
	.kew-wsn-col-content {
		flex: 1 1 100%;
		width: 100%;
	}

	.kew-wsn-map-viewport {
		height: 340px;
		max-height: 50vh;
	}

	.kew-wsn-heading {
		font-size: 25px;
		line-height: 1.3;
	}

	.kew-wsn-intro {
		font-size: 14px;
	}

	.kew-wsn-chip {
		font-size: 12.5px;
		padding: 6px 14px;
	}

	.kew-wsn-closing {
		font-size: 12.5px;
	}

	.kew-wsn-orbit-ring--3,
	.kew-wsn-orbit-ring--4 {
		display: none;
	}
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
	.kew-wsn-map-viewport {
		height: 280px;
	}

	.kew-wsn-hub-inner {
		width: calc(var(--kew-wsn-hub-size) * 0.85);
		height: calc(var(--kew-wsn-hub-size) * 0.85);
		font-size: 12px;
	}
}

/* ==========================================================================
   9. Accessibility: Reduced Motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
	.kew-wsn-marker-pulse,
	.kew-wsn-hub-pulse-ring,
	.kew-wsn-arc-path {
		animation: none !important;
	}

	.kew-wsn-marker-pulse {
		display: none;
	}

	.kew-wsn-arc-path {
		stroke-dasharray: none;
	}

	.kew-wsn-map-canvas {
		transition: none !important;
	}
}
