/* WAF-CHECKER.COM - Minimal CSS for dynamic elements */
/* Main styling is handled by Tailwind CSS */

/* When API docs panel is open: hide main header and disclaimer so only the panel is visible */
body.api-panel-open #disclaimerBanner,
body.api-panel-open > header {
	visibility: hidden !important;
	pointer-events: none !important;
}

/* Force dark backgrounds on Bootstrap modals (override Bootstrap's white defaults) */
.modal-content {
	background-color: #161b22 !important;
}
.modal-header,
.modal-footer {
	background-color: #1c2128 !important;
}

/* Background grid pattern */
body::before {
	content: '';
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-image:
		linear-gradient(rgba(0, 217, 255, 0.02) 1px, transparent 1px),
		linear-gradient(90deg, rgba(0, 217, 255, 0.02) 1px, transparent 1px);
	background-size: 40px 40px;
	pointer-events: none;
	z-index: 0;
}

/* Advanced panel: scrollable on desktop */
#panelAdvanced {
	max-height: 320px;
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: rgba(0, 217, 255, 0.3) transparent;
}

#panelAdvanced::-webkit-scrollbar {
	width: 5px;
}

#panelAdvanced::-webkit-scrollbar-track {
	background: transparent;
}

#panelAdvanced::-webkit-scrollbar-thumb {
	background: rgba(0, 217, 255, 0.3);
	border-radius: 3px;
}

#panelAdvanced::-webkit-scrollbar-thumb:hover {
	background: rgba(0, 217, 255, 0.5);
}

/* Advanced Options Popup */
#advancedPopup {
	animation: popupFadeIn 0.15s ease-out;
}

@keyframes popupFadeIn {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Custom Modal Animation */
.animate-modal-in {
	animation: modalSlideIn 0.2s ease-out;
}

@keyframes modalSlideIn {
	from {
		opacity: 0;
		transform: scale(0.95) translateY(-10px);
	}
	to {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

/* Progress Bar Shimmer Animation */
.animate-shimmer {
	animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
	0% {
		transform: translateX(-100%);
	}
	100% {
		transform: translateX(100%);
	}
}

/* Border width for progress spinner */
.border-3 {
	border-width: 3px;
}

/* =============================================
   Unified Cyber Scanner Loader
   ============================================= */
.cyber-loader {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* Size variants */
.cyber-loader--sm { width: 24px; height: 24px; }
.cyber-loader--md { width: 40px; height: 40px; }
.cyber-loader--lg { width: 56px; height: 56px; }

/* Outer ring (static, subtle) */
.cyber-loader__ring {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	border: 2px solid currentColor;
	opacity: 0.12;
}

/* Spinning arc */
.cyber-loader__arc {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	border: 2px solid transparent;
	border-top-color: currentColor;
	border-right-color: currentColor;
	animation: cyberSpin 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
.cyber-loader--sm .cyber-loader__arc,
.cyber-loader--sm .cyber-loader__ring { border-width: 2px; }
.cyber-loader--lg .cyber-loader__arc,
.cyber-loader--lg .cyber-loader__ring { border-width: 2.5px; }

/* Inner pulsing dot */
.cyber-loader__dot {
	position: absolute;
	width: 30%;
	height: 30%;
	border-radius: 50%;
	background: currentColor;
	opacity: 0.6;
	animation: cyberPulse 1.4s ease-in-out infinite;
}

/* Glow effect (large only) */
.cyber-loader--lg::after {
	content: '';
	position: absolute;
	inset: -4px;
	border-radius: 50%;
	border: 1px solid currentColor;
	opacity: 0;
	animation: cyberGlow 2s ease-in-out infinite;
}

@keyframes cyberSpin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

@keyframes cyberPulse {
	0%, 100% { transform: scale(0.8); opacity: 0.4; }
	50% { transform: scale(1.1); opacity: 0.8; }
}

@keyframes cyberGlow {
	0%, 100% { opacity: 0; transform: scale(1); }
	50% { opacity: 0.25; transform: scale(1.08); }
}

/* Scanning text shimmer */
.cyber-loader-text {
	background: linear-gradient(
		90deg,
		currentColor 0%,
		rgba(255, 255, 255, 0.8) 50%,
		currentColor 100%
	);
	background-size: 200% 100%;
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	animation: cyberTextShimmer 2s ease-in-out infinite;
}

@keyframes cyberTextShimmer {
	0% { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

/* Inline loader (for buttons, small text) */
.cyber-loader-inline {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}
.cyber-loader-inline .cyber-loader--sm {
	flex-shrink: 0;
}

/* Category checkboxes generated by JS */
#categoryCheckboxes .form-check {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	background: #1c2128;
	border: 1px solid rgba(0, 217, 255, 0.2);
	border-radius: 0.5rem;
	padding: 0.35rem 0.5rem;
	cursor: pointer;
	transition: all 0.2s ease;
	font-size: 0.7rem;
}

#categoryCheckboxes .form-check:hover {
	border-color: #00d9ff;
	background: rgba(0, 217, 255, 0.05);
}

#categoryCheckboxes .form-check-input {
	width: 0.875rem;
	height: 0.875rem;
	accent-color: #00d9ff;
	margin: 0;
	flex-shrink: 0;
}

#categoryCheckboxes .form-check-label {
	color: #b1bac4;
	cursor: pointer;
	line-height: 1.2;
	font-size: 0.7rem;
}

.category-label-danger {
	color: #ff3860 !important;
}

/* Results table styling */
#results table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	border-radius: 0.5rem;
	overflow: hidden;
	background: #161b22;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
	font-size: 0.85rem;
}

#results th {
	background: #1c2128;
	color: #00d9ff;
	font-weight: 600;
	text-align: center;
	padding: 0.75rem;
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	border-bottom: 2px solid #00d9ff;
}

#results td {
	padding: 0.5rem 0.75rem;
	border-bottom: 1px solid rgba(0, 217, 255, 0.15);
	color: #f0f6fc;
}

