/**
 * Restaurant kitchen display.
 */

body:has(.llp-kitchen-display) {
	background: #111827;
}

body:has(.llp-kitchen-display) .site-main {
	padding: 0;
}

.llp-kitchen-display {
	min-height: calc(100vh - 120px);
	padding: 20px;
	background: #111827;
	color: #f9fafb;
}

.llp-kitchen-display:fullscreen {
	overflow: auto;
	min-height: 100vh;
	padding: 20px;
	background: #111827;
}

.llp-kitchen-header {
	display: flex;
	justify-content: space-between;
	gap: 24px;
	align-items: center;
	margin-bottom: 14px;
	padding: 18px 20px;
	background: #1f2937;
	border: 1px solid #374151;
	border-radius: 14px;
}

.llp-kitchen-eyebrow {
	margin: 0 0 4px;
	color: #fbbf24;
	font-size: 0.82rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.llp-kitchen-header h1 {
	margin: 0;
	color: #ffffff;
	font-size: clamp(1.7rem, 4vw, 2.5rem);
}

.llp-kitchen-updated {
	margin: 5px 0 0;
	color: #9ca3af;
	font-size: 0.9rem;
}

.llp-kitchen-header-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 9px;
	align-items: center;
}

.llp-kitchen-secondary-button {
	display: inline-flex;
	min-height: 42px;
	align-items: center;
	justify-content: center;
	padding: 9px 13px;
	background: #374151;
	color: #ffffff;
	border: 1px solid #4b5563;
	border-radius: 8px;
	cursor: pointer;
	font: inherit;
	font-weight: 700;
	text-decoration: none;
}

.llp-kitchen-secondary-button:hover {
	background: #4b5563;
	color: #ffffff;
}

.llp-kitchen-secondary-button:disabled {
	cursor: wait;
	opacity: 0.6;
}

.llp-kitchen-sound-control {
	display: inline-flex;
	min-height: 42px;
	gap: 8px;
	align-items: center;
	padding: 8px 12px;
	background: #111827;
	border: 1px solid #374151;
	border-radius: 8px;
	font-weight: 700;
}

.llp-kitchen-status-bar {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	align-items: center;
	margin-bottom: 14px;
	padding: 10px 14px;
	background: #1f2937;
	border: 1px solid #374151;
	border-radius: 10px;
}

.llp-kitchen-connection {
	display: inline-flex;
	gap: 6px;
	align-items: center;
	font-weight: 700;
}

.llp-kitchen-connection::before {
	width: 9px;
	height: 9px;
	background: #9ca3af;
	border-radius: 50%;
	content: "";
}

.llp-kitchen-connection.is-connected::before {
	background: #22c55e;
	box-shadow: 0 0 10px rgba(34, 197, 94, 0.7);
}

.llp-kitchen-connection.is-error::before {
	background: #ef4444;
}

.llp-kitchen-orders {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
	gap: 16px;
	align-items: start;
}

.llp-kitchen-order {
	overflow: hidden;
	background: #ffffff;
	color: #111827;
	border: 4px solid #6b7280;
	border-radius: 14px;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.28);
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.llp-kitchen-order.is-new {
	border-color: #ef4444;
}

.llp-kitchen-order.is-accepted {
	border-color: #3b82f6;
}

.llp-kitchen-order.is-preparing {
	border-color: #f59e0b;
}

.llp-kitchen-order.is-ready {
	border-color: #22c55e;
}

.llp-kitchen-order.is-removing {
	opacity: 0;
	transform: scale(0.95);
}

.llp-kitchen-order-header {
	display: flex;
	justify-content: space-between;
	gap: 14px;
	padding: 15px 16px;
	background: #f3f4f6;
	border-bottom: 1px solid #d1d5db;
}

.llp-kitchen-order-number {
	color: #4b5563;
	font-size: 0.9rem;
	font-weight: 800;
	text-transform: uppercase;
}

.llp-kitchen-order-header h2 {
	margin: 2px 0 0;
	font-size: 1.45rem;
}

.llp-kitchen-order-header-right {
	display: flex;
	flex-direction: column;
	gap: 6px;
	align-items: flex-end;
	text-align: right;
}

.llp-kitchen-status-badge {
	display: inline-flex;
	padding: 5px 9px;
	background: #111827;
	color: #ffffff;
	border-radius: 999px;
	font-size: 0.8rem;
	font-weight: 800;
	text-transform: uppercase;
}

