/* IEP Analyzer — GuideAI Brand Styles */

:root {
	--primary: #2C5F7F;
	--primary-light: #3a7aa3;
	--secondary: #5B8C5A;
	--accent: #D4A574;
	--danger: #c0392b;
	--warning: #e67e22;
	--bg: #f8f9fa;
	--surface: #ffffff;
	--border: #dee2e6;
	--text: #2d3748;
	--text-muted: #6c757d;
	--radius: 10px;
	--shadow: 0 2px 12px rgba(0,0,0,0.08);
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	background: var(--bg);
	color: var(--text);
	line-height: 1.6;
	font-size: 16px;
}

/* Layout */
.container {
	max-width: 860px;
	margin: 0 auto;
	padding: 0 20px;
}

/* Header */
.site-header {
	background: var(--primary);
	color: white;
	padding: 18px 0;
	margin-bottom: 40px;
}

.site-header .container {
	display: flex;
	align-items: center;
	gap: 12px;
}

.site-header h1 {
	font-size: 1.4rem;
	font-weight: 600;
}

.site-header .tagline {
	font-size: 0.9rem;
	opacity: 0.8;
	margin-top: 2px;
}

.logo-mark {
	font-size: 1.8rem;
}

/* Upload Section */
.upload-section {
	background: var(--surface);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 40px;
	margin-bottom: 32px;
	text-align: center;
}

.upload-section h2 {
	font-size: 1.5rem;
	color: var(--primary);
	margin-bottom: 10px;
}

.upload-section .lead {
	color: var(--text-muted);
	margin-bottom: 32px;
	font-size: 1rem;
}

.upload-zone {
	border: 2px dashed var(--border);
	border-radius: var(--radius);
	padding: 40px 20px;
	cursor: pointer;
	transition: all 0.2s;
	position: relative;
}

.upload-zone:hover,
.upload-zone.dragover {
	border-color: var(--primary);
	background: rgba(44, 95, 127, 0.04);
}

.upload-zone input[type="file"] {
	position: absolute;
	inset: 0;
	opacity: 0;
	cursor: pointer;
	width: 100%;
	height: 100%;
}

.upload-icon {
	font-size: 3rem;
	display: block;
	margin-bottom: 12px;
}

.upload-zone p {
	color: var(--text-muted);
	margin-bottom: 6px;
}

.upload-zone .hint {
	font-size: 0.85rem;
}

.file-selected {
	display: none;
	align-items: center;
	gap: 10px;
	background: rgba(91, 140, 90, 0.1);
	border-radius: 8px;
	padding: 12px 16px;
	margin-top: 16px;
	text-align: left;
}

.file-selected.visible {
	display: flex;
}

.file-selected span {
	font-weight: 500;
	color: var(--secondary);
}

.btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 28px;
	border-radius: 8px;
	font-size: 1rem;
	font-weight: 600;
	border: none;
	cursor: pointer;
	transition: all 0.2s;
	text-decoration: none;
}

.btn-primary {
	background: var(--primary);
	color: white;
}

.btn-primary:hover {
	background: var(--primary-light);
}

.btn-primary:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.btn-analyze {
	margin-top: 24px;
	font-size: 1.05rem;
	padding: 14px 36px;
}

/* Loading State */
.loading-state {
	display: none;
	text-align: center;
	padding: 40px;
}

.loading-state.visible {
	display: block;
}

.spinner {
	width: 48px;
	height: 48px;
	border: 4px solid var(--border);
	border-top-color: var(--primary);
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
	margin: 0 auto 20px;
}

@keyframes spin {
	to { transform: rotate(360deg); }
}

.loading-state p {
	color: var(--text-muted);
	font-size: 0.95rem;
}

/* Error Banner */
.error-banner {
	display: none;
	background: #fdf0ef;
	border: 1px solid #f5c6c2;
	border-left: 4px solid var(--danger);
	border-radius: var(--radius);
	padding: 16px 20px;
	margin-bottom: 24px;
	color: var(--danger);
}

.error-banner.visible {
	display: block;
}

/* Results */
.results-section {
	display: none;
}

.results-section.visible {
	display: block;
}

/* Student Card */
.student-card {
	background: var(--primary);
	color: white;
	border-radius: var(--radius);
	padding: 28px 32px;
	margin-bottom: 24px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}

.student-card h2 {
	font-size: 1.6rem;
	margin-bottom: 4px;
	grid-column: 1 / -1;
}

.student-card .meta-item {
	font-size: 0.9rem;
	opacity: 0.85;
}

.student-card .meta-item strong {
	display: block;
	opacity: 1;
	font-size: 1rem;
	margin-top: 2px;
}

.eligibility-tags {
	grid-column: 1 / -1;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 8px;
}

.eligibility-tag {
	background: rgba(255,255,255,0.2);
	border-radius: 20px;
	padding: 4px 14px;
	font-size: 0.85rem;
}

/* Summary Card */
.summary-card {
	background: rgba(91, 140, 90, 0.08);
	border-left: 4px solid var(--secondary);
	border-radius: var(--radius);
	padding: 24px 28px;
	margin-bottom: 24px;
}

.summary-card p {
	font-size: 1.05rem;
	line-height: 1.7;
	color: var(--text);
}

/* Section Cards */
.card {
	background: var(--surface);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 28px;
	margin-bottom: 20px;
}

/* Collapsible card headers */
details.card {
	padding: 0;
}