#results tr:nth-child(even) {
	background: #0d1117;
}

#results tr:nth-child(odd) {
	background: #161b22;
}

#results tr:hover {
	background: rgba(0, 217, 255, 0.05);
}

#results code {
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.7rem;
	padding: 0.15rem 0.35rem;
	background: rgba(0, 217, 255, 0.1);
	border-radius: 0.25rem;
	word-break: break-all;
	color: #f0f6fc;
}

.payload-green {
	color: #00ff9d !important;
}

/* Status colors */
.status-redirect {
	background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
	color: #fff !important;
	font-weight: 600;
}

.status-green {
	background: linear-gradient(135deg, #00ff9d 0%, #00cc7a 100%) !important;
	color: #0a0e14 !important;
	font-weight: 600;
}

.status-red {
	background: linear-gradient(135deg, #ff3860 0%, #dc2626 100%) !important;
	color: #fff !important;
	font-weight: 600;
}

.status-orange {
	background: linear-gradient(135deg, #ffb347 0%, #f59e0b 100%) !important;
	color: #0a0e14 !important;
	font-weight: 600;
}

.status-gray {
	background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%) !important;
	color: #fff !important;
}

/* Summary bars */
.status-bar {
	height: 1.5rem;
	min-width: 2px;
	line-height: 1.5rem;
	padding-left: 0.625rem;
	display: inline-block;
	border-radius: 0.25rem;
	font-weight: 600;
	font-size: 0.75rem;
	color: #f0f6fc;
}

.status-bar-total {
	width: 100%;
	background: #1c2128;
	color: #f0f6fc;
	border: 1px solid rgba(0, 217, 255, 0.2);
}

.min-width-112 {
	min-width: 6.875rem;
}

.min-width-112 label {
	color: #f0f6fc;
}

.checkbox-align {
	margin-right: 0.3rem;
	vertical-align: middle;
}

/* Test mode indicators */
.false-positive-indicator,
.normal-test-indicator {
	padding: 0.75rem 1rem;
	margin: 0.75rem 0;
	border-radius: 0.5rem;
	border-left: 4px solid;
}

.false-positive-indicator {
	background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.1) 100%);
	border-color: #3b82f6;
}

.false-positive-indicator strong {
	color: #93c5fd;
}

.false-positive-indicator small {
	color: #c9d1d9;
}

.normal-test-indicator {
	background: linear-gradient(135deg, rgba(0, 217, 255, 0.15) 0%, rgba(0, 255, 157, 0.1) 100%);
	border-color: #00d9ff;
}

.normal-test-indicator strong {
	color: #00d9ff;
}

.normal-test-indicator small {
	color: #c9d1d9;
}

