.food-planner {
	width: 100%;
	font-family: inherit;
	box-sizing: border-box;
}

.food-planner--logged-out {
	text-align: center;
}

/* Layout */
.fp-layout {
	--fp-size: 2rem;
	--fp-grid-columns: var(--fp-size) minmax(0, 2fr) minmax(0, 0.5fr) var(--fp-size) minmax(10rem, 2fr) var(--fp-size);
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.fp-heading {
	margin: 0;
	font-size: 1.6rem;
	font-weight: 600;
}

.fp-list-name {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0 0 1rem;
}

.fp-list-name__label {
	font-weight: 600;
}
.fp-field--name{
	font-size: 2rem;
}

.fp-list-name__input {
	
	font-size: 3rem;
}

.fp-list-name__value {
	font-weight: 600;
	color: #1d2327;
}

.fp-list-name__save {
	white-space: nowrap;
}

/* Guest mode */
.fp-guest-alert {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
	padding: 0.75rem 1rem;
	border: 1px solid #ccd0d4;
	border-radius: 6px;
	background: #f5f7f9;
	color: #2c3338;
	font-size: 0.95rem;
}

.fp-guest-alert__message {
	margin: 0;
	flex: 1 1 240px;
}

.fp-button--login {
	background: #3c434a;
}

.fp-button--login:hover,
.fp-button--login:focus {
	background: #1d2327;
}

.food-planner[data-fp-auth="logged-in"] .fp-guest-alert {
	display: none;
}

/* Share controls */
.fp-share-trigger {
	display: flex;
	justify-content: flex-end;
}

.fp-share-button {
	white-space: nowrap;
}

.fp-dashboard-trigger {
	display: flex;
	justify-content: flex-end;
}

.fp-dashboard-button {
	white-space: nowrap;
}

.food-planner[data-fp-auth="logged-out"] .fp-dashboard-trigger {
	display: none;
}

.food-planner[data-fp-owner="0"] .fp-share-trigger,
.food-planner[data-fp-owner="0"] [data-fp-dialog$="-share-dialog"] {
	display: none !important;
}

.fp-dashboard-dialog {
	max-width: 720px;
	width: min(100%, 720px);
}

.fp-share-dialog {
	max-width: 560px;
}

.fp-share-dialog__title {
	margin: 0 0 0.5rem;
	font-size: 1.3rem;
	font-weight: 600;
}

.fp-share {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.fp-share__help {
	margin: 0;
	color: #555d66;
	font-size: 0.95rem;
}

.fp-share__form {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}

.fp-share__input,
.fp-share__select {
	min-width: 10rem;
}

.fp-share__status {
	margin: 0;
	font-size: 0.95rem;
	color: #555;
	min-height: 1.2rem;
}

.fp-share__status[data-fp-status="error"] {
	color: #b32d2e;
}

.fp-share__status[data-fp-status="success"] {
	color: #278a30;
}

.fp-share__lists {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1rem;
}

.fp-share__section {
	border: 1px solid #e2e4e7;
	border-radius: 6px;
	padding: 0.75rem;
	background: #fff;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	min-height: 150px;
}

.fp-share__section-title {
	margin: 0;
	font-size: 1rem;
	font-weight: 600;
}

.fp-share__empty {
	margin: 0;
	color: #68707a;
	font-size: 0.9rem;
}

.fp-share-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.fp-share-list__item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.75rem;
	padding: 0.4rem 0;
	border-bottom: 1px solid #f0f2f4;
}

.fp-share-list__item:last-child {
	border-bottom: none;
}

.fp-share-list__name {
	font-weight: 500;
	color: #1d2327;
	word-break: break-all;
}

.fp-share-list__meta {
	font-size: 0.75rem;
	color: #767676;
}

.fp-share-list__remove {
	border: none;
	background: none;
	color: #b32d2e;
	cursor: pointer;
	font-size: 0.85rem;
	padding: 0.2rem 0.4rem;
	border-radius: 4px;
}

.fp-share-list__remove:hover,
.fp-share-list__remove:focus {
	color: #8a2324;
	background: rgba(179, 45, 46, 0.08);
	outline: none;
}

.food-planner[data-fp-auth="logged-out"] .fp-share-trigger {
	display: none;
}

/* Dashboard */
.food-planner-dashboard {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.fp-dashboard__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
}

.fp-dashboard__status {
	margin: 0;
	min-height: 1.2rem;
	color: #555;
}

.fp-dashboard__status[data-fp-status="error"] {
	color: #b32d2e;
}

.fp-dashboard__status[data-fp-status="success"] {
	color: #278a30;
}

.fp-dashboard__sections {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 1.25rem;
}

.fp-dashboard__section {
	border: 1px solid #e2e4e7;
	border-radius: 8px;
	padding: 1rem;
	background: #fff;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	min-height: 220px;
}

.fp-dashboard__section-title {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 600;
}

.fp-dashboard__empty {
	margin: 0;
	color: #68707a;
	font-size: 0.9rem;
}

.fp-dashboard__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.fp-dashboard__item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid #f0f2f4;
}

