/* Piyush's AI Workflow - frontend widget styles */

.paiw-widget {
	margin: 2.5em 0;
	padding: 24px;
	background: #0f172a;
	color: #e2e8f0;
	border-radius: 10px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
	overflow: hidden;
}
.paiw-widget-header {
	margin-bottom: 16px;
}
.paiw-widget-title {
	color: #f8fafc;
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 4px 0;
	letter-spacing: -0.01em;
}
.paiw-widget-subtitle {
	color: #94a3b8;
	font-size: 14px;
}
.paiw-widget-canvas {
	position: relative;
	min-height: 280px;
	background: #020617;
	border-radius: 6px;
	overflow: hidden;
}
.paiw-widget-canvas canvas {
	display: block;
	width: 100% !important;
	height: 100% !important;
}
.paiw-widget-fallback,
.paiw-widget-canvas svg {
	width: 100%;
	height: auto;
	display: block;
}
.paiw-widget-hint {
	margin-top: 10px;
	color: #64748b;
	font-size: 11px;
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}
.paiw-widget-attribution {
	margin-top: 12px;
	color: #64748b;
	font-size: 12px;
	font-style: italic;
	text-align: right;
}

/* Light-themed widgets (timeline, comparison) */
.paiw-widget-timeline,
.paiw-widget-comparison {
	background: #ffffff;
	color: #0f172a;
	border: 1px solid #e5e7eb;
}
.paiw-widget-timeline .paiw-widget-title,
.paiw-widget-comparison .paiw-widget-title {
	color: #0f172a;
}

/* Timeline */
.paiw-timeline-list {
	list-style: none;
	margin: 0;
	padding: 0;
	position: relative;
}
.paiw-timeline-list::before {
	content: '';
	position: absolute;
	left: 12px;
	top: 4px;
	bottom: 4px;
	width: 2px;
	background: #cbd5e1;
}
.paiw-timeline-item {
	position: relative;
	padding-left: 36px;
	margin-bottom: 18px;
}
.paiw-timeline-marker {
	position: absolute;
	left: 5px;
	top: 4px;
	width: 16px;
	height: 16px;
	background: #3b82f6;
	border: 3px solid #fff;
	border-radius: 50%;
	box-shadow: 0 0 0 2px #cbd5e1;
}
.paiw-timeline-date {
	font-size: 12px;
	font-weight: 600;
	color: #3b82f6;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}
.paiw-timeline-event {
	font-weight: 600;
	color: #0f172a;
	margin-top: 2px;
}
.paiw-timeline-desc {
	color: #475569;
	font-size: 14px;
	margin-top: 2px;
}

/* Comparison Table */
.paiw-table-wrap {
	overflow-x: auto;
}
.paiw-comparison-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}
.paiw-comparison-table th,
.paiw-comparison-table td {
	padding: 10px 12px;
	border-bottom: 1px solid #e5e7eb;
	text-align: left;
}
.paiw-comparison-table thead th {
	background: #f8fafc;
	font-weight: 600;
	color: #0f172a;
}
.paiw-comparison-table tbody tr:hover {
	background: #f8fafc;
}

/* Sources box */
.paiw-sources-box {
	margin: 3em 0 1em;
	padding: 20px 24px;
	background: #f8fafc;
	border-left: 4px solid #3b82f6;
	border-radius: 4px;
}
.paiw-sources-box h3 {
	margin: 0 0 12px 0;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #475569;
}
.paiw-sources-box ol {
	margin: 0;
	padding-left: 24px;
	font-size: 14px;
}
.paiw-sources-box li {
	margin-bottom: 6px;
	color: #475569;
}
.paiw-sources-box li a {
	color: #3b82f6;
	word-break: break-all;
}

/* Inline citation */
.paiw-cite a {
	font-size: 11px;
	color: #3b82f6;
	text-decoration: none;
	padding: 1px 4px;
	background: rgba(59, 130, 246, 0.08);
	border-radius: 3px;
	margin-left: 2px;
}
.paiw-cite a:hover {
	background: rgba(59, 130, 246, 0.15);
}

/* Stat callout */
.paiw-stat-callout {
	margin: 1.8em 0;
	padding: 24px 28px;
	background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
	color: #fff;
	border-radius: 8px;
	display: flex;
	align-items: center;
	gap: 24px;
}
.paiw-stat-value {
	font-size: 44px;
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.02em;
}
.paiw-stat-label {
	font-size: 16px;
	color: rgba(255,255,255,0.85);
	flex: 1;
}
.paiw-stat-source {
	font-size: 12px;
	color: rgba(255,255,255,0.6);
	font-style: italic;
}