/* Help icon */
.help-icon {
	cursor: pointer;
	margin-left: 0.5rem;
	opacity: 0.7;
	transition: opacity 0.2s ease;
}

.help-icon:hover {
	opacity: 1;
	color: #00d9ff;
}

.help-content {
	margin-top: 0.5rem;
	padding: 0.5rem;
	background: #0d1117;
	border-radius: 0.375rem;
	border-left: 3px solid #00d9ff;
	color: #c9d1d9;
}

/* Cards for JS-generated content */
.card {
	background: #161b22;
	border: 1px solid rgba(0, 217, 255, 0.2);
	border-radius: 0.625rem;
}

.card-header {
	background: #1c2128;
	border-bottom: 1px solid rgba(0, 217, 255, 0.2);
	padding: 0.75rem 1rem;
	color: #f0f6fc;
}

.card-body {
	padding: 1rem;
	color: #f0f6fc;
}

/* Alerts */
.alert-info {
	background: rgba(0, 217, 255, 0.1);
	border: 1px solid #00d9ff;
	color: #f0f6fc;
	border-radius: 0.5rem;
	padding: 0.75rem 1rem;
}

.alert-success {
	background: rgba(0, 255, 157, 0.1);
	border: 1px solid #00ff9d;
	color: #f0f6fc;
	border-radius: 0.5rem;
	padding: 0.75rem 1rem;
}

.alert-warning {
	background: rgba(255, 179, 71, 0.1);
	border: 1px solid #ffb347;
	color: #f0f6fc;
	border-radius: 0.5rem;
	padding: 0.75rem 1rem;
}

/* Badges */
.badge {
	font-family: 'Outfit', sans-serif;
	font-weight: 500;
	padding: 0.25em 0.5em;
	border-radius: 0.25rem;
	font-size: 0.7rem;
}

.badge.bg-success {
	background: #00ff9d !important;
	color: #0a0e14 !important;
}

.badge.bg-danger {
	background: #ff3860 !important;
	color: #fff !important;
}

.badge.bg-warning {
	background: #ffb347 !important;
	color: #0a0e14 !important;
}

.badge.bg-info {
	background: #00d9ff !important;
	color: #0a0e14 !important;
}

/* Progress bar */
.progress {
	background: #1c2128;
	border-radius: 0.375rem;
	height: 0.5rem;
	overflow: hidden;
}

.progress-bar {
	background: linear-gradient(90deg, #00d9ff 0%, #00ff9d 100%);
}

.progress-bar-animated {
	background: linear-gradient(90deg, #00d9ff 0%, #00ff9d 50%, #00d9ff 100%);
	background-size: 200% 100%;
	animation: progress-animation 2s linear infinite;
}

@keyframes progress-animation {
	0% { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

/* Scrollbar */
::-webkit-scrollbar {
	width: 6px;
	height: 6px;
}

::-webkit-scrollbar-track {
	background: #0d1117;
}

::-webkit-scrollbar-thumb {
	background: #8b949e;
	border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
	background: #00d9ff;
}

/* Selection */
::selection {
	background: #00d9ff;
	color: #0a0e14;
}

/* Test Configuration Modal */
#testConfigModal .modal-body {
	overflow: hidden;
}

#testConfigModal .modal-body > div {
	height: 100%;
	min-height: 400px;
}

#configCategoryList {
	min-height: 0;
	scrollbar-width: thin;
	scrollbar-color: rgba(0, 217, 255, 0.3) transparent;
}

#configCategoryList::-webkit-scrollbar {
	width: 6px;
}

#configCategoryList::-webkit-scrollbar-track {
	background: rgba(0, 0, 0, 0.2);
	border-radius: 3px;
}

#configCategoryList::-webkit-scrollbar-thumb {
	background: rgba(0, 217, 255, 0.4);
	border-radius: 3px;
}

#configCategoryList::-webkit-scrollbar-thumb:hover {
	background: rgba(0, 217, 255, 0.6);
}

#configAttackPayloads,
#configFalsePayloads {
	min-height: 0;
	scrollbar-width: thin;
	scrollbar-color: rgba(0, 217, 255, 0.3) transparent;
}

#configAttackPayloads::-webkit-scrollbar,
#configFalsePayloads::-webkit-scrollbar {
	width: 6px;
}