.fp-dashboard__item:last-child {
	border-bottom: none;
}

.fp-dashboard__item-content {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	flex: 1 1 auto;
}

.fp-dashboard__item-title {
	margin: 0;
	font-weight: 600;
	color: #1d2327;
	word-break: break-word;
}

.fp-dashboard__item-meta {
	margin: 0;
	font-size: 0.75rem;
	color: #767676;
}

.fp-dashboard__item-actions {
	display: flex;
	gap: 0.5rem;
	align-items: center;
}

.fp-dashboard__view {
	text-decoration: none;
}

.fp-dashboard__view .fp-button {
	margin: 0;
}

.food-planner[data-fp-can-edit="0"] .fp-field,
.food-planner[data-fp-can-edit="0"] .fp-state__button,
.food-planner[data-fp-can-edit="0"] .fp-remove {
	cursor: not-allowed;
}

.food-planner[data-fp-can-edit="0"] .fp-state__button,
.food-planner[data-fp-can-edit="0"] .fp-remove {
	opacity: 0.5;
	pointer-events: none;
}

.fp-state__button[disabled],
.fp-remove[disabled] {
	opacity: 0.5;
	cursor: not-allowed;
}

.fp-field[disabled],
.fp-field[readonly] {
	background: #f6f7f7;
	color: #555;
}

/* Status */
.fp-status {
	margin: 0;
	min-height: 1.25rem;
	font-size: 0.95rem;
	color: #666;
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 0;
	text-align: left;
}

.fp-status:disabled {
	cursor: default;
}

.fp-status[data-fp-status="error"] {
	color: #b32d2e;
}

.fp-status[data-fp-status="dirty"] {
	color: #d98500;
}

.fp-status[data-fp-status="saving"] {
	color: #0073aa;
}

.fp-status[data-fp-status="saved"] {
	color: #278a30;
}

.fp-status[data-fp-status="info"] {
	color: #0073aa;
}

/* Controls */
.fp-controls {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}

.fp-controls input[type="text"],
.fp-controls input[type="date"] {
	padding: 0.35rem 0.5rem;
	font-size: 1rem;
	border: 1px solid #ccd0d4;
	border-radius: 4px;
	box-sizing: border-box;
}

.fp-controls input[type="text"]:focus,
.fp-controls input[type="date"]:focus {
	outline: none;
	border-color: #0073aa;
	box-shadow: 0 0 0 1px #0073aa;
}

/* Buttons */
.fp-button,
.fp-toolbar__button,
.fp-state__button,
.fp-remove {
	font-family: inherit;
}

.fp-button {

	background: #0073aa;
	background: var(--wp--preset--color--primary);
	color: #fff;
	border: none;
	padding: 0.45rem 0.75rem;
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}

.fp-button:hover,
.fp-button:focus {
	/* background: #005177; */
	background: var(--wp--preset--color--primary);
	color: #fff;
	outline: none;
}

button.Cooked{
	background: #000;
}
button.Finished{
	background: #000;
}


.fp-button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.fp-button--ghost {
	background: transparent;
	color: #0073aa;
	/* border: 1px solid #0073aa; */
}

.fp-button--ghost:hover,
.fp-button--ghost:focus {
	background: #0073aa;
	color: #fff;
}

/* Toolbar */
.fp-toolbar {
	margin-top: 1rem;
	display: flex;
	gap: 0.6rem;
	flex-wrap: wrap;
}

.fp-toolbar__button {
	background: transparent;
	border: 1px solid #0073aa;
	color: #0073aa;
	border-radius: 4px;
	padding: 0.4rem 0.8rem;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}

.fp-toolbar__button:hover,
.fp-toolbar__button:focus {
	background: #0073aa;
	color: #fff;
	outline: none;
}

/* Inline fields */
.fp-field {
	width: 100%;
	/* padding: 0.35rem 0.5rem; */
	/* font-size: 1rem; */
	/* border: 1px solid #ccd0d4; */
	background: transparent;
	border: 0;
	border-radius: 4px;
	box-sizing: border-box;
	font-family: inherit;
}

