/*
 * ALC LMS Design System - Apple HIG (Human Interface Guidelines) Inspired
 * Clean typography, translucent glassmorphism, smooth continuous curves, and refined micro-interactions.
 */

:root {
	/* Canvas & Surfaces */
	--color-bg: #f5f5f7; /* Apple signature off-white cool canvas */
	--color-card-bg: #ffffff;
	--color-surface-glass: rgba(255, 255, 255, 0.72);
	--color-surface-subtle: rgba(0, 0, 0, 0.03);
	
	/* Typography Colors */
	--color-text-primary: #1d1d1f; /* Apple primary dark text */
	--color-text-secondary: #515154; /* Apple secondary slate text */
	--color-text-muted: #86868b; /* Apple tertiary grey */
	--color-text-main: #1d1d1f;
	
	/* Apple Palette System */
	--color-brand-blue: #0071e3; /* Apple Vibrant Blue */
	--color-brand-blue-hover: #0077ed;
	--color-brand-blue-light: #e8f2ff;
	
	--color-mastered: #34c759;      /* Apple Mint Green */
	--color-mastered-dark: #248a3d;
	--color-mastered-light: #eafbe8;
	
	--color-working: #ff9500;       /* Apple Amber */
	--color-working-dark: #c27100;
	--color-working-light: #fff5e5;
	
	--color-attention: #ff3b30;     /* Apple Coral Red */
	--color-attention-dark: #c92a2a;
	--color-attention-light: #ffebe9;
	
	--color-indigo: #5856d6;
	--color-teal: #30b0c7;
	--color-border: rgba(0, 0, 0, 0.08); /* Delicate Apple hair-line border */
	--color-border-subtle: rgba(0, 0, 0, 0.05);
	
	/* Font Families */
	--font-headers: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Outfit', 'Inter', system-ui, sans-serif;
	--font-body: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', system-ui, sans-serif;
	
	/* Apple Continuous Curvature Radii */
	--radius-sm: 10px;
	--radius-md: 16px;
	--radius-lg: 22px;
	--radius-xl: 28px;
	--radius-round: 9999px;
	
	/* Soft Elevation Shadows */
	--shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.04);
	--shadow-md: 0 8px 24px rgba(0, 0, 0, 0.04), 0 2px 6px rgba(0, 0, 0, 0.02);
	--shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.03);
	--shadow-xl: 0 24px 60px rgba(0, 0, 0, 0.08), 0 8px 20px rgba(0, 0, 0, 0.04);
	
	/* Timing Curves */
	--transition-fast: 0.15s cubic-bezier(0.2, 0, 0, 1);
	--transition-normal: 0.25s cubic-bezier(0.2, 0, 0, 1);
	--transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Global Canvas */
* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	background-color: var(--color-bg);
	color: var(--color-text-primary);
	font-family: var(--font-body);
	line-height: 1.47059;
	font-weight: 400;
	letter-spacing: -0.022em;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-headers);
	font-weight: 700;
	color: var(--color-text-primary);
	letter-spacing: -0.025em;
}

/* Apple Minimal Webkit Scrollbar */
::-webkit-scrollbar {
	width: 6px;
	height: 6px;
}
::-webkit-scrollbar-track {
	background: transparent;
}
::-webkit-scrollbar-thumb {
	background: rgba(0, 0, 0, 0.15);
	border-radius: var(--radius-round);
}
::-webkit-scrollbar-thumb:hover {
	background: rgba(0, 0, 0, 0.3);
}

/* Layout Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

.w-100 { width: 100%; }

/* Card Component (Apple Surface Card) */
.card {
	background-color: var(--color-card-bg);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
	padding: 24px;
	border: 1px solid var(--color-border);
	transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.card-hover:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-md);
}

/* Apple Glassmorphic Card */
.apple-glass-card {
	background: var(--color-surface-glass);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border-radius: var(--radius-lg);
	border: 1px solid rgba(255, 255, 255, 0.6);
	box-shadow: var(--shadow-sm);
}