.llp-kitchen-order-header time {
	color: #4b5563;
	font-size: 0.82rem;
	font-weight: 700;
}

.llp-kitchen-order-details {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	padding: 12px 16px;
	background: #fafafa;
	border-bottom: 1px solid #e5e7eb;
}

.llp-kitchen-detail {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.llp-kitchen-detail strong {
	font-size: 0.78rem;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.llp-kitchen-detail span {
	font-weight: 700;
	white-space: pre-line;
}

.llp-kitchen-items {
	margin: 0;
	padding: 0 16px;
	list-style: none;
}

.llp-kitchen-item {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 0;
	border-bottom: 1px solid #e5e7eb;
	font-size: 1.02rem;
}

.llp-kitchen-item-main {
	display: flex;
	min-width: 0;
	gap: 10px;
}

.llp-kitchen-quantity {
	flex: 0 0 auto;
	color: #dc2626;
	font-size: 1.2rem;
}

.llp-kitchen-item-name {
	font-weight: 800;
}

.llp-kitchen-options {
	margin: 5px 0 0;
	padding-left: 18px;
	color: #4b5563;
	font-size: 0.86rem;
	line-height: 1.45;
}

.llp-kitchen-notes {
	margin: 14px 16px;
	padding: 12px;
	background: #fef3c7;
	border: 2px solid #f59e0b;
	border-radius: 9px;
}

.llp-kitchen-notes strong {
	text-transform: uppercase;
}

.llp-kitchen-notes p {
	margin: 5px 0 0;
	white-space: pre-line;
}

.llp-kitchen-order-footer {
	display: flex;
	justify-content: space-between;
	gap: 14px;
	align-items: center;
	padding: 14px 16px;
	background: #f3f4f6;
}

.llp-kitchen-total {
	font-size: 1.12rem;
}

.llp-kitchen-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 8px;
}

.llp-kitchen-action {
	min-height: 44px;
	padding: 10px 14px;
	background: #111827;
	color: #ffffff;
	border: 0;
	border-radius: 8px;
	cursor: pointer;
	font: inherit;
	font-weight: 800;
}

.llp-kitchen-action.is-accepted {
	background: #2563eb;
}

.llp-kitchen-action.is-preparing {
	background: #d97706;
}

.llp-kitchen-action.is-ready {
	background: #15803d;
}

.llp-kitchen-action.is-completed {
	background: #374151;
}

.llp-kitchen-action:disabled {
	cursor: wait;
	opacity: 0.55;
}

.llp-kitchen-feedback {
	min-height: 0;
	margin: 0;
	padding: 0 16px;
	font-size: 0.85rem;
	font-weight: 700;
}

.llp-kitchen-feedback.is-saving,
.llp-kitchen-feedback.is-error {
	min-height: 34px;
	padding-top: 8px;
	padding-bottom: 8px;
}

.llp-kitchen-feedback.is-error {
	background: #fee2e2;
	color: #991b1b;
}

.llp-kitchen-empty {
	display: flex;
	min-height: 260px;
	grid-column: 1 / -1;
	flex-direction: column;
	gap: 8px;
	align-items: center;
	justify-content: center;
	padding: 30px;
	background: #1f2937;
	color: #d1d5db;
	border: 2px dashed #4b5563;
	border-radius: 14px;
	text-align: center;
}

.llp-kitchen-empty strong {
	color: #ffffff;
	font-size: 1.5rem;
}

@media (max-width: 820px) {
	.llp-kitchen-header {
		align-items: flex-start;
		flex-direction: column;
	}

	.llp-kitchen-header-actions {
		justify-content: flex-start;
	}

	.llp-kitchen-orders {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 520px) {
	.llp-kitchen-display {
		padding: 10px;
	}

	.llp-kitchen-header-actions,
	.llp-kitchen-secondary-button,
	.llp-kitchen-sound-control {
		width: 100%;
	}

	.llp-kitchen-order-details {
		grid-template-columns: 1fr;
	}

	.llp-kitchen-order-footer {
		align-items: stretch;
		flex-direction: column;
	}

	.llp-kitchen-actions {
		flex-direction: column;
	}

	.llp-kitchen-action {
		width: 100%;
	}
}
