/* Restaurant Order Type Popup styles */

.rop-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.rop-modal {
	background: #fff;
	border-radius: 12px;
	max-width: 460px;
	width: 100%;
	padding: 32px 28px;
	position: relative;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	max-height: 88vh;
	overflow-y: auto;
}

.rop-modal h2 {
	margin: 0 0 8px;
	font-size: 21px;
	line-height: 1.3;
}

.rop-desc {
	margin: 0 0 16px;
	color: #555;
	font-size: 14px;
}

.rop-close {
	position: absolute;
	top: 12px;
	right: 14px;
	background: none;
	border: none;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	color: #888;
}
.rop-close:hover { color: #222; }

.rop-choices {
	display: flex;
	gap: 14px;
	margin-top: 8px;
}

.rop-btn {
	flex: 1;
	padding: 14px 12px;
	border-radius: 8px;
	border: 2px solid transparent;
	background: #e0e0e0;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	transition: all 0.15s ease;
	color: #555;
}
.rop-toggle-group { gap: 0; }
.rop-toggle-group .rop-toggle { border-radius: 0; }
.rop-toggle-group .rop-toggle:first-child { border-radius: 8px 0 0 8px; }
.rop-toggle-group .rop-toggle:last-child { border-radius: 0 8px 8px 0; }

.rop-btn.is-selected {
	background: #2D7238;
	color: #fff;
}

.rop-btn-primary {
	width: 100%;
	background: #cfcfcf;
	color: #777;
	border-color: transparent;
	padding: 12px 22px;
}
.rop-btn-primary:disabled {
	background: #cfcfcf;
	color: #888;
	cursor: not-allowed;
}
.rop-btn-primary:not(:disabled) {
	background: #2D7238;
	color: #fff;
	cursor: pointer;
}
.rop-btn-primary:not(:disabled):hover {
	background: #245c2d;
}

.rop-fields { margin-top: 20px; }
.rop-field { margin-bottom: 14px; }
.rop-field label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 4px;
	color: #333;
}
.rop-field select {
	width: 100%;
	padding: 10px 12px;
	font-size: 15px;
	border: 1px solid #ccc;
	border-radius: 6px;
	background: #fff;
}

.rop-branch-details {
	background: #f7f7f7;
	border-radius: 8px;
	padding: 12px 14px;
	margin-top: 6px;
	font-size: 14px;
	color: #333;
}
.rop-branch-address { font-weight: 600; margin: 0 0 4px; }
.rop-branch-meta { margin: 0 0 8px; color: #666; font-size: 13px; }
.rop-branch-map iframe {
	width: 100%;
	height: 160px;
	border: 0;
	border-radius: 6px;
}
.rop-branch-map a {
	display: inline-block;
	color: #d35400;
	font-weight: 600;
	font-size: 13px;
	text-decoration: none;
}
.rop-branch-map a:hover { text-decoration: underline; }

.rop-area-notes {
	background: #f7f7f7;
	border-radius: 8px;
	padding: 14px 16px;
	margin: 4px 0 14px;
	font-size: 13px;
	line-height: 1.6;
	color: #333;
}
.rop-area-notes p { margin: 0 0 8px; }
.rop-area-notes p:last-child { margin-bottom: 0; }

.rop-actions { margin-top: 20px; }

/* Top bar showing the current order-type selection.
   By default it's moved (via JS) into the normal page flow right after your theme's <header>
   element, so it stacks naturally below any store-wide alert bar and below the header itself —
   no fixed/absolute positioning fighting for the same spot.
   If JS can't find a header element on your theme, it falls back to the old pinned-to-viewport
   behavior (.rop-fixed-fallback) so the bar is never lost. */
.rop-topbar {
	position: static;
	width: 100%;
	background: #2B7238;
	color: #fff;
}

.rop-topbar.rop-fixed-fallback {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: 8000;
}
html.wp-toolbar .rop-topbar.rop-fixed-fallback {
	top: 32px; /* below the WP admin toolbar */
}
@media screen and (max-width: 782px) {
	html.wp-toolbar .rop-topbar.rop-fixed-fallback {
		top: 46px; /* mobile admin toolbar height */
	}
}
.rop-topbar button#rop-topbar-btn {
	width: 100%;
	background: none;
	border: none;
	color: #fff;
	padding: 10px 16px;
	font-size: 14px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
.rop-topbar-edit {
	text-decoration: underline;
	font-weight: 600;
	color: #ffb066;
}

/* Checkout order-type badge (icon + pill), shown at the top of the checkout page */
.rop-order-badge {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 10px 18px;
	border-radius: 999px;
	margin-bottom: 20px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
.rop-badge-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	font-size: 17px;
	background: rgba(255, 255, 255, 0.65);
	flex-shrink: 0;
}
.rop-badge-text {
	display: flex;
	flex-direction: column;
	line-height: 1.3;
}
.rop-badge-text strong {
	font-size: 14px;
	font-weight: 700;
}
.rop-badge-text small {
	font-size: 12px;
	opacity: 0.85;
}

.rop-badge-delivery {
	background: #e6f2e8;
	color: #1f5127;
	border: 1px solid #bfe0c6;
}
.rop-badge-delivery .rop-badge-icon { color: #2D7238; }

.rop-badge-pickup {
	background: #fdf1e3;
	color: #8a4b0d;
	border: 1px solid #f3d6ac;
}
.rop-badge-pickup .rop-badge-icon { color: #b5651d; }

@media (max-width: 480px) {
	.rop-order-badge {
		display: flex;
		width: 100%;
		border-radius: 12px;
	}
}

/* Locked "Area" field shown just above Town/City at checkout for delivery orders */
/* Address fields hidden (not removed) for pickup orders at checkout */
.rop-hidden-field {
	display: none !important;
}

.rop-area-field input {
	background: #f0f0f0 !important;
	color: #555 !important;
	cursor: not-allowed;
}

@media (max-width: 480px) {
	.rop-choices { flex-direction: column; }
}
