/**
 * Spyder (Het spinnenweb) Module Styling
 */

.seu-spyder {
	max-width: 1200px;
	margin: 2rem auto;
	padding: 2rem;
	background: #fff;
	position: relative;
}

/* Language Toggle */
.sswp-spk-lang-toggle {
    display: flex;
    justify-content: flex-end;
    gap: 0;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

.sswp-spk-lang-toggle::-webkit-scrollbar {
    height: 4px;
}

.sswp-spk-lang-toggle::-webkit-scrollbar-track {
    background: transparent;
}

.sswp-spk-lang-toggle::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 2px;
}

.sswp-spk-lang-toggle::-webkit-scrollbar-thumb:hover {
    background-color: #999;
}

.sswp-spk-lang-btn {
    background: transparent;
    border: none;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.sswp-spk-lang-btn:hover {
	color: #000;
}

.sswp-spk-lang-btn.active {
	color: #000;
	font-weight: 600;
}

.sswp-spk-lang-btn.active::after {
	content: '';
	position: absolute;
	bottom: -0.5rem;
	left: 0;
	right: 0;
	height: 2px;
	background: #000;
}

/* Header */
.seu-spyder-header {
	margin-bottom: 2rem;
}

.seu-spyder-title {
	font-size: 2rem;
	font-weight: 700;
	margin-bottom: 0.5rem;
	/* Remove hardcoded color - inherit from theme */
}

.seu-spyder-intro {
	font-size: 1rem;
	line-height: 1.6;
	margin: 0;
	/* Remove hardcoded color - inherit from theme */
}

/* Main Content Layout - Two Columns */
.seu-spyder-content {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 3rem;
	align-items: start;
	margin-bottom: 2rem;
}

@media (max-width: 768px) {
	.seu-spyder-content {
		grid-template-columns: 1fr;
		gap: 2rem;
	}
}

/* Left Panel */
.seu-spyder-left {
	position: relative;
}

/* Subject Card */
.seu-spyder-subject-card {
	background: #fff;
	border-radius: 8px;
	padding: 1.5rem;
	margin-bottom: 1.5rem;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.seu-spyder-subject-title {
	font-size: 1.25rem;
	font-weight: 700;
	margin-bottom: 1rem;
	/* Remove hardcoded color - inherit from theme */
}

.seu-spyder-subject-bullets {
	margin-bottom: 1rem;
	font-size: 0.95rem;
	line-height: 1.6;
	/* Remove hardcoded color - inherit from theme */
}

.seu-spyder-subject-bullets .bullet-item {
	display: inline;
}

.seu-spyder-subject-bullets .bullet-item:not(:last-child)::after {
	content: ' • ';
	margin: 0 0.25rem;
	/* Remove hardcoded color - inherit from theme */
}

/* Rating Section */
.seu-spyder-rating-label {
	font-size: 0.95rem;
	font-weight: 600;
	margin-bottom: 0.75rem;
	/* Remove hardcoded color - inherit from theme */
}

.seu-spyder-rating-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 0.5rem;
}

.seu-spyder-rating-pill {
	width: 40px;
	height: 32px;
	border-radius: 6px;
	border: 2px solid transparent;
	font-size: 0.9rem;
	font-weight: 600;
	color: #fff;
	cursor: pointer;
	transition: all 0.2s;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
}

.seu-spyder-rating-pill:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Active/Selected state with diagonal stripes - Same as Consultation/Questions */
.seu-spyder-rating-pill[aria-checked="true"],
.seu-spyder-rating-pill.active {
	border-width: 3px;
	border-color: #000;
	outline: 2px solid #000;
	outline-offset: 2px;
	font-weight: bold;
	position: relative;
}

.seu-spyder-rating-pill[aria-checked="true"]::after,
.seu-spyder-rating-pill.active::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-image: repeating-linear-gradient(
		45deg,
		transparent,
		transparent 4px,
		rgba(0, 0, 0, 0.15) 4px,
		rgba(0, 0, 0, 0.15) 8px
	);
	pointer-events: none;
	border-radius: 2px;
}