#configAttackPayloads::-webkit-scrollbar-track,
#configFalsePayloads::-webkit-scrollbar-track {
	background: rgba(0, 0, 0, 0.2);
	border-radius: 3px;
}

#configAttackPayloads::-webkit-scrollbar-thumb,
#configFalsePayloads::-webkit-scrollbar-thumb {
	background: rgba(0, 217, 255, 0.4);
	border-radius: 3px;
}

#configAttackPayloads::-webkit-scrollbar-thumb:hover,
#configFalsePayloads::-webkit-scrollbar-thumb:hover {
	background: rgba(0, 217, 255, 0.6);
}

/* =============================================
   MOBILE DRAWER - Hamburger button
   ============================================= */
.mobile-menu-btn {
	display: none;
}

/* Drawer close bar - hidden on desktop */
.drawer-close-bar {
	display: none;
}

/* Config back button - hidden on desktop */
.config-back-btn {
	display: none !important;
}

/* Drawer overlay */
.drawer-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	z-index: 90;
	opacity: 0;
	transition: opacity 0.3s ease;
	pointer-events: none;
}

.drawer-overlay.active {
	display: block;
	opacity: 1;
	pointer-events: auto;
}

/* Drawer slide-in animation */
@keyframes drawerSlideIn {
	from { transform: translateX(-100%); }
	to { transform: translateX(0); }
}

@keyframes drawerSlideOut {
	from { transform: translateX(0); }
	to { transform: translateX(-100%); }
}

/* =============================================
   ASIDE PANEL - Desktop layout
   ============================================= */
.aside-panel {
	width: 24rem;
	min-width: 24rem;
	flex-shrink: 0;
	min-height: 0;          /* allow flex child to shrink & enable overflow scroll */
}

/* Desktop: Tools grid in 4 columns */
@media (min-width: 993px) {
	#toolsBtns {
		grid-template-columns: repeat(4, 1fr) !important;
	}
}

main {
	min-height: 0;          /* allow flex child to shrink below content size */
}

/* =============================================
   RESPONSIVE - Tablet & Mobile (<=992px)
   Aside becomes a slide-in drawer
   ============================================= */