/* Fact box */
.paiw-fact-box {
	margin: 1.8em 0;
	padding: 18px 22px;
	background: #fffbeb;
	border-left: 4px solid #f59e0b;
	border-radius: 4px;
}
.paiw-fact-box h4 {
	margin: 0 0 10px 0;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #92400e;
}
.paiw-fact-box ul {
	margin: 0;
	padding-left: 20px;
	font-size: 15px;
	line-height: 1.55;
}

/* Calculator / Eligibility */
.paiw-calc-row,
.paiw-elig-row {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
}
.paiw-calc-row label,
.paiw-elig-row label {
	min-width: 200px;
	color: #cbd5e1;
	font-size: 14px;
}
.paiw-calc-row input,
.paiw-calc-row select,
.paiw-elig-row input,
.paiw-elig-row select {
	flex: 1;
	padding: 8px 12px;
	background: #1e293b;
	border: 1px solid #334155;
	color: #f1f5f9;
	border-radius: 4px;
	font-size: 14px;
}
.paiw-calc-result,
.paiw-elig-result {
	margin-top: 16px;
	padding: 16px 20px;
	background: #1e3a8a;
	border-radius: 6px;
	font-size: 16px;
	color: #fff;
}
.paiw-calc-result .paiw-calc-value {
	font-size: 28px;
	font-weight: 800;
	display: block;
	margin-bottom: 4px;
}
.paiw-calc-disclaimer,
.paiw-elig-disclaimer {
	margin-top: 12px;
	font-size: 11px;
	color: #94a3b8;
	font-style: italic;
}
.paiw-elig-status-qualifies         { color: #34d399; font-weight: 700; }
.paiw-elig-status-may_qualify       { color: #fbbf24; font-weight: 700; }
.paiw-elig-status-does_not_qualify  { color: #f87171; font-weight: 700; }

/* Responsive */
@media (max-width: 640px) {
	.paiw-widget { padding: 16px; }
	.paiw-stat-callout { flex-direction: column; align-items: flex-start; padding: 18px 20px; }
	.paiw-stat-value { font-size: 36px; }
	.paiw-calc-row, .paiw-elig-row { flex-direction: column; align-items: stretch; }
	.paiw-calc-row label, .paiw-elig-row label { min-width: 0; margin-bottom: 4px; }
}

/* ===== Accordion widget (qa_accordion, document_checklist, application_steps) ===== */
.paiw-widget-accordion {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	margin: 28px 0;
	padding: 0;
	overflow: hidden;
}
.paiw-widget-accordion .paiw-widget-header {
	padding: 18px 22px 14px;
	background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
	border-bottom: 1px solid #f1f5f9;
}
.paiw-widget-accordion .paiw-widget-title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: #0f172a;
	letter-spacing: -0.01em;
}
.paiw-widget-accordion .paiw-widget-body {
	padding: 6px 0;
}
.paiw-accordion-item {
	border-bottom: 1px solid #f1f5f9;
}
.paiw-accordion-item:last-child {
	border-bottom: none;
}
.paiw-accordion-item summary {
	padding: 16px 22px;
	cursor: pointer;
	font-weight: 600;
	color: #1e293b;
	font-size: 15px;
	line-height: 1.4;
	list-style: none;
	position: relative;
	padding-right: 48px;
	user-select: none;
}
.paiw-accordion-item summary::-webkit-details-marker { display: none; }
.paiw-accordion-item summary::after {
	content: "+";
	position: absolute;
	right: 22px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 20px;
	color: #94a3b8;
	font-weight: 400;
	transition: transform 0.2s ease;
}
.paiw-accordion-item[open] summary::after {
	content: "−";
	color: #475569;
}
.paiw-accordion-item summary:hover {
	background: #fafbfc;
}
.paiw-accordion-body {
	padding: 0 22px 18px 22px;
	color: #334155;
	font-size: 15px;
	line-height: 1.65;
}
.paiw-accordion-body p {
	margin: 0 0 10px 0;
}
.paiw-accordion-body p:last-child { margin-bottom: 0; }

.paiw-widget-empty-state {
	padding: 20px 22px;
	color: #94a3b8;
	font-size: 14px;
	font-style: italic;
}
