/*
 * Self-contained palette so the tool looks the same inside any theme
 * (same approach as the other EducationalEngine generators).
 */
.ee-pres-app {
	--ee-pres-bg: #ffffff;
	--ee-pres-surface: #f1f5f9;
	--ee-pres-text: #1e293b;
	--ee-pres-muted: #52606d;
	--ee-pres-border: #cbd5e1;
	--ee-pres-accent: #1d4ed8;
	--ee-pres-accent-hover: #1e40af;
	--ee-pres-correct: #15803d;
	--ee-pres-correct-bg: #f0fdf4;
	--ee-pres-danger: #b91c1c;
	--ee-pres-danger-bg: #fef2f2;

	max-width: 900px;
	margin: 0 auto 48px;
	padding: 24px;
	background: var(--ee-pres-bg);
	border: 1px solid var(--ee-pres-border);
	border-radius: 10px;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
	color: var(--ee-pres-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	line-height: 1.5;
}
.ee-pres-app * { box-sizing: border-box; }
.ee-pres-app button, .ee-pres-app input, .ee-pres-app select, .ee-pres-app textarea {
	font-family: inherit; box-shadow: none; text-shadow: none; background-image: none;
}

.ee-pres-quota-bar {
	display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center;
	background: var(--ee-pres-surface); border: 1px solid var(--ee-pres-border); border-radius: 6px;
	padding: 10px 16px; margin-bottom: 16px; font-size: 0.9em;
}
.ee-pres-quota-label { font-weight: 700; }
.ee-pres-quota-count { color: var(--ee-pres-muted); }
.ee-pres-quota-count a { color: var(--ee-pres-accent); }

.ee-pres-tabs { display: flex; gap: 8px; margin-bottom: 20px; border-bottom: 1px solid var(--ee-pres-border); }
.ee-pres-tab {
	background: transparent !important; border: 0; border-bottom: 3px solid transparent; color: var(--ee-pres-muted) !important;
	padding: 8px 12px; font-weight: 600; cursor: pointer; margin-bottom: -1px;
}
.ee-pres-tab.is-active { color: var(--ee-pres-accent) !important; border-bottom-color: var(--ee-pres-accent); }
.ee-pres-panel { display: none; }
.ee-pres-panel.is-active { display: block; }

.ee-pres-field { margin-bottom: 14px; flex: 1 1 0; min-width: 0; }
.ee-pres-field label, .ee-pres-sizes legend { display: block; font-weight: 600; font-size: 0.9em; margin-bottom: 4px; color: var(--ee-pres-text); }
.ee-pres-field input, .ee-pres-field select, .ee-pres-field textarea {
	width: 100%; padding: 8px 10px; height: auto; min-height: 40px; border: 1px solid var(--ee-pres-border); border-radius: 6px;
	background: #fff !important; color: var(--ee-pres-text) !important; font-size: 0.95em;
}
.ee-pres-row { display: flex; gap: 12px; flex-wrap: wrap; }
.ee-pres-row .ee-pres-field { min-width: 180px; }
.ee-pres-hint { font-size: 0.82em; color: var(--ee-pres-muted); margin: 4px 0 0; }

.ee-pres-sizes { min-width: 0; border: 0; padding: 0; margin: 4px 0 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.ee-pres-sizes legend { width: 100%; }
.ee-pres-styles { border: 0; padding: 0; margin: 4px 0 12px; display: grid; gap: 6px; }
.ee-pres-styles legend { display: block; font-weight: 600; font-size: 0.9em; margin-bottom: 4px; color: var(--ee-pres-text); }
.ee-pres-style { display: flex; align-items: flex-start; gap: 8px; border: 1px solid var(--ee-pres-border, #cbd5e1); border-radius: 8px; padding: 8px 12px; cursor: pointer; font-size: 0.92em; }
.ee-pres-style input { width: auto; min-height: 0; margin: 3px 0 0; }
.ee-pres-style:has(input:checked) { border-color: var(--ee-pres-accent); background: #eff6ff; }
.ee-pres-size {
	display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--ee-pres-border); border-radius: 8px;
	padding: 8px 12px; cursor: pointer; background: #fff;
}
.ee-pres-size input { width: auto; min-height: 0; margin: 0; }
.ee-pres-size:has(input:checked) { border-color: var(--ee-pres-accent); background: #eff6ff; }
.ee-pres-size-cost { font-size: 0.8em; color: var(--ee-pres-accent); font-weight: 700; }

.ee-pres-btn {
	display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 6px; cursor: pointer;
	border: 1px solid var(--ee-pres-border); background: #fff !important; color: var(--ee-pres-text) !important;
	font-weight: 600; font-size: 0.9em; text-decoration: none !important; line-height: 1.2;
}
.ee-pres-btn:hover { border-color: var(--ee-pres-accent); color: var(--ee-pres-accent) !important; }
.ee-pres-btn-primary { background: var(--ee-pres-accent) !important; border-color: var(--ee-pres-accent); color: #fff !important; padding: 10px 18px; font-size: 1em; }
.ee-pres-btn-primary:hover { background: var(--ee-pres-accent-hover) !important; color: #fff !important; }
.ee-pres-btn[disabled] { opacity: 0.6; cursor: wait; }
.ee-pres-btn-small { padding: 5px 10px; font-size: 0.82em; }
.ee-pres-cost-badge { background: rgba(255, 255, 255, 0.2); border-radius: 999px; padding: 2px 8px; font-size: 0.8em; }

.ee-pres-status { margin: 14px 0 0; font-weight: 600; color: var(--ee-pres-accent); }
.ee-pres-status.is-error, .ee-pres-error { color: var(--ee-pres-danger); }
.ee-pres-result { margin-top: 18px; }

.ee-pres-list { list-style: none; padding: 0; margin: 0 0 16px; }
.ee-pres-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--ee-pres-border); }
.ee-pres-view-btn { background: none !important; border: 0; padding: 0; color: var(--ee-pres-accent) !important; font-weight: 600; cursor: pointer; text-align: left; }
.ee-pres-list-meta { color: var(--ee-pres-muted); font-size: 0.85em; }

.ee-pres-deck-header h3 { margin: 0 0 4px; }
.ee-pres-deck-meta { color: var(--ee-pres-muted); font-size: 0.9em; margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ee-pres-upsell-source-note { font-size: 0.85em; font-style: italic; color: var(--ee-pres-muted); margin: 0 0 6px; }
.ee-pres-permalink { font-size: 0.85em; margin: 0 0 10px; }

.ee-pres-incomplete { background: #fffbeb; border: 1px solid #fcd34d; border-radius: 8px; padding: 12px 14px; margin: 10px 0; }
.ee-pres-incomplete p { margin: 0 0 8px; }

.ee-pres-toolbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 12px 0 18px; padding: 10px 0; border-top: 1px solid var(--ee-pres-border); border-bottom: 1px solid var(--ee-pres-border); }
.ee-pres-toolbar-label { font-size: 0.82em; color: var(--ee-pres-muted); margin-left: 8px; }

.ee-pres-disclaimer { font-size: 0.8em; color: var(--ee-pres-muted); margin-top: 16px; }

@media (max-width: 600px) {
	.ee-pres-app { padding: 16px; }
	.ee-pres-toolbar-label { width: 100%; margin: 4px 0 0; }
}

/* PDF upload. */
.ee-pres-label { display: block; font-weight: 600; font-size: 0.9em; margin-bottom: 4px; }
.ee-pres-pdf-picker { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ee-pres-pdf-picker[hidden], .ee-pres-pdf-chip[hidden], .ee-pres-pdf-preview[hidden] { display: none; }
.ee-pres-pdf-input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.ee-pres-pdf-input:focus-visible + .ee-pres-pdf-btn { outline: 2px solid var(--ee-pres-accent); outline-offset: 2px; }
.ee-pres-pdf-btn.is-busy { opacity: 0.6; pointer-events: none; }
.ee-pres-pdf-status { font-size: 0.85em; color: var(--ee-pres-accent); margin-top: 6px; }
.ee-pres-pdf-status:empty { display: none; }
.ee-pres-pdf-status.is-error { color: var(--ee-pres-danger); font-weight: 600; }
.ee-pres-pdf-chip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; border: 1px solid var(--ee-pres-border); background: var(--ee-pres-surface); border-radius: 8px; padding: 8px 12px; }
.ee-pres-pdf-name { font-weight: 700; word-break: break-all; }
.ee-pres-pdf-name::before { content: "PDF"; font-size: 0.7em; font-weight: 800; color: #fff; background: var(--ee-pres-danger); border-radius: 3px; padding: 1px 5px; margin-right: 8px; vertical-align: middle; }
.ee-pres-pdf-meta { color: var(--ee-pres-muted); font-size: 0.85em; }
.ee-pres-link { background: none !important; border: 0; padding: 0; color: var(--ee-pres-accent) !important; font-weight: 600; font-size: 0.85em; cursor: pointer; text-decoration: underline; }
.ee-pres-pdf-preview { margin-top: 8px; max-height: 260px; overflow: auto; white-space: pre-wrap; font-size: 0.85em; border: 1px solid var(--ee-pres-border); border-radius: 6px; padding: 10px 12px; background: #fff; }

/* Themes picker. */
.ee-pres-themes { min-width: 0; border: 0; padding: 0; margin: 4px 0 14px; display: flex; flex-wrap: wrap; gap: 10px; }
.ee-pres-themes legend { width: 100%; display: block; font-weight: 600; font-size: 0.9em; margin-bottom: 4px; }
.ee-pres-themes .ee-pres-hint { width: 100%; }
.ee-pres-theme { position: relative; display: inline-flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; border: 2px solid transparent; border-radius: 10px; padding: 6px; font-size: 0.85em; }
.ee-pres-theme input { position: absolute; left: 0; top: 0; opacity: 0; width: 1px; height: 1px; margin: 0; }
.ee-pres-theme:has(input:checked) { border-color: var(--ee-pres-accent); background: #eff6ff; }
.ee-pres-theme:has(input:focus-visible) { outline: 2px solid var(--ee-pres-accent); outline-offset: 2px; }
.ee-pres-swatch { position: relative; display: block; width: 112px; height: 63px; border: 1px solid; border-radius: 6px; overflow: hidden; }
.ee-pres-swatch span:first-child { position: absolute; left: 0; top: 0; bottom: 0; width: 30%; }
.ee-pres-swatch span:nth-child(2) { position: absolute; left: 38%; top: 58%; width: 26%; height: 5px; border-radius: 2px; }
.ee-pres-swatch em { position: absolute; left: 38%; top: 14%; font-style: normal; font-weight: 700; font-size: 20px; line-height: 1; }
.ee-pres-theme-name { font-weight: 600; color: var(--ee-pres-text); }

/* Deck view. */
.ee-pres-deck-header h3 { margin: 0 0 4px; }
.ee-pres-deck-meta { color: var(--ee-pres-muted); font-size: 0.9em; margin: 0 0 6px; }
.ee-pres-incomplete-msg.is-error { color: var(--ee-pres-danger); font-weight: 600; }
.ee-pres-outline { margin-top: 10px; font-size: 0.9em; }
.ee-pres-outline summary { cursor: pointer; font-weight: 600; }
.ee-pres-outline ol { margin: 6px 0 0 1.4em; padding: 0; }
.ee-pres-outline li.is-done { color: var(--ee-pres-correct); }
.ee-pres-outline li.is-done::marker { content: "✓ "; }
.ee-pres-theme-switch { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; }
.ee-pres-theme-btn { width: 30px; height: 30px; padding: 3px; border-radius: 50%; border: 2px solid transparent; background: transparent !important; cursor: pointer; }
.ee-pres-theme-btn.is-active { border-color: var(--ee-pres-accent); }
.ee-pres-theme-btn:focus-visible { outline: 2px solid var(--ee-pres-accent); outline-offset: 1px; }
.ee-pres-theme-btn[disabled] { opacity: 0.5; cursor: wait; }
.ee-pres-dot { display: block; width: 100%; height: 100%; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25); }
.ee-pres-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ee-pres-open-hint { margin: -8px 0 16px; }

/* Slide preview: positions are % of the slide, sizes in container-query units (see EE_PRES_Preview). */
.ee-pres-slides { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; counter-reset: ee-pres-slide; }
.ee-pres-slide-item { counter-increment: ee-pres-slide; }
.ee-pres-slide { position: relative; width: 100%; aspect-ratio: 16 / 9; container-type: inline-size; border-radius: 6px; overflow: hidden; box-shadow: 0 1px 4px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(15, 23, 42, 0.08); }
.ee-pres-canvas { position: absolute; inset: 0; }
.ee-pres-shape { position: absolute; box-sizing: border-box; margin: 0; }
.ee-pres-text { display: flex; flex-direction: column; overflow: hidden; font-weight: 400; letter-spacing: 0; text-transform: none; }
.ee-pres-p { margin: 0; line-height: 1.2; position: relative; overflow-wrap: break-word; }
.ee-pres-p.is-bullet::before { content: "•"; position: absolute; left: 0.25em; color: var(--ee-pres-bullet, currentColor); }
.ee-pres-notes { margin-top: 6px; font-size: 0.88em; }
.ee-pres-notes summary { cursor: pointer; color: var(--ee-pres-muted); font-weight: 600; }
.ee-pres-notes summary::before { content: counter(ee-pres-slide) ". "; }
.ee-pres-notes-body { margin-top: 6px; padding: 10px 12px; background: var(--ee-pres-surface); border-radius: 6px; white-space: normal; }
.ee-pres-slide .ee-pres-img { max-width: none !important; object-fit: contain; border: 0; border-radius: 0; box-shadow: none; padding: 0; }
.ee-pres-check label { display: flex; gap: 8px; align-items: center; font-weight: 600; font-size: 0.9em; }
.ee-pres-check input { width: auto; min-height: 0; margin: 0; }
.ee-pres-upsells { margin-top: 24px; display: grid; gap: 10px; }