@media (max-width: 992px) {
	/* Show hamburger button */
	.mobile-menu-btn {
		display: flex;
	}

	/* Aside becomes a fixed drawer */
	aside {
		position: fixed !important;
		top: 0;
		left: 0;
		bottom: 0;
		width: 85vw !important;
		max-width: 380px !important;
		min-width: 0 !important;
		z-index: 100;
		transform: translateX(-100%);
		transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
		border-right: 1px solid rgba(0, 217, 255, 0.3) !important;
		overflow-y: auto !important;
		box-shadow: none;
		background: #0d1117 !important;
	}

	aside.drawer-open {
		transform: translateX(0);
		box-shadow: 4px 0 30px rgba(0, 0, 0, 0.6);
	}

	/* Drawer children: don't shrink, allow scroll */
	aside > * {
		flex-shrink: 0;
	}

	/* Show close bar inside drawer */
	.drawer-close-bar {
		display: flex;
		align-items: center;
		justify-content: space-between;
		margin: -1rem -1rem 0.5rem -1rem;
		padding: 0.75rem 1rem;
		background: #1c2128;
		border-bottom: 1px solid rgba(0, 217, 255, 0.2);
	}

	/* Section takes full width since aside is out of flow */
	section {
		width: 100% !important;
		overflow: hidden !important;
	}

	/* Results container: scrollable both ways */
	#results {
		overflow-x: auto !important;
		overflow-y: auto !important;
		-webkit-overflow-scrolling: touch;
	}

	/* Target panel: compact on mobile */
	#panelTarget {
		padding: 0.5rem !important;
	}

	#panelTarget .mb-4 {
		margin-bottom: 0.5rem !important;
	}

	#panelTarget .mb-4 label {
		margin-bottom: 0.25rem !important;
	}

	#panelTarget input[type="url"] {
		padding: 0.5rem 0.75rem !important;
		font-size: 0.8rem !important;
	}

	#panelTarget #checkBtn {
		padding-top: 0.5rem !important;
		padding-bottom: 0.5rem !important;
		margin-bottom: 0.5rem !important;
		font-size: 0.75rem !important;
	}

	/* Secondary buttons */
	#secondaryBtns {
		gap: 0.35rem !important;
		margin-bottom: 0.5rem !important;
	}

	#secondaryBtns button {
		padding-top: 0.35rem !important;
		padding-bottom: 0.35rem !important;
		font-size: 0.65rem !important;
	}

	/* Tools buttons: stay 2 cols on mobile, compact */
	#toolsBtns {
		grid-template-columns: repeat(2, 1fr) !important;
		gap: 0.3rem !important;
	}

	#toolsBtns .tool-btn {
		padding-top: 0.35rem !important;
		padding-bottom: 0.35rem !important;
		font-size: 0.6rem !important;
	}

	/* Prevent body scroll when drawer is open */
	body.drawer-is-open {
		overflow: hidden !important;
	}

	/* Results table scrollable */
	#results {
		overflow-x: auto !important;
	}

	#results table {
		min-width: 640px;
	}

	/* ---- Payload Config Modal → slide-in drawer from left ---- */
	#testConfigModal .modal-dialog {
		margin: 0 !important;
		max-width: 90vw !important;
		width: 90vw;
		height: 100vh;
	}

	/* Override Bootstrap fade: slide from left */
	#testConfigModal.modal.fade .modal-dialog {
		transform: translateX(-100%);
		transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	}

	#testConfigModal.modal.show .modal-dialog {
		transform: translateX(0);
	}

	#testConfigModal .modal-content {
		height: 100vh;
		border-radius: 0 0.75rem 0.75rem 0 !important;
		display: flex;
		flex-direction: column;
	}

	#testConfigModal .modal-header {
		border-radius: 0 0.75rem 0 0 !important;
		flex-shrink: 0;
	}

	#testConfigModal .modal-footer {
		border-radius: 0 0 0.75rem 0 !important;
		flex-shrink: 0;
	}

	/* Body: fill remaining space */
	#testConfigModal .modal-body {
		height: auto !important;
		max-height: none !important;
		flex: 1 1 0 !important;
		min-height: 0 !important;
		overflow: hidden !important;
	}

	/* Inner container */
	#testConfigModal .modal-body > div {
		flex-direction: column !important;
		height: 100% !important;
		overflow: hidden !important;
	}

	/* ===== MOBILE NAVIGATION: one screen at a time ===== */

	/* Screen 1: Category list - full height (default) */
	#testConfigModal .modal-body > div > .w-64 {
		width: 100% !important;
		min-width: 100% !important;
		flex: 1 1 0 !important;
		max-height: none !important;
		border-right: none !important;
		border-bottom: none !important;
		overflow-y: auto !important;
	}

	/* Category list: unrestricted (has full panel now) */
	#testConfigModal #configCategoryList {
		max-height: none !important;
		flex: 1 1 0 !important;
		overflow-y: auto !important;
	}

	/* Screen 2: Editor - hidden by default */
	#testConfigModal .modal-body > div > .flex-1 {
		display: none !important;
	}

	/* When editing: swap screens */
	#testConfigModal .modal-body > div.config-editing > .w-64 {
		display: none !important;
	}

	#testConfigModal .modal-body > div.config-editing > .flex-1 {
		display: flex !important;
		flex: 1 1 0 !important;
		min-height: 0 !important;
		overflow: hidden !important;
	}

	/* Back button: visible on mobile */
	.config-back-btn {
		display: flex !important;
	}

	/* Editor welcome page: scrollable */
	#testConfigModal #configEditorEmpty {
		overflow-y: auto !important;
	}

	/* Payload panels: ensure scrollable */
	#testConfigModal #panelAttackPayloads,
	#testConfigModal #panelFalsePayloads {
		overflow: hidden !important;
	}

	#testConfigModal #configAttackPayloads,
	#testConfigModal #configFalsePayloads {
		overflow-y: auto !important;
	}

	/* Editor header: allow wrapping */
	#testConfigModal #configEditor > .p-4:first-child .flex.items-center.justify-between {
		flex-wrap: wrap;
		gap: 0.5rem;
	}
}

/* =============================================
   RESPONSIVE - Phone landscape / small tablet (<=768px)
   ============================================= */
