/* ─────────────────────────────────────────────
   Floating cart bar
   ───────────────────────────────────────────── */

.wa-cart-bar {
	position: fixed;
	bottom: 1.25rem;
	right: 1.25rem;
	z-index: 99990;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.5rem 0.5rem 0.5rem 1.25rem;
	background: #111827;
	color: #fff;
	border-radius: 999px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
	animation: wa-cart-in 0.3s ease both;
}

@keyframes wa-cart-in {
	from { opacity: 0; transform: translateY(12px); }
	to   { opacity: 1; transform: translateY(0); }
}

.wa-cart-bar__info {
	display: flex;
	align-items: baseline;
	gap: 0.35rem;
	font-size: 0.875rem;
}

.wa-cart-bar__count {
	font-size: 1.125rem;
	font-weight: 800;
}

.wa-cart-bar__total {
	font-weight: 700;
	margin-left: 0.25rem;
	opacity: 0.85;
}

.wa-cart-bar__btn {
	padding: 0.7rem 1.25rem;
	border: none;
	border-radius: 999px;
	background: #25d366;
	color: #fff;
	font-weight: 700;
	font-size: 0.9375rem;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.18s ease;
}

.wa-cart-bar__btn:hover {
	background: #1ebe57;
}

/* ─────────────────────────────────────────────
   Modal overlay
   ───────────────────────────────────────────── */

body.wa-modal-open {
	overflow: hidden;
}

.wa-modal-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	background: rgba(0, 0, 0, 0.55);
	backdrop-filter: blur(4px);
}

.wa-modal-overlay[hidden],
.wa-cart-bar[hidden] {
	display: none !important;
}

.wa-modal {
	width: 100%;
	max-width: 480px;
	max-height: 90vh;
	overflow-y: auto;
	background: #fff;
	border-radius: 20px;
	padding: 1.5rem;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
}

/* ── Type toggle ─────────────────────────── */

.wa-type-toggle {
	display: flex;
	background: #f3f4f6;
	border-radius: 999px;
	padding: 0.3rem;
	margin-bottom: 1.25rem;
}

