/* Host Cloud Orders — two-column Pay Securely modal */

body.hco-open {
	overflow: hidden;
}

.hco-modal[hidden] {
	display: none !important;
}

.hco-modal {
	--hco-navy: #0c1f40;
	--hco-navy-mid: #1d3664;
	--hco-blue: #3b82f6;
	--hco-cyan: #6ec1e4;
	--hco-text: #0f172a;
	--hco-muted: #64748b;
	--hco-border: rgba(15, 23, 42, 0.1);
	--hco-radius: 20px;
	--hco-font: "Outfit", "Segoe UI", system-ui, -apple-system, sans-serif;
	--hco-font-body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;

	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.25rem;
	font-family: var(--hco-font-body);
	-webkit-font-smoothing: antialiased;
}

.hco-modal *,
.hco-modal *::before,
.hco-modal *::after {
	box-sizing: border-box;
}

.hco-backdrop {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse 80% 60% at 50% 0%, rgba(59, 130, 246, 0.14), transparent 60%),
		rgba(8, 15, 30, 0.72);
	backdrop-filter: blur(12px) saturate(120%);
	-webkit-backdrop-filter: blur(12px) saturate(120%);
	opacity: 0;
	transition: opacity 0.32s ease;
}

.hco-modal.hco-visible .hco-backdrop {
	opacity: 1;
}

.hco-card {
	position: relative;
	width: min(100%, 920px);
	max-height: calc(100vh - 2.5rem);
	overflow: hidden auto;
	background: #fff;
	border-radius: var(--hco-radius);
	border: 1px solid rgba(255, 255, 255, 0.7);
	box-shadow:
		0 0 0 1px rgba(15, 23, 42, 0.04),
		0 32px 64px -12px rgba(12, 31, 64, 0.35),
		0 12px 24px -8px rgba(12, 31, 64, 0.18);
	opacity: 0;
	transform: translateY(18px) scale(0.97);
	transition:
		opacity 0.34s cubic-bezier(0.22, 1, 0.36, 1),
		transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.hco-modal.hco-visible .hco-card {
	opacity: 1;
	transform: translateY(0) scale(1);
}

.hco-close {
	position: absolute;
	top: 0.85rem;
	right: 0.85rem;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	margin: 0;
	padding: 0;
	border: 0 !important;
	border-radius: 999px !important;
	background: #f1f5f9 !important;
	color: #334155 !important;
	font-size: 1.35rem !important;
	line-height: 1 !important;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
	box-shadow: none !important;
}

.hco-close:hover {
	background: #e2e8f0 !important;
	transform: scale(1.05);
}

/* White top bar */
.hco-head {
	position: relative;
	padding: 1.35rem 1.75rem 1.15rem;
	background: #fff;
	border-bottom: 1px solid rgba(15, 23, 42, 0.08);
	color: var(--hco-text);
	overflow: hidden;
}

.hco-head-inner {
	position: relative;
	z-index: 1;
	padding-right: 2.5rem;
}

.hco-brand {
	margin: 0 0 0.35rem;
	font-family: var(--hco-font);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--hco-blue);
}

.hco-title {
	margin: 0 0 0.25rem;
	font-family: var(--hco-font);
	font-size: clamp(1.4rem, 3vw, 1.75rem);
	font-weight: 750;
	line-height: 1.15;
	letter-spacing: -0.02em;
	color: var(--hco-navy) !important;
}

.hco-sub {
	margin: 0;
	font-size: 0.92rem;
	line-height: 1.45;
	color: var(--hco-muted) !important;
}

.hco-body {
	padding: 1.25rem 1.5rem 1.5rem;
}

.hco-form {
	display: grid;
	gap: 0;
}

.hco-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 1.35rem 1.5rem;
	align-items: start;
}

.hco-cart-col,
.hco-details-col {
	min-width: 0;
}