@media (max-width: 768px) {
	/* Header: compact */
	header {
		padding-left: 0.5rem !important;
		padding-right: 0.5rem !important;
		gap: 0.25rem;
	}

	header h1 {
		font-size: 0.95rem !important;
	}

	/* Features grid on welcome placeholder */
	.results-placeholder .grid-cols-2 {
		grid-template-columns: 1fr !important;
	}

	/* ===== RESULTS AREA ===== */
	#results {
		padding: 0.75rem !important;
	}

	/* Result banners: stack title + badges vertically */
	#results > div > .flex.items-center.justify-between {
		flex-direction: column !important;
		align-items: flex-start !important;
		gap: 0.5rem !important;
	}

	/* Status badge row: wrap on small screens */
	#results .flex.items-center.gap-4.text-xs {
		flex-wrap: wrap;
		gap: 0.35rem !important;
	}

	/* Status badges: smaller */
	#results .flex.items-center.gap-4.text-xs > span,
	#results .flex.items-center.gap-4.text-xs > button {
		font-size: 0.6rem !important;
		padding: 0.2rem 0.5rem !important;
	}

	/* Banner icon: smaller */
	#results .w-10.h-10 {
		width: 2rem !important;
		height: 2rem !important;
	}

	#results .w-10.h-10 svg {
		width: 1rem !important;
		height: 1rem !important;
	}

	/* Banner title text */
	#results .text-sm.font-bold {
		font-size: 0.75rem !important;
	}

	/* Explanation text block: compact */
	#results > div > .mb-4.p-3 {
		padding: 0.5rem !important;
	}

	#results > div > .mb-4.p-3 p {
		font-size: 0.65rem !important;
		line-height: 1.4 !important;
	}

	/* Summary card: compact */
	#results > div > .bg-cyber-card.p-4 {
		padding: 0.5rem !important;
	}

	#results > div > .bg-cyber-card.p-4 h4 {
		font-size: 0.7rem !important;
	}

	#results > div > .bg-cyber-card.p-4 label {
		padding: 0.35rem !important;
		gap: 0.4rem !important;
	}

	#results > div > .bg-cyber-card.p-4 label span.text-sm {
		font-size: 0.75rem !important;
	}

	/* Summary progress bars: narrower */
	#results .max-w-\[200px\] {
		max-width: 120px !important;
	}

	/* Table container: horizontal scroll */
	#results .overflow-x-auto {
		-webkit-overflow-scrolling: touch;
	}

	/* Table: more compact */
	#results table th {
		padding: 0.4rem 0.35rem !important;
		font-size: 0.55rem !important;
	}

	#results table td {
		padding: 0.3rem 0.35rem !important;
		font-size: 0.7rem !important;
	}

	#results table code {
		font-size: 0.55rem !important;
		padding: 0.1rem 0.2rem !important;
	}

	/* Table: reduce min-width for smaller screens */
	#results table {
		min-width: 520px !important;
	}

	/* ===== PROGRESS BAR ===== */
	#progressBar .px-6 {
		padding-left: 0.75rem !important;
		padding-right: 0.75rem !important;
		padding-top: 0.5rem !important;
		padding-bottom: 0.5rem !important;
	}

	#progressBar .text-2xl {
		font-size: 1.1rem !important;
	}

	#progressBar .text-sm {
		font-size: 0.7rem !important;
	}

	#progressBar .text-xs {
		font-size: 0.6rem !important;
	}

	#progressBar .w-8 {
		width: 1.5rem !important;
		height: 1.5rem !important;
	}

	/* ===== EXPORT CONTROLS ===== */
	#exportControls {
		flex-wrap: wrap;
		justify-content: center;
		margin-left: 0.5rem !important;
		margin-right: 0.5rem !important;
	}

	/* Batch modal: single column grid */
	#batchModal .grid-cols-2 {
		grid-template-columns: 1fr !important;
	}

	/* Analytics modal: reduce padding */
	#analyticsModal > div > .relative {
		max-width: 100% !important;
		border-radius: 0.75rem;
	}

	#analyticsContent {
		padding: 1rem !important;
	}

	/* HTTP codes modal */
	#httpCodesModal .max-w-4xl {
		max-width: 100% !important;
	}

	#httpCodesTableContent {
		overflow-x: auto;
	}

	#httpCodesTableContent table {
		min-width: 500px;
	}
}

/* =============================================
   RESPONSIVE - Phone portrait (<=640px)
   ============================================= */
