/* JL Planners — Packing List Planner module styles. Layered on jlp-shell.css.
 * Mobile-first; romantic / premium Polish-wedding palette (blush + ivory + warm gold).
 * Includes a print block: when <body> gets .jlp-pl-printing the editor chrome is
 * hidden and the items render as a clean checklist with visible checkboxes. */

.jlp-pl {
	--pl-ink: var(--jlp-ink);
	--pl-muted: var(--jlp-ink-mute);
	--pl-soft: var(--jlp-bg-deep);
	--pl-line: var(--jlp-line);
	--pl-gold: var(--jlp-gold);
	--pl-blush: var(--jlp-blush);
	--pl-blush-deep: var(--jlp-rose);
	--pl-ok: #5C7E55;
	display: flex;
	flex-direction: column;
	gap: 18px;
	font-family: "Manrope", system-ui, -apple-system, sans-serif;
	color: var(--pl-ink);
}

.jlp-pl section { margin: 0; }

.jlp-pl h2, .jlp-pl legend, .jlp-pl .jlp-pl-suggestions__title, .jlp-pl .jlp-pl-next__text {
	font-family: "Cormorant Garamond", Georgia, serif;
}

/* ---------- context bar ---------- */
.jlp-pl-context {
	background: var(--pl-soft);
	border: 1px solid var(--pl-line);
	border-radius: 14px;
	padding: 16px;
}
.jlp-pl-context__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
}
.jlp-pl-flags {
	margin-top: 14px;
	border: 1px dashed var(--pl-line);
	border-radius: 12px;
	padding: 12px 14px;
}
.jlp-pl-flags legend {
	font-size: 1.05rem;
	padding: 0 6px;
	color: var(--pl-muted);
}
.jlp-pl-flags .jlp-pl-flag {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 0;
	font-size: .95rem;
	cursor: pointer;
}
.jlp-pl-flags .jlp-pl-flag input { width: 18px; height: 18px; accent-color: var(--pl-gold); }