.wa-type-btn {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.75rem 1rem;
	border: none;
	border-radius: 999px;
	background: transparent;
	color: #111827;
	font-weight: 700;
	font-size: 0.9375rem;
	cursor: pointer;
	transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.wa-type-btn.is-active {
	background: #e53935;
	color: #fff;
	box-shadow: 0 4px 12px rgba(229, 57, 53, 0.35);
}

.wa-type-icon {
	font-size: 1.1rem;
}

/* ── Notes & headings ────────────────────── */

.wa-modal-note {
	margin-bottom: 1rem;
	font-size: 0.875rem;
	color: #374151;
}

.wa-modal-note strong {
	color: #e53935;
}

.wa-modal-closed {
	margin-bottom: 1rem;
	text-align: center;
	color: #e53935;
	font-size: 0.9375rem;
}

.wa-modal-closed em {
	font-style: italic;
	font-size: 0.8125rem;
}

.wa-modal-heading {
	margin: 0 0 0.75rem;
	font-size: 1rem;
	font-weight: 700;
	color: #111827;
}

.wa-modal-heading--red {
	color: #e53935;
}

.wa-modal-hint {
	margin: 0.5rem 0 0;
	font-size: 0.8125rem;
	color: #9ca3af;
}

.wa-modal-or {
	text-align: center;
	font-weight: 800;
	color: #9ca3af;
	margin: 1.25rem 0;
	font-size: 0.8125rem;
}

/* ── Delivery area select ────────────────── */

.wa-area-select-wrap {
	position: relative;
}

.wa-area-select {
	width: 100%;
	padding: 0.85rem 1rem;
	border: 2px solid #e53935;
	border-radius: 12px;
	font-size: 0.9375rem;
	background: #fff;
	color: #111827;
	appearance: none;
	cursor: pointer;
}

/* ── Branch list ─────────────────────────── */

.wa-branch-list {
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
}

.wa-branch-card {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.875rem 1rem;
	border: 1.5px solid #e5e7eb;
	border-radius: 14px;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.wa-branch-card input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.wa-branch-card.is-selected {
	border-color: #e53935;
	background: #fff5f5;
}

.wa-branch-card.is-closed {
	opacity: 0.55;
	cursor: not-allowed;
}

.wa-branch-card__body {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.wa-branch-card__body strong {
	font-size: 0.9375rem;
	color: #111827;
}

.wa-branch-card__body span {
	font-size: 0.8125rem;
	color: #6b7280;
}

.wa-branch-card__body em {
	font-size: 0.75rem;
	color: #9ca3af;
	font-style: italic;
}

.wa-branch-card__radio {
	width: 1.25rem;
	height: 1.25rem;
	border: 2px solid #d1d5db;
	border-radius: 50%;
	flex-shrink: 0;
	position: relative;
}

.wa-branch-card.is-selected .wa-branch-card__radio {
	border-color: #e53935;
	background: #e53935;
}

.wa-branch-card.is-selected .wa-branch-card__radio::after {
	content: '✓';
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 0.65rem;
	font-weight: 900;
}

/* ── Auto location ───────────────────────── */

.wa-auto-location {
	text-align: center;
	margin-bottom: 1.25rem;
}

.wa-auto-location__title {
	margin: 0 0 0.25rem;
	font-weight: 700;
	font-size: 0.9375rem;
}

.wa-auto-location__desc {
	margin: 0 0 0.75rem;
	font-size: 0.8125rem;
	color: #6b7280;
}

.wa-btn-precise-location {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.65rem 1.25rem;
	border: 2px solid #3b82f6;
	border-radius: 999px;
	background: transparent;
	color: #3b82f6;
	font-weight: 700;
	font-size: 0.875rem;
	cursor: pointer;
	transition: background 0.15s ease;
}

.wa-btn-precise-location:hover {
	background: #eff6ff;
}

/* ── Customer form fields ─────────────────── */

.wa-customer-fields {
	padding-top: 1.25rem;
	margin-top: 0.75rem;
}

.wa-customer-fields,
.wa-fulfillment-panel .wa-field {
	margin-bottom: 0.875rem;
}

.wa-field label {
	display: block;
	margin-bottom: 0.35rem;
	font-size: 0.8125rem;
	font-weight: 700;
	color: #111827;
}

.wa-required {
	color: #e53935;
}

.wa-field-input {
	width: 100%;
	padding: 0.7rem 0.85rem;
	border: 1.5px solid #e5e7eb;
	border-radius: 10px;
	font-size: 0.9375rem;
	color: #111827;
	background: #f9fafb;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wa-field-input:focus {
	outline: none;
	border-color: #111827;
	background: #fff;
	box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
}

.wa-field-textarea {
	resize: vertical;
	min-height: 4.5rem;
}

.wa-area-select-wrap {
	width: 100%;
}

/* ── Modal action buttons ────────────────── */

.wa-modal-actions {
	display: flex;
	gap: 0.75rem;
	margin-top: 0.5rem;
}

.wa-btn-modal {
	flex: 1;
	padding: 0.85rem 1rem;
	border-radius: 999px;
	font-weight: 700;
	font-size: 0.9375rem;
	cursor: pointer;
	transition: opacity 0.15s ease;
}

.wa-btn-modal--outline {
	border: 2px solid #111827;
	background: #fff;
	color: #111827;
}

.wa-btn-modal--primary {
	border: none;
	background: #111827;
	color: #fff;
}

.wa-btn-modal--primary:disabled {
	background: #d1d5db;
	color: #9ca3af;
	cursor: not-allowed;
}

.wa-btn-modal--dark {
	border: none;
	background: #111827;
	color: #fff;
}

.wa-btn-modal--whatsapp {
	border: none;
	background: #25d366;
	color: #fff;
}

.wa-btn-modal--full {
	width: 100%;
	margin-top: 0.75rem;
}

.wa-btn-modal--whatsapp:hover { background: #1ebe57; }
.wa-btn-modal--dark:hover { background: #374151; }

/* ── Cart review step ────────────────────── */

.wa-cart-review-header {
	text-align: center;
	margin-bottom: 1.25rem;
}

.wa-cart-review-icon {
	font-size: 2rem;
	margin-bottom: 0.5rem;
}

.wa-cart-review-title {
	margin: 0 0 0.25rem;
	font-size: 1rem;
	font-weight: 700;
}

.wa-cart-review-time {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 800;
	color: #e53935;
}

.wa-cart-review-items {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin-bottom: 1rem;
}

.wa-cart-review-item {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.wa-cart-review-item img {
	width: 56px;
	height: 56px;
	border-radius: 10px;
	object-fit: cover;
	flex-shrink: 0;
}

.wa-cart-review-item__info {
	flex: 1;
}

.wa-cart-review-item__info strong {
	display: block;
	font-size: 0.875rem;
	margin-bottom: 0.35rem;
}

.wa-cart-review-item__qty {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
}

.wa-review-minus,
.wa-review-plus {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	min-width: 28px;
	max-width: 28px;
	padding: 0;
	box-sizing: border-box;
	border: none;
	border-radius: 50%;
	background: #e53935;
	color: #fff;
	font-family: inherit;
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	flex-shrink: 0;
}

.wa-cart-review-item__price {
	font-weight: 700;
	font-size: 0.875rem;
	white-space: nowrap;
}

.wa-cart-review-total,
.wa-confirm-total {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	padding: 0.75rem 0;
	border-top: 1px solid #e5e7eb;
	margin-bottom: 0.5rem;
}

.wa-see-summary {
	display: block;
	font-size: 0.75rem;
	color: #9ca3af;
	font-weight: 400;
}

.wa-cart-review-total__amount,
.wa-confirm-total__amount {
	font-size: 1.25rem;
	font-weight: 800;
	color: #e53935;
}

/* ── Confirm step ────────────────────────── */

.wa-confirm-header {
	text-align: center;
	margin-bottom: 1.25rem;
}

.wa-confirm-icon {
	width: 3rem;
	height: 3rem;
	margin: 0 auto 0.75rem;
	border: 2px solid #111827;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.25rem;
	font-weight: 900;
}

.wa-confirm-title {
	margin: 0 0 0.35rem;
	font-size: 1.25rem;
	font-weight: 800;
}

.wa-confirm-subtitle {
	margin: 0;
	font-size: 0.875rem;
	color: #e53935;
}

.wa-confirm-summary {
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	overflow: hidden;
	margin-bottom: 0.5rem;
}

.wa-confirm-row {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	padding: 0.875rem 1rem;
	border-bottom: 1px solid #f3f4f6;
}

.wa-confirm-row:last-child {
	border-bottom: none;
	align-items: center;
}

.wa-confirm-row span:first-child {
	font-size: 1.1rem;
	flex-shrink: 0;
}

.wa-confirm-row small {
	display: block;
	font-size: 0.75rem;
	color: #9ca3af;
	margin-bottom: 0.15rem;
}

.wa-confirm-row p {
	margin: 0;
	font-size: 0.875rem;
	color: #111827;
}

.wa-confirm-row__price {
	margin-left: auto;
	font-size: 0.9375rem;
	font-weight: 800;
	color: #e53935;
	white-space: nowrap;
}

@media (max-width: 480px) {
	.wa-cart-bar {
		left: 0.75rem;
		right: 0.75rem;
		bottom: 0.75rem;
	}

	.wa-cart-bar__label {
		display: none;
	}
}