@media (max-width: 640px) {
	/* Header: very compact */
	header {
		height: auto !important;
		min-height: 3rem;
		padding-top: 0.4rem !important;
		padding-bottom: 0.4rem !important;
	}

	header h1 {
		font-size: 0.85rem !important;
		white-space: nowrap;
	}

	/* Drawer: tighter padding */
	aside {
		padding: 0.75rem !important;
		gap: 0.75rem !important;
	}

	.drawer-close-bar {
		margin: -0.75rem -0.75rem 0.5rem -0.75rem;
	}

	/* Methods grid: 2 columns */
	.methods-grid {
		display: grid !important;
		grid-template-columns: repeat(2, 1fr) !important;
	}

	/* Category checkboxes: single column */
	#categoryCheckboxes {
		grid-template-columns: 1fr !important;
		max-height: 200px !important;
	}

	/* Advanced panel grids: single column on tiny screens (but not target buttons) */
	aside .grid-cols-2:not(#secondaryBtns) {
		grid-template-columns: 1fr !important;
	}

	/* Tools: 2 columns on small screens */
	#toolsBtns {
		grid-template-columns: repeat(2, 1fr) !important;
		gap: 0.25rem !important;
	}

	#toolsBtns .tool-btn {
		padding-top: 0.3rem !important;
		padding-bottom: 0.3rem !important;
		font-size: 0.55rem !important;
	}

	/* Welcome placeholder: compact */
	.results-placeholder .flex.items-center.gap-5 {
		gap: 0.75rem !important;
	}

	.results-placeholder .w-16 {
		width: 2.5rem !important;
		height: 2.5rem !important;
	}

	.results-placeholder .w-16 svg {
		width: 1.5rem !important;
		height: 1.5rem !important;
	}

	.results-placeholder .text-2xl {
		font-size: 1.25rem !important;
	}

	/* Results: extra compact on phone */
	#results {
		padding: 0.5rem !important;
	}

	/* Hide time column on very small screens */
	#results table {
		min-width: 420px !important;
	}

	#results table th {
		padding: 0.3rem 0.25rem !important;
		font-size: 0.5rem !important;
	}

	#results table td {
		padding: 0.25rem 0.25rem !important;
		font-size: 0.6rem !important;
	}

	#results table code {
		font-size: 0.5rem !important;
		padding: 0.05rem 0.15rem !important;
	}

	/* Method/status badges: tiny */
	#results table .px-2 {
		padding-left: 0.25rem !important;
		padding-right: 0.25rem !important;
	}

	/* Banner: hide icon, compact */
	#results .w-10.h-10,
	#results .w-2.h-2 {
		display: none !important;
	}

	/* Status badges: single line text */
	#results .flex.items-center.gap-4.text-xs > span {
		padding: 0.15rem 0.35rem !important;
		font-size: 0.55rem !important;
	}

	/* Explanation text: even smaller */
	#results > div > .mb-4.p-3 {
		padding: 0.35rem !important;
		margin-bottom: 0.5rem !important;
	}

	#results > div > .mb-4.p-3 p {
		font-size: 0.6rem !important;
	}

	/* Export controls: wrap */
	#exportControls {
		flex-wrap: wrap;
		justify-content: center;
		padding: 0.35rem !important;
		margin: 0 0.25rem 0.25rem 0.25rem !important;
	}

	/* Status bars: compact */
	.status-bar {
		font-size: 0.65rem;
		height: 1.25rem;
		line-height: 1.25rem;
		padding-left: 0.4rem;
	}

	.min-width-112 {
		min-width: 5rem;
	}

	/* Footer */
	footer {
		flex-wrap: wrap;
		height: auto !important;
		padding: 0.5rem;
		gap: 0.25rem;
	}

	footer .mx-2 {
		display: none;
	}

	/* Config modal: full width on phone */
	#testConfigModal .modal-dialog {
		max-width: 100vw !important;
		width: 100vw;
	}

	#testConfigModal .modal-content {
		border-radius: 0 !important;
	}

	#testConfigModal .modal-header {
		border-radius: 0 !important;
		padding: 0.75rem 1rem !important;
	}

	#testConfigModal .modal-header .modal-title {
		font-size: 0.85rem !important;
	}

	#testConfigModal .modal-footer {
		border-radius: 0 !important;
		padding: 0.5rem 0.75rem !important;
	}

	/* Config category list items: compact */
	#configCategoryList button,
	#configCategoryList > div {
		font-size: 0.8rem !important;
	}

	/* Editor: compact header */
	#testConfigModal #configEditor > .p-4:first-child {
		padding: 0.5rem 0.75rem !important;
	}

	#testConfigModal #configCategoryName {
		font-size: 0.9rem !important;
	}

	/* Payload tabs: compact */
	#testConfigModal #tabAttackPayloads,
	#testConfigModal #tabFalsePayloads {
		padding: 0.5rem 0.5rem !important;
		font-size: 0.7rem !important;
		gap: 0.25rem !important;
	}

	#testConfigModal #tabAttackPayloads svg,
	#testConfigModal #tabFalsePayloads svg {
		width: 0.85rem !important;
		height: 0.85rem !important;
	}

	/* Payload panels: compact padding */
	#testConfigModal #panelAttackPayloads,
	#testConfigModal #panelFalsePayloads {
		padding: 0.5rem !important;
	}

	/* Payload editor inputs */
	#configAttackPayloads input,
	#configFalsePayloads input {
		font-size: 0.75rem !important;
		padding: 0.35rem 0.5rem !important;
	}

	/* Analytics grid */
	#analyticsContent .grid-cols-2,
	#analyticsContent .grid-cols-4 {
		grid-template-columns: repeat(2, 1fr) !important;
	}

	#analyticsContent .grid-cols-3 {
		grid-template-columns: 1fr !important;
	}
}