/* Rating pill colors (0-10) */
.seu-spyder-rating-pill[data-value="0"] { background-color: #8B0000; }
.seu-spyder-rating-pill[data-value="1"] { background-color: #B22222; }
.seu-spyder-rating-pill[data-value="2"] { background-color: #FF0000; }
.seu-spyder-rating-pill[data-value="3"] { background-color: #FF4500; }
.seu-spyder-rating-pill[data-value="4"] { background-color: #FFA500; }
.seu-spyder-rating-pill[data-value="5"] { background-color: #FFD700; }
.seu-spyder-rating-pill[data-value="6"] { background-color: #FFFF00; }
.seu-spyder-rating-pill[data-value="7"] { background-color: #ADFF2F; }
.seu-spyder-rating-pill[data-value="8"] { background-color: #7CFC00; }
.seu-spyder-rating-pill[data-value="9"] { background-color: #32CD32; }
.seu-spyder-rating-pill[data-value="10"] { background-color: #008000; }

/* Rating pills container */
.seu-spyder-rating-pills {
	position: relative;
}

/* Navigation Buttons - Use WordPress button classes for theme inheritance */
.seu-spyder-nav,
.sswp-spyder-actions {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-top: 1.5rem;
	align-items: center;
}

/* When only Next button exists (first step), align it to the right */
.sswp-spyder-actions.is-next-only {
	justify-content: flex-end;
}

/* Button Base Styles - Match Consultation module styling */
.seu-spyder .seu-spyder-btn.button,
.seu-spyder .seu-spyder-btn.button-primary,
.seu-spyder .seu-spyder-btn.button-secondary {
	/* Reset default WordPress button styles */
	appearance: none;
	-webkit-appearance: none;
	border: none;
	padding: 0.875rem 1.5rem;
	font-size: 1rem;
	font-weight: 500;
	border-radius: 7px;
	cursor: pointer;
	transition: all 0.15s ease;
	display: inline-block;
	text-align: center;
	text-decoration: none;
	line-height: 1.5;
	min-width: 120px;
	font-family: inherit;
	box-shadow: none;
}

/* Primary Button - Blue filled (same as Consultation) */
.seu-spyder .seu-spyder-btn.button-primary {
	background: #1E6BD6 !important;
	color: #fff !important;
	border: none !important;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.seu-spyder .seu-spyder-btn.button-primary:hover {
	background: #1a5fc0 !important;
	transform: translateY(-1px);
	box-shadow: 0 2px 6px rgba(30, 107, 214, 0.3);
}

.seu-spyder .seu-spyder-btn.button-primary:focus {
	outline: 2px solid #1E6BD6;
	outline-offset: 2px;
	background: #1a5fc0;
}

.seu-spyder .seu-spyder-btn.button-primary:active {
	transform: translateY(0);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Secondary Button - Outline style (same as Consultation) */
.seu-spyder .seu-spyder-btn.button-secondary {
	background: transparent !important;
	color: #333 !important;
	border: 1px solid #ddd !important;
}

.seu-spyder .seu-spyder-btn.button-secondary:hover {
	background: #f5f5f5 !important;
	border-color: #bbb !important;
	color: #000 !important;
}

.seu-spyder .seu-spyder-btn.button-secondary:focus {
	outline: 2px solid #666;
	outline-offset: 2px;
	background: #f5f5f5;
	border-color: #999;
}

.seu-spyder .seu-spyder-btn.button-secondary:active {
	background: #e9e9e9;
}

.seu-spyder-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

/* Right Panel - Chart */
.seu-spyder-right {
	position: sticky;
	top: 2rem;
	/* Fixed height container to prevent chart resizing */
	min-height: 360px;
	height: 360px;
	display: flex;
	align-items: center;
	justify-content: center;
}

#seu-spyder-chart,
#seu-spyder-chart-reflections {
	max-width: 100%;
	max-height: 100%;
	width: 100% !important;
	height: 100% !important;
	/* Prevent any CSS transitions/animations on the canvas */
	transition: none !important;
	animation: none !important;
}

@media (max-width: 768px) {
	.seu-spyder-right {
		position: relative;
		top: 0;
		/* Fixed height on mobile as well to prevent chart shrinking */
		min-height: 320px;
		height: 320px;
	}
	
	#seu-spyder-chart,
	#seu-spyder-chart-reflections {
		max-width: 100%;
		max-height: 100%;
		width: 100% !important;
		height: 100% !important;
		/* Prevent any CSS transitions/animations on the canvas */
		transition: none !important;
		animation: none !important;
	}
}

/* Reflection Questions */
.seu-spyder-reflections {
	margin-top: 2rem;
}

.seu-spyder-reflection-intro {
	font-size: 1rem;
	color: #000;
	line-height: 1.6;
	margin-bottom: 1.5rem;
}

.seu-spyder-reflection-field {
	margin-bottom: 1.5rem;
}

.seu-spyder-reflection-field label {
	display: block;
	font-size: 1rem;
	font-weight: 700;
	margin-bottom: 0.5rem;
	/* Remove hardcoded color - inherit from theme */
}

.seu-spyder-textarea {
	width: 100%;
	padding: 0.75rem;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 0.95rem;
	font-family: inherit;
	resize: vertical;
	min-height: 80px;
}

.seu-spyder-textarea:focus {
	outline: none;
	/* Remove hardcoded border-color - use default focus styling */
	border-color: currentColor;
	box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.seu-spyder-char-count {
	display: block;
	font-size: 0.85rem;
	margin-top: 0.25rem;
	/* Remove hardcoded color - inherit from theme */
}

/* Result Screen */
.seu-spyder-result {
	margin-top: 2rem;
}

.seu-spyder-result-container {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2rem;
}

@media (max-width: 768px) {
	.seu-spyder-result-container {
		grid-template-columns: 1fr;
	}

	/* Stack buttons on mobile */
	.seu-spyder .seu-spyder-nav,
	.seu-spyder .sswp-spyder-actions {
		flex-direction: column;
	}

	.seu-spyder .seu-spyder-nav .seu-spyder-btn.button,
	.seu-spyder .sswp-spyder-actions .seu-spyder-btn.button {
		width: 100%;
	}

	.seu-spyder .seu-spyder-result-actions {
		flex-direction: column;
	}

	.seu-spyder .seu-spyder-result-actions .seu-spyder-btn.button {
		width: 100%;
	}

	.seu-spyder .seu-spyder-email-row {
		flex-direction: column;
	}

	.seu-spyder .seu-spyder-email-row .seu-spyder-email-input,
	.seu-spyder .seu-spyder-email-row .seu-spyder-btn.button-primary {
		width: 100%;
	}

	.seu-spyder .seu-spyder-modal-actions {
		flex-direction: column;
	}

	.seu-spyder .seu-spyder-modal-actions .seu-spyder-btn.button {
		width: 100%;
		margin-left: 0 !important;
		margin-right: 0 !important;
	}
}

.seu-spyder-result-card {
	background: #fff;
	border-radius: 8px;
	padding: 2rem;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.seu-spyder-result-card h3 {
	font-size: 1.25rem;
	font-weight: 700;
	margin-bottom: 1rem;
	/* Remove hardcoded color - inherit from theme */
}

.seu-spyder-result-card p {
	font-size: 0.95rem;
	line-height: 1.6;
	margin-bottom: 1rem;
	/* Remove hardcoded color - inherit from theme */
}

.seu-spyder-privacy-note {
	font-weight: 600;
}

.seu-spyder-result-actions {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
	margin-top: 1.5rem;
	align-items: center;
}

/* Result page buttons - same styling as navigation buttons */
.seu-spyder .seu-spyder-result-actions .seu-spyder-btn.button {
	flex: 1;
	min-width: 0;
	text-align: center;
}

.seu-spyder .seu-spyder-result-actions .seu-spyder-btn.button-primary {
	background: #1E6BD6 !important;
	color: #fff !important;
	border: none !important;
}

.seu-spyder .seu-spyder-result-actions .seu-spyder-btn.button-primary:hover {
	background: #1a5fc0 !important;
	transform: translateY(-1px);
	box-shadow: 0 2px 6px rgba(30, 107, 214, 0.3);
}

.seu-spyder .seu-spyder-result-actions .seu-spyder-btn.button-secondary {
	background: #fff !important;
	color: #333 !important;
	border: 1px solid #CBD5E1 !important;
}

.seu-spyder .seu-spyder-result-actions .seu-spyder-btn.button-secondary:hover {
	background: #f8f9fa !important;
	border-color: #94a3b8 !important;
}

.seu-spyder-email-form {
	margin-top: 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.seu-spyder-email-form label {
	display: block;
	font-size: 0.95rem;
	font-weight: 600;
	margin-bottom: 0.5rem;
	/* Remove hardcoded color - inherit from theme */
}

.seu-spyder-email-row {
	display: flex;
	gap: 12px;
	align-items: center;
	margin-top: 0.5rem;
}

.seu-spyder-email-input {
	flex: 1;
	padding: 0 14px;
	border: 1px solid #CBD5E1;
	border-radius: 8px;
	height: 44px;
	font-size: 1rem;
	font-family: inherit;
	transition: border-color 0.15s ease, outline 0.15s ease;
	min-width: 0;
	width: 100%;
	max-width: none;
	box-sizing: border-box;
	margin-bottom: 0;
}

.seu-spyder-email-input:focus {
	outline: 2px solid #1E6BD6;
	outline-offset: 2px;
	border-color: #1E6BD6;
}

/* Email send button - same as primary button */
.seu-spyder .seu-spyder-email-row .seu-spyder-btn.button-primary {
	padding: 0.875rem 1.5rem;
	height: 44px;
	border-radius: 8px;
	white-space: nowrap;
	flex-shrink: 0;
}

.seu-spyder-email-status {
	margin-top: 0.5rem;
	font-size: 0.9rem;
	min-height: 1.5rem;
}

.seu-spyder-email-status.success {
	color: #46b450;
}

.seu-spyder-email-status.error {
	color: #dc3232;
}

/* Modal */
.seu-spyder-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
}

.seu-spyder-modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0, 0, 0, 0.5);
}

.seu-spyder-modal-content {
	position: relative;
	background: #fff;
	border-radius: 8px;
	padding: 2rem;
	max-width: 500px;
	width: 90%;
	z-index: 10001;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.seu-spyder-modal-content h3 {
	font-size: 1.25rem;
	font-weight: 700;
	margin-bottom: 1rem;
	/* Remove hardcoded color - inherit from theme */
}

.seu-spyder-modal-content p {
	font-size: 0.95rem;
	line-height: 1.6;
	margin-bottom: 1.5rem;
	/* Remove hardcoded color - inherit from theme */
}

.seu-spyder-modal-actions {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	align-items: center;
}

/* Modal buttons - Close on left, Next/Finish on right */
.seu-spyder-modal-actions .seu-spyder-modal-close {
	margin-right: auto;
}

.seu-spyder-modal-actions .seu-spyder-modal-confirm {
	margin-left: auto;
}

/* Modal Button Styles - Scoped to plugin (same as Consultation) */
.seu-spyder .seu-spyder-modal-actions button,
.seu-spyder .seu-spyder-modal-actions .button {
	/* Reset default WordPress button styles */
	appearance: none;
	-webkit-appearance: none;
	border: none;
	padding: 0.75rem 1.5rem;
	font-size: 0.9375rem;
	font-weight: 500;
	border-radius: 7px;
	cursor: pointer;
	transition: all 0.15s ease;
	display: inline-block;
	text-align: center;
	text-decoration: none;
	line-height: 1.5;
	min-width: 120px;
	font-family: inherit;
}

/* Primary Modal Button (Next/Finish) */
.seu-spyder .seu-spyder-modal-confirm,
.seu-spyder .seu-spyder-modal-confirm.button,
.seu-spyder .seu-spyder-modal-confirm.button-primary {
	background: #1E6BD6 !important;
	color: #fff !important;
	border: none !important;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.seu-spyder .seu-spyder-modal-confirm:hover,
.seu-spyder .seu-spyder-modal-confirm.button:hover,
.seu-spyder .seu-spyder-modal-confirm.button-primary:hover {
	background: #1a5fc0 !important;
	transform: translateY(-1px);
	box-shadow: 0 2px 6px rgba(30, 107, 214, 0.3);
}

.seu-spyder .seu-spyder-modal-confirm:focus {
	outline: 2px solid #1E6BD6;
	outline-offset: 2px;
	background: #1a5fc0;
}

.seu-spyder .seu-spyder-modal-confirm:active {
	transform: translateY(0);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Secondary Modal Button (Close) - Ghost Style */
.seu-spyder .seu-spyder-modal-close,
.seu-spyder .seu-spyder-modal-close.button,
.seu-spyder .seu-spyder-modal-close.button-secondary {
	background: transparent !important;
	color: #333 !important;
	border: 1px solid #ddd !important;
}

.seu-spyder .seu-spyder-modal-close:hover,
.seu-spyder .seu-spyder-modal-close.button:hover,
.seu-spyder .seu-spyder-modal-close.button-secondary:hover {
	background: #f5f5f5 !important;
	border-color: #bbb !important;
	color: #000 !important;
}

.seu-spyder .seu-spyder-modal-close:focus {
	outline: 2px solid #666;
	outline-offset: 2px;
	background: #f5f5f5;
	border-color: #999;
}

.seu-spyder .seu-spyder-modal-close:active {
	background: #e9e9e9;
}

/* Disabled state for modal buttons */
.seu-spyder .seu-spyder-modal-actions button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

/* Loading state */
.seu-spyder-loading {
	opacity: 0.6;
	pointer-events: none;
}
