/**
 * Frontend styles for Weekly Menu Publisher
 * Parchment/wood theme with responsive grid
 */

/* Error and notice styles */
.wmp-notice {
	padding: 15px 20px;
	border-left: 4px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	line-height: 1.6;
	margin: 20px 0;
}

.wmp-notice.wmp-error {
	background: #fee;
	border-left-color: #dc3545;
	color: #721c24;
}

.wmp-notice.wmp-warning {
	background: #ffeaa7;
	border-left-color: #ffc107;
	color: #664d03;
}

.wmp-menu-container {
	max-width: 1200px;
	margin: 30px auto;
	padding: 30px;
	background: linear-gradient(135deg, #e8dcc4 0%, #d4c4a8 100%);
	border-radius: 8px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.5);
	font-family: 'Georgia', 'Garamond', serif;
	position: relative;
	overflow: hidden;
}

.wmp-menu-container::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-image: 
		repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(0, 0, 0, 0.02) 2px, rgba(0, 0, 0, 0.02) 4px),
		repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 0, 0, 0.02) 2px, rgba(0, 0, 0, 0.02) 4px);
	pointer-events: none;
	z-index: 1;
}

.wmp-menu-container > * {
	position: relative;
	z-index: 2;
}

/* Apply background image if set */
.wmp-menu-container.wmp-has-bg-image {
	background-image: var(--wmp-bg-image);
	background-size: cover;
	background-attachment: fixed;
}

.wmp-menu-container.wmp-has-bg-image::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(255, 255, 255, 0.7);
	pointer-events: none;
}

/* Title */
.wmp-menu-title {
	text-align: center;
	font-size: 3em;
	font-weight: 700;
	color: #3d2817;
	margin: 0 0 20px 0;
	text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
	letter-spacing: 2px;
	font-variant: small-caps;
}

/* Banner section */
.wmp-banner {
	background: rgba(61, 40, 23, 0.1);
	border-top: 2px solid #3d2817;
	border-bottom: 2px solid #3d2817;
	padding: 12px 20px;
	margin-bottom: 30px;
	text-align: center;
	font-size: 0.95em;
	color: #3d2817;
}

.wmp-banner p {
	margin: 4px 0;
	font-style: italic;
}

.wmp-banner p:first-child {
	margin-top: 0;
}

.wmp-banner p:last-child {
	margin-bottom: 0;
}

/* Weeks grid */
.wmp-weeks-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
	margin-top: 30px;
}

/* Week column */
.wmp-week-column {
	background: rgba(255, 255, 255, 0.8);
	border: 1px solid #c4b5a0;
	border-radius: 6px;
	padding: 20px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wmp-week-column:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12);
}

.wmp-week-title {
	text-align: center;
	font-size: 1.3em;
	font-weight: 700;
	color: #5d4037;
	margin: 0 0 20px 0;
	padding-bottom: 15px;
	border-bottom: 2px solid #d4a574;
	text-transform: uppercase;
	letter-spacing: 1px;
}

/* Day block */
.wmp-day-block {
	margin-bottom: 20px;
}

.wmp-day-block:last-child {
	margin-bottom: 0;
}

.wmp-day-name {
	font-size: 1em;
	font-weight: 600;
	color: #3d2817;
	margin: 0 0 10px 0;
	padding-bottom: 8px;
	border-bottom: 1px solid #e0d4c0;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* Items list */
.wmp-items-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.wmp-no-items {
	font-size: 0.9em;
	color: #999;
	font-style: italic;
	margin: 8px 0;
}

/* Item */
.wmp-item {
	margin-bottom: 12px;
	padding-bottom: 12px;
	border-bottom: 1px dotted #e0d4c0;
	font-size: 0.95em;
	line-height: 1.5;
}

.wmp-item:last-child {
	border-bottom: none;
	margin-bottom: 0;
	padding-bottom: 0;
}

.wmp-item-name {
	display: block;
	font-weight: 600;
	color: #3d2817;
	margin-bottom: 3px;
}

.wmp-item-meta {
	display: flex;
	gap: 8px;
	font-size: 0.85em;
	color: #666;
	margin-bottom: 3px;
	flex-wrap: wrap;
}

.wmp-item-price {
	font-weight: 600;
	color: #8b5a2b;
	background: rgba(139, 90, 43, 0.1);
	padding: 2px 6px;
	border-radius: 3px;
}

.wmp-item-tags {
	color: #999;
	font-style: italic;
}

.wmp-item-description {
	font-size: 0.85em;
	color: #666;
	margin: 4px 0 0 0;
	font-style: italic;
	line-height: 1.4;
}

/* Tablet responsive */
@media (max-width: 1024px) {
	.wmp-weeks-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 15px;
	}

	.wmp-menu-container {
		padding: 20px;
		margin: 20px auto;
	}

	.wmp-menu-title {
		font-size: 2.2em;
	}
}

/* Mobile responsive */
@media (max-width: 768px) {
	.wmp-weeks-grid {
		grid-template-columns: 1fr;
		gap: 15px;
	}

	.wmp-menu-container {
		padding: 15px;
		margin: 15px auto;
		border-radius: 4px;
	}

	.wmp-menu-title {
		font-size: 1.8em;
		margin-bottom: 15px;
	}

	.wmp-week-column {
		padding: 15px;
	}

	.wmp-banner {
		font-size: 0.9em;
		padding: 10px 15px;
	}
}