.hco-section-title {
	margin: 0 0 0.65rem;
	font-family: var(--hco-font);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--hco-muted);
}

.hco-field {
	display: block;
	margin: 0;
}

.hco-details {
	display: grid;
	gap: 0.75rem;
}

.hco-field span {
	display: block;
	margin-bottom: 0.35rem;
	font-family: var(--hco-font);
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--hco-text);
}

.hco-field em {
	font-style: normal;
	font-weight: 500;
	color: var(--hco-blue);
}

.hco-field input,
.hco-field select {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0.72rem 0.9rem !important;
	border: 1px solid var(--hco-border) !important;
	border-radius: 11px !important;
	background: #fff !important;
	color: var(--hco-text) !important;
	font-family: var(--hco-font-body) !important;
	font-size: 0.98rem !important;
	line-height: 1.4 !important;
	box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03) !important;
	transition:
		border-color 0.2s ease,
		background 0.2s ease,
		box-shadow 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.hco-field select {
	padding-right: 2.4rem !important;
	background-image:
		linear-gradient(45deg, transparent 50%, #64748b 50%),
		linear-gradient(135deg, #64748b 50%, transparent 50%) !important;
	background-position:
		calc(100% - 18px) calc(50% - 3px),
		calc(100% - 12px) calc(50% - 3px) !important;
	background-size: 6px 6px, 6px 6px !important;
	background-repeat: no-repeat !important;
	cursor: pointer;
}

.hco-field input::placeholder {
	color: #94a3b8;
	opacity: 1;
}

.hco-field input:hover,
.hco-field select:hover {
	border-color: rgba(59, 130, 246, 0.28) !important;
}

.hco-field input:focus,
.hco-field select:focus {
	outline: none !important;
	border-color: var(--hco-blue) !important;
	box-shadow:
		0 0 0 4px rgba(59, 130, 246, 0.14),
		inset 0 1px 2px rgba(15, 23, 42, 0.03) !important;
}

.hco-submit {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	width: 100%;
	margin: 1.15rem 0 0;
	padding: 0.92rem 1.15rem !important;
	border: 0 !important;
	border-radius: 12px !important;
	background: linear-gradient(135deg, var(--hco-blue) 0%, #2563eb 48%, var(--hco-navy-mid) 100%) !important;
	color: #fff !important;
	font-family: var(--hco-font) !important;
	font-size: 1rem !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
	letter-spacing: 0.01em;
	cursor: pointer;
	box-shadow:
		0 10px 24px -8px rgba(37, 99, 235, 0.55),
		inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
	transition:
		transform 0.18s ease,
		box-shadow 0.18s ease,
		filter 0.18s ease;
	text-decoration: none !important;
	text-transform: none !important;
}

.hco-submit:hover:not(:disabled) {
	transform: translateY(-1px);
	filter: brightness(1.04);
	box-shadow:
		0 14px 28px -8px rgba(37, 99, 235, 0.62),
		inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
}

.hco-submit:active:not(:disabled) {
	transform: translateY(0);
}

.hco-submit:disabled {
	opacity: 0.72;
	cursor: wait;
}

.hco-submit-icon {
	display: inline-flex;
	font-size: 1.05rem;
	line-height: 1;
	transition: transform 0.2s ease;
}

.hco-submit:hover:not(:disabled) .hco-submit-icon {
	transform: translateX(3px);
}

.hco-foot {
	margin: 0.75rem 0 0;
	font-size: 0.78rem;
	line-height: 1.45;
	text-align: center;
	color: var(--hco-muted);
}

.hco-msg {
	margin: 0.85rem 0 0;
	padding: 0.72rem 0.85rem;
	border-radius: 10px;
	font-size: 0.88rem;
	line-height: 1.45;
}

.hco-msg-ok {
	background: #ecfdf5;
	color: #047857;
	border: 1px solid #a7f3d0;
}

.hco-msg-error {
	background: #fef2f2;
	color: #b91c1c;
	border: 1px solid #fecaca;
}

.hco-plan {
	display: none;
}

/* Cart */
.hco-cart {
	margin: 0;
	padding: 0;
	border-radius: 14px;
	background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
	border: 1px solid rgba(15, 23, 42, 0.08);
	overflow: hidden;
}

.hco-cart[hidden] {
	display: none !important;
}

.hco-cart-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.85rem 1rem 0.55rem;
}

.hco-cart-title {
	font-family: var(--hco-font);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--hco-muted);
}

.hco-cart-chip {
	display: inline-block;
	padding: 0.22rem 0.55rem;
	border-radius: 999px;
	background: rgba(12, 31, 64, 0.08);
	border: 1px solid rgba(12, 31, 64, 0.1);
	font-family: var(--hco-font);
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--hco-navy);
	white-space: nowrap;
}

