/* Learning in Public — Public Styles
   Colors and typography inherit from the active theme.
   Only layout, spacing, and component-specific styles are defined here.
*/

/* ── CSS Custom Properties ───────────────────────────────────────────── */
.lip-dashboard {
	--lip-done:        #2ecc71;
	--lip-done-text:   #fff;
	--lip-freeze:      #7ecef4;
	--lip-freeze-text: #fff;
	--lip-missed:      #bdc3c7;
	--lip-missed-text: #6c7a7d;
	--lip-today-ring:  currentColor;
	--lip-radius:      8px;
	--lip-gap:         0.4rem;

	font-family: inherit;
	max-width: 680px;
	margin: 0 auto 2rem;
}

/* ── Stats Row ───────────────────────────────────────────────────────── */
.lip-stats {
	display: flex;
	gap: 1rem;
	margin-bottom: 1.5rem;
}

.lip-stat {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 0.75rem 0.5rem;
	border: 1px solid currentColor;
	border-radius: var(--lip-radius);
	opacity: 0.85;
}

.lip-stat-value {
	font-size: 2rem;
	font-weight: 700;
	line-height: 1;
}

.lip-stat-label {
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-top: 0.25rem;
	opacity: 0.7;
}

/* ── Goal Bar ────────────────────────────────────────────────────────── */
.lip-goal-bar {
	height: 6px;
	background: rgba(0,0,0,0.08);
	border-radius: 3px;
	overflow: hidden;
	margin-bottom: 0.25rem;
}

.lip-goal-progress {
	height: 100%;
	background: var(--lip-done);
	border-radius: 3px;
	transition: width 0.4s ease;
}

.lip-goal-label {
	font-size: 0.75rem;
	opacity: 0.65;
	margin: 0 0 1rem;
}

/* ── Calendar Navigation ─────────────────────────────────────────────── */
.lip-calendar-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 0.75rem;
}

.lip-month-title {
	font-size: 1.1rem;
	font-weight: 600;
}

.lip-nav-btn {
	background: none;
	border: 1px solid currentColor;
	border-radius: 50%;
	width: 2rem;
	height: 2rem;
	cursor: pointer;
	font-size: 1rem;
	line-height: 1;
	opacity: 0.6;
	transition: opacity 0.15s;
}

.lip-nav-btn:hover:not(:disabled) {
	opacity: 1;
}

.lip-nav-btn:disabled {
	opacity: 0.2;
	cursor: not-allowed;
}

/* ── Calendar Grid ───────────────────────────────────────────────────── */
.lip-calendar-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: var(--lip-gap);
	margin-bottom: 1.25rem;
}

.lip-day-header {
	text-align: center;
	font-size: 0.65rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	opacity: 0.5;
	padding-bottom: 0.25rem;
}

.lip-day-cell {
	position: relative;
	aspect-ratio: 1;
	border-radius: calc(var(--lip-radius) - 2px);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.75rem;
	font-weight: 500;
	cursor: default;
	transition: transform 0.1s, box-shadow 0.1s;
}

.lip-day-empty {
	background: transparent;
}

/* Status Colors */
.lip-status-done {
	background: var(--lip-done);
	color: var(--lip-done-text);
}

.lip-status-freeze {
	background: var(--lip-freeze);
	color: var(--lip-freeze-text);
}

.lip-status-missed {
	background: var(--lip-missed);
	color: var(--lip-missed-text);
}

.lip-status-unrecorded {
	background: rgba(0,0,0,0.05);
	color: inherit;
}

.lip-status-future {
	background: transparent;
	opacity: 0.25;
}

.lip-status-pre-start {
	background: transparent;
	opacity: 0.1;
}

/* Today ring */
.lip-day-today {
	box-shadow: 0 0 0 2px var(--lip-today-ring);
}

/* ── Milestones ──────────────────────────────────────────────────────── */
.lip-milestones {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem;
	margin-bottom: 1rem;
}

.lip-milestones-label {
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	opacity: 0.55;
	margin-right: 0.25rem;
}

.lip-milestone {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.2rem;
	padding: 0.2rem 0.4rem;
	border-radius: 999px;
	font-size: 0.7rem;
	font-weight: 600;
	border: 1px solid currentColor;
	opacity: 0.25;
}

.lip-milestone-reached {
	background: var(--lip-done);
	color: var(--lip-done-text);
	border-color: var(--lip-done);
	opacity: 1;
}

.lip-milestone-next {
	border-color: currentColor;
	opacity: 0.7;
}

/* ── Freeze Bar ──────────────────────────────────────────────────────── */
.lip-freeze-bar {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	font-size: 0.75rem;
	opacity: 0.7;
}

.lip-freeze-dots {
	display: flex;
	gap: 0.3rem;
}

.lip-freeze-dot {
	width: 0.6rem;
	height: 0.6rem;
	border-radius: 50%;
	display: inline-block;
}

.lip-freeze-dot-free {
	background: var(--lip-freeze);
}

.lip-freeze-dot-used {
	background: rgba(0,0,0,0.12);
}

/* ── Overview ────────────────────────────────────────────────────────── */
.lip-overview {
	--lip-done:        #2ecc71;
	--lip-ov-radius:   8px;
	--lip-ov-card-bg:  transparent;
	--lip-ov-border:   1px solid currentColor;

	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 1.25rem;
}

.lip-ov-card {
	border: var(--lip-ov-border);
	border-radius: var(--lip-ov-radius);
	background: var(--lip-ov-card-bg);
	padding: 1.25rem;
	opacity: 0.9;
	transition: opacity 0.15s, transform 0.15s;
}

.lip-ov-card:hover {
	opacity: 1;
	transform: translateY(-2px);
}

.lip-ov-name {
	margin: 0 0 0.5rem;
	font-size: 1.1rem;
}

.lip-ov-desc {
	margin: 0 0 0.75rem;
	font-size: 0.85rem;
	opacity: 0.65;
}

.lip-ov-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.lip-ov-stat {
	font-size: 0.8rem;
}

.lip-ov-last {
	width: 100%;
	opacity: 0.6;
}

.lip-ov-progress {
	margin-top: 0.75rem;
	height: 4px;
	background: rgba(0,0,0,0.08);
	border-radius: 2px;
	overflow: hidden;
}

.lip-ov-progress-bar {
	height: 100%;
	background: rgba(0,0,0,0.15);
	border-radius: 2px;
	transition: background 0.25s ease;
}

.lip-ov-card:hover .lip-ov-progress-bar {
	background: var(--lip-done);
}

.lip-ov-progress-label {
	display: block;
	font-size: 0.7rem;
	opacity: 0.55;
	margin-top: 0.3rem;
}

/* ── Loading state ───────────────────────────────────────────────────── */
.lip-calendar-wrapper.lip-loading {
	opacity: 0.5;
	pointer-events: none;
}

@media (max-width: 480px) {
	.lip-stats {
		gap: 0.5rem;
	}
	.lip-stat-value {
		font-size: 1.5rem;
	}
	.lip-day-cell {
		font-size: 0.65rem;
	}
}
