/* sm-gate.css */
:root {
	--sm-gate-delivery-strip-top: 0px;
	--sm-gate-delivery-strip-push: 52px;
}

.sm-gate-modal-wrapper {
	position: fixed;
	top: 0; left: 0; right: 0; bottom: 0;
	z-index: 2147483647;
	display: flex;
	align-items: center;
	justify-content: center;
}

.sm-gate-modal-overlay {
	position: absolute;
	top: 0; left: 0; right: 0; bottom: 0;
	background: rgba(0,0,0,0.6);
	backdrop-filter: blur(4px);
}

.sm-gate-modal-content {
	position: relative;
	background: #fff;
	width: 100%;
	max-width: 450px;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	border-radius: 12px;
	padding: 30px;
	box-shadow: 0 10px 30px rgba(0,0,0,0.15);
	z-index: 2;
	animation: smGatePopIn 0.3s ease-out;
}

.sm-gate-step {
	max-height: calc(100vh - 180px);
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding-left: 2px;
	padding-right: 2px;
}

@media (max-width: 768px) {
	.sm-gate-modal-wrapper {
		align-items: flex-end;
	}
	body.sm-gate-delivery-strip-visible {
		padding-top: var(--sm-gate-delivery-strip-push, 56px);
	}
	.sm-gate-delivery-strip {
		min-height: 56px;
		padding-inline: 10px;
	}
	.sm-gate-delivery-strip__viewport {
		height: 56px;
	}
	.sm-gate-delivery-strip__text {
		font-size: 13px;
	}
	.sm-gate-active-order-bubble {
		right: 12px;
		bottom: 18px;
		width: min(210px, calc(100vw - 24px));
	}
	.sm-gate-active-order-bubble__link {
		gap: 9px;
		padding: 10px 12px;
	}
	.sm-gate-active-order-bubble__dot {
		width: 10px;
		height: 10px;
		flex: 0 0 10px;
	}
	.sm-gate-active-order-bubble__title {
		font-size: 12px;
	}
	.sm-gate-active-order-bubble__status {
		font-size: 11px;
	}
	.sm-gate-active-order-bubble__close {
		width: 20px;
		height: 20px;
		font-size: 13px;
	}
	.sm-gate-modal-content {
		max-width: 100%;
		max-height: 92vh;
		border-radius: 16px 16px 0 0;
		padding: 16px;
	}
	.sm-gate-step {
		max-height: calc(92vh - 110px);
	}
	.sm-gate-title {
		font-size: 20px;
	}
	.sm-gate-subtitle {
		font-size: 13px;
		margin-bottom: 14px;
	}
}

@keyframes smGatePopIn {
	from { opacity: 0; transform: translateY(20px); }
	to { opacity: 1; transform: translateY(0); }
}

body.sm-gate-delivery-strip-visible {
	padding-top: var(--sm-gate-delivery-strip-push, 52px);
	transition: padding-top 0.2s ease;
}

.sm-gate-delivery-strip {
	position: fixed;
	top: var(--sm-gate-delivery-strip-top, 0px);
	left: 0;
	right: 0;
	z-index: 100;
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 52px;
	padding: 0 12px;
	background: #0f172a;
	color: #fff;
	box-shadow: 0 10px 26px rgba(15, 23, 42, 0.18);
	transition: top 0.2s ease;
}

.sm-gate-delivery-strip__viewport {
	flex: 1;
	min-width: 0;
	height: 52px;
	display: flex;
	align-items: center;
	overflow: hidden;
}

.sm-gate-delivery-strip__track {
	position: relative;
	width: 100%;
	height: 100%;
	overflow: hidden;
}

.sm-gate-delivery-strip__text {
	position: absolute;
	top: 50%;
	left: 0;
	display: inline-block;
	white-space: nowrap;
	font-size: 14px;
	font-weight: 600;
	transform: translate(-110%, -50%);
	will-change: transform, opacity;
}

.sm-gate-delivery-strip.is-animating .sm-gate-delivery-strip__text {
	animation: smGateDeliveryStripMarquee var(--sm-gate-strip-duration, 14s) linear forwards;
}