.hco-cart-chip[hidden] {
	display: none !important;
}

.hco-cart-lines {
	padding: 0 0.35rem 0.35rem;
}

.hco-cart-line {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.55rem 0.7rem;
	border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.hco-cart-line:first-child {
	border-top: 0;
}

.hco-cart-line--total {
	margin-top: 0.15rem;
	border-top: 1px dashed rgba(15, 23, 42, 0.14);
	background: rgba(255, 255, 255, 0.55);
	border-radius: 0 0 12px 12px;
	padding-top: 0.7rem;
	padding-bottom: 0.75rem;
}

.hco-cart-k {
	font-family: var(--hco-font);
	font-size: 0.86rem;
	font-weight: 600;
	color: var(--hco-muted);
}

.hco-cart-k em {
	font-style: normal;
	font-weight: 500;
	font-size: 0.75rem;
	color: #94a3b8;
}

.hco-cart-v {
	font-family: var(--hco-font);
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--hco-text);
	text-align: right;
	line-height: 1.3;
	word-break: break-word;
}

.hco-cart-line--total .hco-cart-k,
.hco-cart-line--total .hco-cart-v {
	font-size: 1.05rem;
	font-weight: 800;
	color: #0f2a5f;
}

.hco-summary-period {
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--hco-muted);
	margin-left: 0.15rem;
}

.hco-cart-incl {
	display: block;
	margin-top: 0.1rem;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--hco-muted);
}

.hco-secure {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	margin: 0.75rem 0 0;
	font-size: 0.75rem;
	color: var(--hco-muted);
}

.hco-thanks {
	text-align: center;
	padding: 1.5rem 0.5rem 0.75rem;
}

.hco-thanks h3 {
	margin: 0 0 0.55rem;
	font-family: var(--hco-font);
	font-size: 1.35rem;
	font-weight: 700;
	color: var(--hco-text);
}

.hco-thanks p {
	margin: 0;
	font-size: 0.98rem;
	line-height: 1.55;
	color: var(--hco-muted);
}

.hco-form[hidden],
.hco-thanks[hidden] {
	display: none !important;
}

@media (max-width: 820px) {
	.hco-layout {
		grid-template-columns: 1fr;
	}

	/* Mobile: details on top, cart at bottom */
	.hco-details-col {
		order: 1;
	}

	.hco-cart-col {
		order: 2;
	}
}

@media (max-width: 480px) {
	.hco-modal {
		padding: 0.75rem;
		align-items: flex-end;
	}

	.hco-card {
		border-bottom-left-radius: 0;
		border-bottom-right-radius: 0;
		max-height: calc(100vh - 0.75rem);
	}

	.hco-head {
		padding: 1.15rem 1.15rem 1rem;
	}

	.hco-body {
		padding: 1rem 1.1rem 1.25rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hco-backdrop,
	.hco-card,
	.hco-close,
	.hco-submit,
	.hco-submit-icon,
	.hco-field input,
	.hco-field select {
		transition: none !important;
	}

	.hco-modal.hco-visible .hco-card {
		transform: none;
	}
}