/* =============================================
   RESPONSIVE - Very small phone (<=400px)
   ============================================= */
@media (max-width: 400px) {
	header h1 {
		font-size: 0.75rem !important;
	}

	aside {
		padding: 0.5rem !important;
	}

	.drawer-close-bar {
		margin: -0.5rem -0.5rem 0.5rem -0.5rem;
	}

	#results {
		padding: 0.5rem !important;
	}

	/* Summary bars: stack count label */
	.min-width-112 {
		min-width: 4rem;
		font-size: 0.65rem;
	}

	/* Modals: edge to edge */
	.fixed.inset-0 > .relative {
		border-radius: 0.5rem !important;
	}

	/* Target widget: ultra compact */
	#panelTarget #checkBtn {
		padding-top: 0.4rem !important;
		padding-bottom: 0.4rem !important;
		font-size: 0.7rem !important;
	}

	#secondaryBtns button {
		font-size: 0.55rem !important;
		padding-top: 0.3rem !important;
		padding-bottom: 0.3rem !important;
	}

	#toolsBtns {
		grid-template-columns: repeat(2, 1fr) !important;
		gap: 0.2rem !important;
	}

	#toolsBtns .tool-btn {
		font-size: 0.5rem !important;
		padding-top: 0.25rem !important;
		padding-bottom: 0.25rem !important;
	}

	/* Analytics: single column */
	#analyticsContent .grid-cols-2,
	#analyticsContent .grid-cols-4 {
		grid-template-columns: 1fr !important;
	}
}

/* Global recon tooltip */
#reconTooltip {
	position: fixed;
	z-index: 9999;
	background: #141825;
	color: #cbd5e1;
	font-size: 11px;
	line-height: 1.4;
	padding: 8px 12px;
	border-radius: 8px;
	border: 1px solid rgba(6,182,212,.35);
	max-width: 280px;
	pointer-events: none;
	opacity: 0;
	transition: opacity .15s;
	box-shadow: 0 6px 20px rgba(0,0,0,.5);
}
#reconTooltip.visible { opacity: 1; }
.recon-tip {
	display: inline-flex;
	cursor: help;
	vertical-align: middle;
}

/* =============================================
   API DOCS PANEL
   ============================================= */
#apiDocsPanel {
	transition: opacity .25s ease;
}

/* Endpoint collapse/expand */
.ep-body {
	max-height: 600px;
	overflow: hidden;
	transition: max-height .25s ease, padding .25s ease, opacity .2s ease;
	opacity: 1;
}
.ep-body.ep-collapsed {
	max-height: 0;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	opacity: 0;
}

/* Chevron rotation */
.ep-body.ep-collapsed ~ div svg:last-child,
div:has(+ .ep-body.ep-collapsed) svg:last-child {
	transform: rotate(-90deg);
}

/* Input focus glow */
#apiDocsDomain:focus {
	border-color: rgba(0,217,255,.5);
	box-shadow: 0 0 0 3px rgba(0,217,255,.08);
}