.sm-gate-delivery-strip__close {
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.sm-gate-delivery-strip__close:hover {
	background: rgba(255, 255, 255, 0.24);
}

.woocommerce-account .woocommerce-MyAccount-content .button,
.woocommerce-account .woocommerce-MyAccount-content button,
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Button,
.woocommerce-account .woocommerce-MyAccount-content input[type="submit"],
.woocommerce-account .woocommerce-MyAccount-content a.button {
	background: #000 !important;
	color: #fff !important;
	border-color: #000 !important;
}

.woocommerce-account .woocommerce-MyAccount-content .button:hover,
.woocommerce-account .woocommerce-MyAccount-content button:hover,
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Button:hover,
.woocommerce-account .woocommerce-MyAccount-content input[type="submit"]:hover,
.woocommerce-account .woocommerce-MyAccount-content a.button:hover {
	background: #1f1f1f !important;
	color: #fff !important;
	border-color: #1f1f1f !important;
}

.woocommerce-account .woocommerce-order-details .shop_table,
.woocommerce-account .woocommerce-table--order-details,
.woocommerce-account .woocommerce-table--order-downloads,
.woocommerce-view-order .shop_table {
	direction: rtl;
}

.woocommerce-account .woocommerce-order-details .shop_table th,
.woocommerce-account .woocommerce-order-details .shop_table td,
.woocommerce-account .woocommerce-table--order-details th,
.woocommerce-account .woocommerce-table--order-details td,
.woocommerce-view-order .shop_table th,
.woocommerce-view-order .shop_table td {
	text-align: right;
}

.sm-gate-dashboard-order {
	margin: 0 0 24px;
}

.sm-gate-dashboard-order__card {
	display: grid;
	gap: 8px;
	padding: 16px;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.sm-gate-dashboard-order__card .button {
	width: fit-content;
}

.sm-gate-active-order-bubble {
	position: fixed;
	right: 18px;
	bottom: 22px;
	z-index: 2147483643;
	width: min(244px, calc(100vw - 28px));
	touch-action: none;
	--sm-gate-active-order-color: #22c55e;
}

.sm-gate-active-order-bubble.is-dragging {
	transition: none !important;
}

.sm-gate-active-order-bubble__close {
	position: absolute;
	top: -6px;
	left: -6px;
	width: 24px;
	height: 24px;
	border: 0;
	border-radius: 999px;
	background: rgba(15, 23, 42, 0.96);
	color: #fff;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	z-index: 2;
}

.sm-gate-active-order-bubble__link {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 13px 15px;
	border-radius: 24px;
	background:
		linear-gradient(#111827, #111827) padding-box,
		conic-gradient(
			var(--sm-gate-active-order-color) calc(var(--sm-gate-active-order-progress, 0) * 1%),
			rgba(255, 255, 255, 0.16) 0
		) border-box;
	color: #fff !important;
	text-decoration: none;
	border: 4px solid transparent;
	box-shadow: 0 16px 28px rgba(15, 23, 42, 0.24);
	position: relative;
	isolation: isolate;
	overflow: hidden;
}

.sm-gate-active-order-bubble__link > * {
	position: relative;
	z-index: 1;
}

.sm-gate-active-order-bubble__dot {
	width: 12px;
	height: 12px;
	flex: 0 0 12px;
	border-radius: 999px;
	background: var(--sm-gate-active-order-color);
	box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.18);
}

.sm-gate-active-order-bubble__content {
	display: grid;
	gap: 3px;
	min-width: 0;
}

.sm-gate-active-order-bubble__title,
.sm-gate-active-order-bubble__status,
.sm-gate-active-order-bubble__eta {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sm-gate-active-order-bubble__title {
	font-size: 15px;
	font-weight: 700;
}

.sm-gate-active-order-bubble__status {
	font-size: 13px;
	opacity: 0.9;
}

.sm-gate-active-order-bubble__eta {
	font-size: 12px;
	opacity: 0.86;
}

.sm-gate-active-order-dismiss {
	position: fixed;
	left: 50%;
	bottom: 16px;
	transform: translateX(-50%);
	z-index: 2147483642;
}

.sm-gate-active-order-dismiss__target {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 58px;
	height: 58px;
	border-radius: 999px;
	background: rgba(17, 24, 39, 0.92);
	color: #fff;
	font-size: 24px;
	font-weight: 700;
	box-shadow: 0 12px 24px rgba(15, 23, 42, 0.24);
}

@media (max-width: 768px) {
	.sm-gate-active-order-bubble {
		right: 12px;
		bottom: 74px;
		width: min(196px, calc(100vw - 24px));
	}
	.sm-gate-active-order-bubble__link {
		gap: 8px;
		padding: 9px 11px;
		border-radius: 20px;
	}
	.sm-gate-active-order-bubble__dot {
		width: 9px;
		height: 9px;
		flex: 0 0 9px;
	}
	.sm-gate-active-order-bubble__title {
		font-size: 12px;
	}
	.sm-gate-active-order-bubble__status,
	.sm-gate-active-order-bubble__eta {
		font-size: 10px;
	}
	.sm-gate-active-order-bubble__close {
		width: 20px;
		height: 20px;
		font-size: 13px;
	}
}

@keyframes smGateDeliveryStripMarquee {
	from {
		transform: translate(-110%, -50%);
		opacity: 0;
	}
	10% {
		opacity: 1;
	}
	90% {
		opacity: 1;
	}
	to {
		transform: translate(calc(100vw - 140px), -50%);
		opacity: 0;
	}
}

.sm-gate-modal-close {
	position: absolute;
	top: 15px;
	right: 15px;
	background: none;
	border: none;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	color: #666;
}
.sm-gate-modal-close:hover { color: #000; }

.sm-gate-title {
	margin-top: 0;
	margin-bottom: 10px;
	font-size: 22px;
	text-align: center;
	color: #333;
}

.sm-gate-subtitle {
	text-align: center;
	color: #666;
	margin-bottom: 20px;
	font-size: 14px;
}

.sm-gate-row {
	margin-bottom: 15px;
}

.sm-gate-row label {
	display: block;
	margin-bottom: 5px;
	font-weight: 600;
	color: #444;
}

.sm-gate-row label input[type="radio"] {
	margin-left: 8px;
}

.sm-gate-auth-option {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	margin-bottom: 10px;
	border: 1px solid #d0d7de;
	border-radius: 14px;
	background: #fff;
	cursor: pointer;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.sm-gate-auth-option:hover {
	border-color: #111827;
	box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.sm-gate-auth-option.is-active {
	border-color: #111827;
	background: #f8fafc;
	box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.sm-gate-auth-option input[type="radio"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.sm-gate-auth-option__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 12px;
	background: #111827;
	color: #fff;
	flex: 0 0 42px;
}

.sm-gate-auth-option__icon svg {
	width: 20px;
	height: 20px;
	display: block;
}

.sm-gate-auth-option__title {
	font-size: 15px;
	font-weight: 700;
	color: #111827;
}

.sm-gate-row input[type="text"],
.sm-gate-row input[type="tel"],
.sm-gate-row input[type="email"],
.sm-gate-row input[type="date"],
.sm-gate-row textarea,
.sm-gate-row select {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #ccc;
	border-radius: 6px;
	font-size: 16px;
	box-sizing: border-box;
}

#sm-gate-delivery-time-wrapper label {
	display: inline-block;
	margin-left: 12px;
}

#sm-gate-schedule-fields {
	background: #f8f9fb;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 12px;
}

.sm-gate-row input[type="radio"] {
	margin-right: 5px;
}

.sm-gate-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 20px;
}

.sm-gate-btn {
	width: 100%;
	padding: 12px;
	border: none;
	border-radius: 6px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
}

.sm-gate-btn-primary {
	background: #000;
	color: #fff;
}
.sm-gate-btn-primary:hover { background: #333; }

.sm-gate-btn-secondary {
	background: #eee;
	color: #333;
}
.sm-gate-btn-secondary:hover { background: #ddd; }

.sm-gate-divider {
	text-align: center;
	margin: 20px 0;
	position: relative;
}
.sm-gate-divider::before {
	content: "";
	position: absolute;
	top: 50%; left: 0; right: 0;
	border-top: 1px solid #ddd;
	z-index: 1;
}
.sm-gate-divider span {
	background: #fff;
	padding: 0 10px;
	position: relative;
	z-index: 2;
	color: #999;
	font-size: 12px;
}

.sm-gate-google-wrapper {
	display: flex;
	width: 100%;
	justify-content: center;
	align-items: center;
	min-height: 48px;
	margin-bottom: 10px;
	position: relative;
	z-index: 4;
	pointer-events: auto;
}

.sm-gate-google-btn-host {
	width: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 44px;
}

.sm-gate-google-btn-host > div,
.sm-gate-google-wrapper iframe {
	position: relative;
	z-index: 5;
	pointer-events: auto !important;
}

.sm-gate-google-wrapper [role="button"] {
	pointer-events: auto !important;
}

@media (min-width: 769px) {
	.sm-gate-step {
		overflow-x: visible;
	}

	.sm-gate-google-wrapper {
		overflow: visible !important;
		isolation: isolate;
	}

	.sm-gate-google-wrapper > div,
	.sm-gate-google-wrapper iframe,
	.sm-gate-google-wrapper [role="button"] {
		position: relative !important;
		z-index: 9999 !important;
		visibility: visible !important;
		opacity: 1 !important;
	}
}

.sm-gate-notice {
	margin-top: 15px;
	padding: 10px;
	border-radius: 6px;
	font-size: 14px;
	text-align: center;
}
.sm-gate-notice.error { background: #fee; color: #c00; border: 1px solid #fcc; }
.sm-gate-notice.success { background: #efe; color: #0c0; border: 1px solid #cfc; }

.sm-gate-checkout-card {
	margin-bottom: 16px;
	padding: 14px 16px;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	background: #f8fafc;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.sm-gate-checkout-card__editor[hidden] {
	display: none !important;
}

.sm-gate-checkout-card__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 8px;
}

.sm-gate-checkout-card__title {
	font-size: 15px;
	font-weight: 700;
	color: #0f172a;
}

.sm-gate-checkout-card__edit {
	padding: 0;
	border: 0;
	background: transparent;
	color: #2563eb;
	font-size: 13px;
	font-weight: 600;
	text-decoration: underline;
	cursor: pointer;
}

.sm-gate-checkout-card__summary {
	padding-bottom: 2px;
}

.sm-gate-checkout-card.is-expanded .sm-gate-checkout-card__summary {
	padding-bottom: 12px;
	margin-bottom: 14px;
	border-bottom: 1px solid #dbe3ef;
}

.sm-gate-checkout-card__primary {
	color: #111827;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.5;
}

.sm-gate-checkout-card__secondary {
	margin-top: 4px;
	color: #64748b;
	font-size: 13px;
	line-height: 1.5;
}

.sm-gate-checkout-card__editor-actions {
	display: flex;
	gap: 10px;
	margin-top: 14px;
}

.sm-gate-checkout-card__editor-actions .sm-gate-btn {
	margin-top: 0;
}

.sm-gate-checkout-card__editor-actions .sm-gate-btn-primary,
.sm-gate-checkout-card__editor-actions .sm-gate-btn-secondary {
	width: auto;
	min-width: 110px;
}

.sm-gate-checkout-card .woocommerce-billing-fields__field-wrapper {
	margin-top: 0;
}

.sm-gate-checkout-card--billing .woocommerce-billing-fields__field-wrapper {
	display: block;
}

.sm-gate-checkout-card--billing .form-row {
	float: none !important;
	width: 100% !important;
	margin: 0 0 12px !important;
	padding: 0 !important;
}

.sm-gate-checkout-card--billing label {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
	font-weight: 600;
	color: #334155;
}

.sm-gate-checkout-card--billing .woocommerce-input-wrapper {
	display: block;
}

.sm-gate-checkout-card--billing input.input-text,
.sm-gate-checkout-card--billing select,
.sm-gate-checkout-card--billing textarea {
	width: 100%;
	min-height: 42px;
	padding: 10px 12px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	background: #fff;
	box-sizing: border-box;
	font-size: 15px;
	line-height: 1.4;
	box-shadow: none;
}

.sm-gate-checkout-card--billing textarea {
	min-height: 84px;
	resize: vertical;
}

.sm-gate-checkout-card--billing input.input-text:focus,
.sm-gate-checkout-card--billing select:focus,
.sm-gate-checkout-card--billing textarea:focus {
	border-color: #2563eb;
	outline: none;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.sm-gate-delivery-summary-row--enhanced td {
	padding-left: 0 !important;
	padding-right: 0 !important;
}

.sm-gate-inline-delivery-editor {
	padding: 0;
	max-height: none;
	overflow: visible;
}

.sm-gate-inline-delivery-editor .sm-gate-title,
.sm-gate-inline-delivery-editor .sm-gate-actions {
	display: none !important;
}

.woocommerce-shipping-fields,
.woocommerce form .ship-to-different-address {
	display: none !important;
}

.sm-gate-account-addresses {
	display: grid;
	gap: 24px;
	margin-top: 12px;
}

.sm-gate-account-addresses__group {
	display: grid;
	gap: 14px;
}

.sm-gate-account-addresses__heading {
	margin: 0;
	font-size: 22px;
	font-weight: 700;
	color: #0f172a;
}

.sm-gate-account-addresses__empty {
	padding: 18px;
	border: 1px dashed #cbd5e1;
	border-radius: 14px;
	background: #f8fafc;
	color: #64748b;
}

.sm-gate-account-address-card {
	padding: 18px;
	border: 1px solid #e5e7eb;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.sm-gate-account-address-card__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 10px;
}

.sm-gate-account-address-card__title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: #0f172a;
}

.sm-gate-account-address-card__badge {
	display: inline-flex;
	margin-top: 6px;
	padding: 4px 10px;
	border-radius: 999px;
	background: #e0f2fe;
	color: #075985;
	font-size: 12px;
	font-weight: 700;
}

.sm-gate-account-address-card__primary {
	font-size: 15px;
	font-weight: 600;
	line-height: 1.6;
	color: #111827;
}

.sm-gate-account-address-card__secondary {
	margin-top: 4px;
	font-size: 13px;
	line-height: 1.6;
	color: #64748b;
}

.sm-gate-account-address-card__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 14px;
}

.sm-gate-account-address-card__button {
	margin: 0 !important;
}