.fp-field:focus {
	outline: none;
	border-color: #0073aa;
	box-shadow: 0 0 0 1px #0073aa;
}

.fp-field--expiry {
	min-width: 8rem;
}

/* Grid */
.fp-grid {
	display: grid;
	grid-template-columns: var(--fp-grid-columns);
	gap: 1rem;
	align-items: center;
}

.fp-grid__cell {
	min-width: 0;
}

.fp-grid--header {
	font-weight: 600;
	border-bottom: 2px solid #ccc;
	padding-bottom: 0.3rem;
}

.fp-grid__row {
	border-bottom: 1px solid #ddd;
	padding: 0.4rem 0;
}

.fp-grid--header .fp-grid__cell:nth-child(n+3),
.fp-grid__row .fp-grid__cell:nth-child(n+3) {
	text-align: center;
}

.fp-section {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.fp-grid-rows {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
}

.fp-grid-rows--secondary {
	opacity: 0.35;
	margin-top: 0.75rem;
}

/* Item state */
.fp-expired{
	color:maroon;
}


.fp-state {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0rem;
}

.fp-state__button {
	background: #f0f0f0;
	border: 1px solid #ccd0d4;
	border-radius: 4px;
	padding: 0.25rem 0.5rem;
	font-size: 0.85rem;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
	width:var(--fp-size);
	height:var(--fp-size);
}

.fp-state__progress{
	width:100%;
	height:var(--fp-size);
	margin:0;
	padding:0;
	cursor: pointer;
	accent-color: #000;
}


.fp-state__button:hover,
.fp-state__button:focus {
	background: #0073aa;
	color: #fff;
	border-color: #0073aa;
	outline: none;
}

.fp-state__label {
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #555;
}

/* Remove button */
.fp-remove {
	width: 100%;
	height: var(--fp-size);
	background: none;
	border: none;
	color: #c00;
	cursor: pointer;
	font-size: var(--fp-size);
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}

.fp-remove:hover,
.fp-remove:focus {
	color: #900;
	outline: none;
}

/* Dialog */
.fp-dialog {
	position: fixed;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.45);
	padding: 2vw;
	z-index: 1000;
}

.fp-dialog.is-open {
	display: flex;
}

.fp-dialog__panel {
	background: #fff;
	border-radius: 12px;
	padding: 1rem;
	width: min(100%, 960px);
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	gap: 0.8rem;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.fp-dialog__close {
	align-self: flex-end;
	font-size: 1.8rem;
	line-height: 1;
	border: none;
	background: none;
	cursor: pointer;
	color: #666;
}

.fp-dialog__close:hover,
.fp-dialog__close:focus {
	color: #000;
	outline: none;
}

.fp-dialog__frame {
	flex: 1 1 auto;
	border: 1px solid #ccc;
	border-radius: 8px;
	width: 100%;
	height: 60vh;
}

/* Responsive */
@media (max-width: 960px) {
	.fp-layout {
		--fp-grid-columns: minmax(0, 1fr) minmax(0, 0.9fr) minmax(8rem, 1fr) minmax(var(--fp-size), 3rem);
	}
}

@media (max-width: 768px) {
	.fp-grid {
		grid-template-columns: 1fr 0.5fr;
		grid-template-areas:
		"head head" /* Item 1 spans the full width (Row 1) */
		"side nav"  /* Items 2 & 3 are side-by-side (Row 2) */
		"btn body"; /* Items 4 & 5 are side-by-side (Row 3) */
		gap:0.2rem;
	}
	.fp-grid .fp-grid__cell:nth-child(1) { grid-area: btn; } 
	.fp-grid .fp-grid__cell:nth-child(2) { grid-area: head; } 
	.fp-grid .fp-grid__cell:nth-child(3) { grid-area: side; } 
	.fp-grid .fp-grid__cell:nth-child(4) { grid-area: nav;  } 
	.fp-grid .fp-grid__cell:nth-child(5) { grid-area: body; } 
	.fp-grid .fp-grid__cell:nth-child(6) { grid-area: foot; display:none; } 
	.fp-field--name{
		font-size:1.5rem;
	}
	.fp-state__progress{
		pointer-events: none;
	}
	.fp-expired{
		font-size:1rem;
	}
	.fp-remove{
		margin:0 auto;
	}
	.fp-grid--header{
		display: none;
	}

	.fp-grid--header .fp-grid__cell,
	.fp-grid__row .fp-grid__cell {
		text-align: left;
	}

	.fp-remove {
		width: auto;
		align-self: flex-start;
	}
}