details.card > summary.card-header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 0;
	padding: 22px 28px;
	border-bottom: none;
	cursor: pointer;
	user-select: none;
	list-style: none;
	transition: background 0.2s;
	border-radius: var(--radius);
}

details.card[open] > summary.card-header {
	border-bottom: 2px solid var(--bg);
	border-radius: var(--radius) var(--radius) 0 0;
}

details.card > summary.card-header:hover {
	background: var(--bg);
}

details.card > summary.card-header::-webkit-details-marker {
	display: none;
}

details.card > summary.card-header::marker {
	content: '';
}

.card-header .icon {
	font-size: 1.4rem;
}

.card-header h3 {
	font-size: 1.15rem;
	color: var(--primary);
	flex: 1;
}

/* Chevron indicator */
.chevron {
	width: 20px;
	height: 20px;
	position: relative;
	flex-shrink: 0;
	transition: transform 0.3s ease;
}

.chevron::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 9px;
	height: 9px;
	border-right: 2.5px solid var(--text-muted);
	border-bottom: 2.5px solid var(--text-muted);
	transform: translate(-50%, -65%) rotate(45deg);
	transition: transform 0.3s ease, border-color 0.2s;
}

details.card[open] > summary .chevron::before {
	transform: translate(-50%, -35%) rotate(-135deg);
}

details.card > summary:hover .chevron::before {
	border-color: var(--primary);
}

/* Card body (content area inside details) */
.card-body {
	padding: 20px 28px 28px;
}

/* List Styles */
.item-list {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.item-list li {
	padding: 10px 14px;
	background: var(--bg);
	border-radius: 8px;
	font-size: 0.95rem;
	line-height: 1.5;
}

.item-list li::before {
	content: '✓ ';
	color: var(--secondary);
	font-weight: bold;
}

/* Goals */
.goal-item {
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 18px;
	margin-bottom: 14px;
}

.goal-item:last-child {
	margin-bottom: 0;
}

.goal-area {
	display: inline-block;
	background: var(--primary);
	color: white;
	border-radius: 20px;
	padding: 3px 14px;
	font-size: 0.8rem;
	font-weight: 600;
	margin-bottom: 10px;
}

.goal-item h4 {
	font-size: 1rem;
	margin-bottom: 10px;
	color: var(--text);
}

.goal-meta {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin-top: 10px;
}

.goal-meta-item {
	background: var(--bg);
	border-radius: 6px;
	padding: 10px 12px;
	font-size: 0.88rem;
}

.goal-meta-item .label {
	font-weight: 600;
	color: var(--text-muted);
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	margin-bottom: 4px;
}

/* Services Table */
.services-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9rem;
}

.services-table th {
	background: var(--bg);
	padding: 10px 12px;
	text-align: left;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--text-muted);
	border-bottom: 2px solid var(--border);
}

.services-table td {
	padding: 12px;
	border-bottom: 1px solid var(--border);
	vertical-align: top;
}

.services-table tr:last-child td {
	border-bottom: none;
}

/* Tips & Flags */
.tip-item {
	display: flex;
	gap: 12px;
	padding: 14px;
	background: var(--bg);
	border-radius: 8px;
	margin-bottom: 10px;
	font-size: 0.95rem;
	line-height: 1.5;
}

.tip-item:last-child {
	margin-bottom: 0;
}

.tip-icon {
	font-size: 1.1rem;
	flex-shrink: 0;
	margin-top: 1px;
}

.flag-item {
	display: flex;
	gap: 12px;
	padding: 14px;
	background: #fffbf0;
	border: 1px solid #f0d070;
	border-radius: 8px;
	margin-bottom: 10px;
	font-size: 0.95rem;
	line-height: 1.5;
}

/* Team Members */
.team-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 10px;
}

.team-member {
	background: var(--bg);
	border-radius: 8px;
	padding: 10px 14px;
	font-size: 0.88rem;
}

/* Key Dates */
.dates-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 14px;
}

.date-item {
	background: var(--bg);
	border-radius: 8px;
	padding: 16px;
}

.date-item .label {
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--text-muted);
	margin-bottom: 6px;
}

.date-item .value {
	font-size: 1.05rem;
	font-weight: 600;
	color: var(--primary);
}

/* Print Button */
.actions-bar {
	display: flex;
	gap: 12px;
	margin-bottom: 28px;
	flex-wrap: wrap;
}

.btn-outline {
	background: transparent;
	border: 2px solid var(--primary);
	color: var(--primary);
}

.btn-outline:hover {
	background: var(--primary);
	color: white;
}

/* Location Info */
.location-info {
	font-size: 0.85rem;
	color: var(--text-muted);
	margin-top: 4px;
}

/* Footer */
.site-footer {
	text-align: center;
	padding: 40px 20px;
	color: var(--text-muted);
	font-size: 0.85rem;
	margin-top: 60px;
	border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 600px) {
	.student-card {
		grid-template-columns: 1fr;
	}

	.goal-meta {
		grid-template-columns: 1fr;
	}

	.upload-section {
		padding: 24px 16px;
	}

	.card {
		padding: 20px 16px;
	}

	.services-table {
		font-size: 0.82rem;
	}

	.services-table th,
	.services-table td {
		padding: 8px;
	}
}

@media print {
	.upload-section,
	.actions-bar,
	.site-header .tagline {
		display: none;
	}

	.card {
		box-shadow: none;
		border: 1px solid var(--border);
		break-inside: avoid;
	}
}