@media (max-width: 480px) {
	.wmp-menu-container {
		padding: 12px;
		margin: 10px auto;
	}

	.wmp-menu-title {
		font-size: 1.5em;
		margin-bottom: 12px;
		letter-spacing: 1px;
	}

	.wmp-week-column {
		padding: 12px;
	}

	.wmp-week-title {
		font-size: 1.1em;
		margin-bottom: 15px;
	}

	.wmp-day-name {
		font-size: 0.95em;
	}

	.wmp-item {
		font-size: 0.9em;
		margin-bottom: 10px;
	}
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
	.wmp-week-column {
		transition: none;
	}
}

/* Print styles */
@media print {
	.wmp-menu-container {
		box-shadow: none;
		page-break-inside: avoid;
	}

	.wmp-week-column {
		page-break-inside: avoid;
		box-shadow: none;
		border: 1px solid #999;
	}
}


/* Order Form Styles */
.wmp-order-form-wrapper {
max-width: 1000px;
margin: 0 auto;
padding: 20px;
border: 1px solid #ddd;
background: #fff;
border-radius: 8px;
}

.wmp-order-details-fields {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 20px;
margin-bottom: 30px;
}

.wmp-form-group {
display: flex;
flex-direction: column;
}

.wmp-form-group label {
font-weight: bold;
margin-bottom: 8px;
color: #333;
}

.wmp-form-group input {
padding: 10px;
border: 1px solid #ccc;
border-radius: 4px;
font-size: 16px;
}

.wmp-order-menu-selection {
margin-top: 40px;
}

.wmp-order-menu-selection h3 {
border-bottom: 2px solid #3d2817;
padding-bottom: 10px;
color: #3d2817;
}

.wmp-instruction {
font-style: italic;
color: #666;
margin-bottom: 20px;
}

.wmp-order-form-mode {
max-width: 100% !important;
box-shadow: none !important;
border: 1px solid rgba(0,0,0,0.1);
}

.wmp-order-checkbox-label {
display: flex;
align-items: center;
gap: 10px;
cursor: pointer;
padding: 5px 0;
transition: background 0.2s;
}

.wmp-order-checkbox-label:hover {
background: rgba(0,0,0,0.05);
}

.wmp-meal-checkbox {
width: 18px;
height: 18px;
cursor: pointer;
}

.wmp-order-item .wmp-item-name {
font-weight: 600;
}

.wmp-item-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 15px;
}

.wmp-order-checkbox-label {
	flex: 1;
	display: flex;
	align-items: center;
	cursor: pointer;
	user-select: none;
}

.wmp-quantity-wrapper {
	display: flex;
	align-items: center;
	gap: 5px;
}

.wmp-quantity-input {
	width: 60px !important;
	padding: 5px !important;
	text-align: center;
	border: 1px solid #ccc !important;
	border-radius: 4px !important;
	font-family: Arial, sans-serif;
	font-size: 14px;
}

.wmp-quantity-input::-webkit-outer-spin-button,
.wmp-quantity-input::-webkit-inner-spin-button {
	-webkit-appearance: outer-spin-button;
	-webkit-appearance: inner-spin-button;
	opacity: 1;
}

}

.wmp-order-submit-section {
margin-top: 50px;
text-align: center;
padding: 30px;
background: #f9f9f9;
border-radius: 8px;
}

.wmp-submit-button {
background-color: #3d2817;
color: #fff;
padding: 15px 40px;
font-size: 18px;
border: none;
border-radius: 4px;
cursor: pointer;
transition: background 0.3s;
}

.wmp-submit-button:hover {
background-color: #5a3c23;
}

.wmp-submit-button:disabled {
background-color: #ccc;
cursor: not-allowed;
}

.wmp-notice.wmp-success {
background: #d4edda;
border-left-color: #28a745;
color: #155724;
}

/* Select All checkboxes styling */
#wmp-select-all-meals {
	cursor: pointer;
	width: 18px;
	height: 18px;
	accent-color: #3d2817;
}

.wmp-select-week {
	cursor: pointer;
	width: 16px;
	height: 16px;
	accent-color: #3d2817;
}

/* Order summary styling */
#wmp-order-summary {
	background: linear-gradient(135deg, #faf7f2 0%, #f5ede4 100%);
	border: 2px solid #d4a574;
}

#wmp-selected-meals ul {
	list-style: disc inside;
	color: #555;
}

#wmp-selected-meals li {
	margin: 8px 0;
	padding: 5px 0;
}

#wmp-total-price {
	display: inline-block;
	padding: 8px 16px;
	background: linear-gradient(135deg, #3d2817 0%, #5a3c23 100%);
	color: #fff;
	border-radius: 4px;
	font-size: 24px;
}

/* Meal checkbox styling */
.wmp-meal-checkbox {
	cursor: pointer;
	width: 16px;
	height: 16px;
	accent-color: #3d2817;
	margin-right: 10px;
	vertical-align: middle;
}

.wmp-order-checkbox-label {
	display: flex;
	align-items: center;
	cursor: pointer;
	padding: 8px 0;
	user-select: none;
}

.wmp-order-checkbox-label:hover {
	color: #555;
}