/* Button Components */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: var(--font-body);
	font-weight: 600;
	font-size: 13px;
	padding: 10px 18px;
	border-radius: var(--radius-sm);
	border: 1px solid transparent;
	cursor: pointer;
	transition: all var(--transition-fast);
	text-decoration: none;
	user-select: none;
}

.btn:active {
	transform: scale(0.97);
}

.btn-primary {
	background-color: var(--color-brand-blue);
	color: #ffffff;
	border-color: var(--color-brand-blue);
	box-shadow: 0 2px 8px rgba(0, 113, 227, 0.25);
}
.btn-primary:hover {
	background-color: var(--color-brand-blue-hover);
	border-color: var(--color-brand-blue-hover);
	box-shadow: 0 4px 12px rgba(0, 113, 227, 0.35);
}

.btn-secondary {
	background-color: rgba(120, 120, 128, 0.12);
	color: var(--color-text-primary);
	border-color: transparent;
}
.btn-secondary:hover {
	background-color: rgba(120, 120, 128, 0.2);
}

.btn-outline {
	background-color: #ffffff;
	border-color: var(--color-border);
	color: var(--color-text-primary);
}
.btn-outline:hover {
	background-color: var(--color-bg);
	border-color: rgba(0, 0, 0, 0.15);
}

.btn-danger {
	background-color: var(--color-attention-light);
	color: var(--color-attention-dark);
	border-color: rgba(255, 59, 48, 0.2);
}
.btn-danger:hover {
	background-color: #ff3b30;
	color: #ffffff;
}

/* Form Controls (Apple HIG Style) */
.form-group {
	margin-bottom: 18px;
}

.form-label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	color: var(--color-text-secondary);
	margin-bottom: 6px;
	letter-spacing: -0.01em;
}

.form-control {
	width: 100%;
	padding: 10px 14px;
	font-size: 13px;
	font-family: var(--font-body);
	color: var(--color-text-primary);
	background-color: rgba(255, 255, 255, 0.8);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-sm);
	transition: all var(--transition-fast);
	outline: none;
}

.form-control:focus {
	background-color: #ffffff;
	border-color: var(--color-brand-blue);
	box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15);
}

/* Apple Segmented Control Container */
.apple-segmented-control {
	display: inline-flex;
	background: rgba(120, 120, 128, 0.12);
	padding: 3px;
	border-radius: var(--radius-sm);
	gap: 2px;
}

.apple-segmented-control button {
	border: none;
	background: transparent;
	padding: 6px 14px;
	font-size: 12px;
	font-weight: 600;
	border-radius: 7px;
	color: var(--color-text-secondary);
	cursor: pointer;
	transition: all var(--transition-fast);
}

.apple-segmented-control button.active {
	background: #ffffff;
	color: var(--color-text-primary);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12), 0 0 2px rgba(0, 0, 0, 0.04);
}

/* Modal Overlay & Modal Window */
.modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(0, 0, 0, 0.4);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	overflow-y: auto;
}

.modal-content {
	background-color: #ffffff;
	border-radius: var(--radius-xl);
	box-shadow: var(--shadow-xl);
	width: 100%;
	max-width: 600px;
	max-height: 90vh;
	overflow-y: auto;
	padding: 32px;
	position: relative;
	margin: auto;
	border: 1px solid rgba(0, 0, 0, 0.08);
}

.modal-close {
	position: absolute;
	right: 20px;
	top: 20px;
	background: rgba(120, 120, 128, 0.1);
	border: none;
	cursor: pointer;
	font-size: 14px;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--color-text-secondary);
	transition: all var(--transition-fast);
}
.modal-close:hover {
	background: rgba(120, 120, 128, 0.2);
	color: var(--color-text-primary);
}

/* Accessibility classes */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