/* ---------- progress panel ---------- */
.jlp-pl-progress-panel {
	background: linear-gradient(135deg, var(--pl-blush), var(--jlp-surface) 70%);
	border: 1px solid var(--pl-blush-deep);
	border-radius: 14px;
	padding: 16px;
}
.jlp-pl-progress-panel__headline {
	margin: 0 0 8px;
	font-size: 1.05rem;
	font-weight: 600;
}
.jlp-pl-progress-panel__track {
	height: 12px;
	border-radius: 999px;
	background: var(--jlp-surface);
	border: 1px solid var(--pl-line);
	overflow: hidden;
}
.jlp-pl-progress-panel__fill {
	height: 100%;
	background: linear-gradient(90deg, var(--pl-gold), #cdb188);
	transition: width .3s ease;
}
.jlp-pl-progress-panel__cats {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 12px;
}

/* ---------- chips ---------- */
.jlp-pl-chip {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background: var(--jlp-surface);
	border: 1px solid var(--pl-line);
	border-radius: 999px;
	padding: 4px 10px;
	font-size: .82rem;
	line-height: 1.2;
}
.jlp-pl-chip b { color: var(--pl-gold); font-weight: 700; }
.jlp-pl-chip--add {
	cursor: pointer;
	background: var(--jlp-surface);
	transition: background .15s ease, border-color .15s ease;
}
.jlp-pl-chip--add:hover { background: var(--pl-soft); border-color: var(--pl-gold); }
.jlp-pl-chip--add[hidden] { display: none; }
.jlp-pl-chip__plus {
	margin-left: 2px;
	font-weight: 700;
	color: var(--pl-gold);
}

/* ---------- next best action ---------- */
.jlp-pl-next {
	background: var(--jlp-surface);
	border: 1px solid var(--pl-line);
	border-left: 3px solid var(--pl-gold);
	border-radius: 10px;
	padding: 12px 14px;
}
.jlp-pl-next__eyebrow {
	margin: 0 0 2px;
	text-transform: uppercase;
	letter-spacing: .14em;
	font-size: .68rem;
	color: var(--pl-gold);
	font-weight: 700;
}
.jlp-pl-next__text { margin: 0; font-size: 1.1rem; }

/* ---------- suggestions ---------- */
.jlp-pl-suggestions {
	background: var(--jlp-surface);
	border: 1px solid var(--pl-line);
	border-radius: 14px;
	padding: 16px;
}
.jlp-pl-suggestions__head {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 12px;
}
.jlp-pl-suggestions__title { margin: 0; font-size: 1.25rem; }
.jlp-pl-suggestions__hint { margin: 2px 0 0; font-size: .82rem; color: var(--pl-muted); }
.jlp-pl-suggestions__groups { display: flex; flex-direction: column; gap: 12px; }
.jlp-pl-suggestion-group[hidden] { display: none; }
.jlp-pl-suggestion-group__label {
	margin: 0 0 6px;
	font-size: .72rem;
	text-transform: uppercase;
	letter-spacing: .12em;
	color: var(--pl-muted);
	font-weight: 700;
}
.jlp-pl-suggestion-group__chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- filters ---------- */
.jlp-pl-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 16px;
	align-items: flex-end;
	background: var(--pl-soft);
	border: 1px solid var(--pl-line);
	border-radius: 12px;
	padding: 12px 14px;
	position: sticky;
	top: 0;
	z-index: 4;
}
.jlp-pl-filters .jlp-field--inline { flex: 1 1 150px; }
.jlp-pl-filters__packed { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .85rem; }
.jlp-pl-filters__packed label { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.jlp-pl-filters__recent { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; cursor: pointer; }

/* ---------- items ---------- */
.jlp-pl-items__rows { display: flex; flex-direction: column; }
.jlp-pl-cat-head {
	display: flex;
	align-items: baseline;
	gap: 8px;
	padding: 14px 4px 6px;
	border-bottom: 1px solid var(--pl-line);
	margin-bottom: 4px;
}
.jlp-pl-cat-head[hidden] { display: none; }
.jlp-pl-cat-head__icon { font-size: 1.1rem; }
.jlp-pl-cat-head__label {
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: 1.3rem;
	font-weight: 600;
}
.jlp-pl-cat-head__count {
	margin-left: auto;
	font-size: .78rem;
	font-weight: 700;
	color: var(--pl-muted);
}

.jlp-pl-row {
	display: grid;
	grid-template-columns: auto 1fr;
	grid-template-areas:
		"packed item"
		"packed category"
		"packed owner"
		"packed qty"
		"packed location"
		"packed notes"
		"packed del";
	gap: 6px 10px;
	padding: 10px 6px 14px;
	border-bottom: 1px dotted var(--pl-line);
	align-items: center;
}
.jlp-pl-row[hidden] { display: none; }
.jlp-pl-row.is-packed { opacity: .68; }
.jlp-pl-row__packed { grid-area: packed; align-self: start; padding-top: 4px; }
.jlp-pl-row__packed input { width: 22px; height: 22px; accent-color: var(--pl-ok); }
.jlp-pl-row__cell { display: flex; flex-direction: column; gap: 2px; }
.jlp-pl-row__cell--item { grid-area: item; }
.jlp-pl-row__cell--category { grid-area: category; }
.jlp-pl-row__cell--owner { grid-area: owner; }
.jlp-pl-row__cell--qty { grid-area: qty; }
.jlp-pl-row__cell--location { grid-area: location; }
.jlp-pl-row__cell--notes { grid-area: notes; }
.jlp-pl-row__cell--del { grid-area: del; }
.jlp-pl-row__label {
	font-size: .66rem;
	text-transform: uppercase;
	letter-spacing: .1em;
	color: var(--pl-muted);
	font-weight: 700;
}
.jlp-pl-row__item { font-weight: 600; }
.jlp-pl-row.is-packed .jlp-pl-row__item { text-decoration: line-through; }
.jlp-pl-row__qty { max-width: 7rem; }
.jlp-pl-del {
	border: 1px solid var(--pl-line);
	background: var(--jlp-surface);
	color: var(--pl-muted);
	border-radius: 8px;
	width: 32px;
	height: 32px;
	font-size: 1.1rem;
	line-height: 1;
	cursor: pointer;
}
.jlp-pl-del:hover { color: #a33; border-color: #d9b3b3; }

.jlp-pl-items__add { padding: 14px 4px 4px; }
.jlp-pl-items__add .jlp-pl-additem { width: 100%; }

.jlp-pl-empty-wrap[hidden] { display: none; }
.jlp-pl-nomatch {
	text-align: center;
	color: var(--pl-muted);
	font-style: italic;
	padding: 18px 0;
}

/* ---------- notes ---------- */
.jlp-pl-notes__area { width: 100%; resize: vertical; min-height: 70px; }

/* ---------- recent (last week) ---------- */
.jlp-pl-recent {
	background: var(--jlp-surface);
	border: 1px solid var(--pl-line);
	border-radius: 12px;
	padding: 4px 14px;
}
.jlp-pl-recent > summary {
	cursor: pointer;
	padding: 10px 0;
	font-weight: 600;
}
.jlp-pl-recent__count { color: var(--pl-muted); font-weight: 400; }
.jlp-pl-recent__list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.jlp-pl-recent__list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; font-size: .9rem; }
.jlp-pl-recent__meta { color: var(--pl-muted); font-size: .8rem; }
.jlp-pl-recent__empty { color: var(--pl-muted); font-size: .9rem; padding-bottom: 10px; }
.jlp-pl-recent__empty[hidden] { display: none; }

/* ---------- action bar ---------- */
.jlp-pl-actionbar {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	padding-top: 6px;
}
.jlp-pl-actionbar--locked {
	flex-direction: column;
	align-items: stretch;
	background: var(--pl-blush);
	border: 1px solid var(--pl-blush-deep);
	border-radius: 14px;
	padding: 14px 16px;
}
.jlp-pl-actionbar__note { margin: 0; font-size: .92rem; color: var(--pl-ink); }
.jlp-pl-actionbar__buttons { display: flex; flex-wrap: wrap; gap: 8px; }

.jlp-pl-copy { position: relative; }
.jlp-pl-copy__menu {
	position: absolute;
	left: 0;
	bottom: calc(100% + 6px);
	min-width: 220px;
	background: var(--jlp-surface);
	border: 1px solid var(--pl-line);
	border-radius: 10px;
	box-shadow: 0 16px 40px -20px rgba(42, 31, 26, .35);
	padding: 6px;
	display: flex;
	flex-direction: column;
	gap: 2px;
	z-index: 6;
}
.jlp-pl-copy__menu[hidden] { display: none; }
.jlp-pl-copy__menu button {
	text-align: left;
	background: transparent;
	border: 0;
	padding: 9px 10px;
	border-radius: 7px;
	cursor: pointer;
	font-size: .92rem;
	font-family: inherit;
	color: var(--pl-ink);
}
.jlp-pl-copy__menu button:hover { background: var(--pl-soft); }

/* ---------- public landing extras ---------- */
.jlp-pl-public__perks { margin: 14px 0; padding-left: 1.1em; }
.jlp-pl-public__perks li { margin: 5px 0; }
.jlp-pl-public__cols { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 16px 0; }
.jlp-pl-public__cols ul { list-style: none; margin: 6px 0 0; padding: 0; }
.jlp-pl-public__cols li { padding: 3px 0; font-size: .92rem; }
.jlp-pl-public__cta { font-weight: 600; }

/* ---------- larger screens ---------- */
@media (min-width: 720px) {
	.jlp-pl-context__grid { grid-template-columns: 1fr 1fr; }
	.jlp-pl-flags { display: flex; flex-wrap: wrap; gap: 4px 18px; }
	.jlp-pl-flags legend { width: 100%; }
	.jlp-pl-public__cols { grid-template-columns: 1fr 1fr; }

	.jlp-pl-row {
		grid-template-columns: auto 2.4fr 1.5fr 1.3fr .7fr 1.5fr 1.8fr auto;
		grid-template-areas: "packed item category owner qty location notes del";
		align-items: center;
		column-gap: 10px;
	}
	.jlp-pl-row__label { display: none; }
	.jlp-pl-row__cell--del { justify-self: end; }
}

/* ---------- print: clean checklist for paid users ---------- */
@media print {
	body.jlp-pl-printing .jlp,
	body.jlp-pl-printing .jlp-editor-page__head,
	body.jlp-pl-printing .jlp-editor-page__rail,
	body.jlp-pl-printing .jlp-planner__hero,
	body.jlp-pl-printing .jlp-planner__rail,
	body.jlp-pl-printing .jlp-toasts,
	body.jlp-pl-printing #jlp-paywall { /* keep editor pane visible below */ }

	body.jlp-pl-printing .jlp-pl-context__grid label:nth-child(n+3),
	body.jlp-pl-printing .jlp-pl-flags,
	body.jlp-pl-printing .jlp-pl-suggestions,
	body.jlp-pl-printing .jlp-pl-filters,
	body.jlp-pl-printing .jlp-pl-items__add,
	body.jlp-pl-printing .jlp-pl-recent,
	body.jlp-pl-printing .jlp-pl-actionbar,
	body.jlp-pl-printing .jlp-pl-empty-wrap,
	body.jlp-pl-printing .jlp-pl-nomatch,
	body.jlp-pl-printing .jlp-pl-del,
	body.jlp-pl-printing .jlp-pl-row__label,
	body.jlp-pl-printing .jlp-pl-editor-page__rail,
	body.jlp-pl-printing .jlp-editor-page__rail,
	body.jlp-pl-printing template { display: none !important; }

	body.jlp-pl-printing .jlp-pl-row {
		grid-template-columns: auto 1fr auto;
		grid-template-areas: "packed item notes";
		page-break-inside: avoid;
		opacity: 1;
		border-bottom: 1px solid #999;
		padding: 6px 0;
	}
	body.jlp-pl-printing .jlp-pl-row__cell--category,
	body.jlp-pl-printing .jlp-pl-row__cell--owner,
	body.jlp-pl-printing .jlp-pl-row__cell--qty,
	body.jlp-pl-printing .jlp-pl-row__cell--location { display: none; }
	body.jlp-pl-printing .jlp-pl-row__notes { border: 0; background: transparent; font-size: .8rem; color: #555; }
	body.jlp-pl-printing .jlp-pl-row__item { border: 0; background: transparent; font-weight: 600; }
	body.jlp-pl-printing .jlp-pl-row__packed input {
		width: 16px; height: 16px;
		-webkit-appearance: none; appearance: none;
		border: 1.5px solid #333; border-radius: 3px;
		-webkit-print-color-adjust: exact; print-color-adjust: exact;
	}
	body.jlp-pl-printing .jlp-pl-row.is-packed .jlp-pl-row__packed input::after { content: "✓"; display: block; text-align: center; line-height: 13px; font-size: 12px; }
	body.jlp-pl-printing .jlp-pl-row.is-packed .jlp-pl-row__item { text-decoration: none; }
	body.jlp-pl-printing .jlp-pl-cat-head { border-bottom: 2px solid #333; page-break-after: avoid; }
	body.jlp-pl-printing .jlp-pl-progress-panel { border: 1px solid #999; }
	body.jlp-pl-printing .jlp-pl-progress-panel__fill { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
	body.jlp-pl-printing .jlp-pl-next { display: none; }
}
