/* Key entry modal */
.hbd-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(15, 23, 42, 0.65);
	z-index: 99999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.hbd-modal.hbd-open {
	display: flex;
}

.hbd-box {
	position: relative;
	background: #fff;
	border-radius: 12px;
	padding: 24px;
	width: 100%;
	max-width: 400px;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.hbd-modal button.hbd-close {
	position: absolute;
	top: 8px;
	right: 12px;
	background: none;
	border: 0;
	padding: 0;
	font-size: 24px;
	line-height: 1;
	color: #64748b;
	cursor: pointer;
}

.hbd-title {
	margin: 0 0 6px;
	font-size: 19px;
	line-height: 1.3;
}

.hbd-lead {
	margin: 0 0 16px;
	font-size: 13px;
	line-height: 1.5;
	color: #475569;
}

.hbd-label {
	display: block;
	margin: 0 0 4px;
	font-size: 13px;
	font-weight: 600;
}

.hbd-modal select.hbd-provider,
.hbd-modal input.hbd-key {
	width: 100%;
	padding: 9px 12px;
	margin: 0;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	font-size: 14px;
	box-sizing: border-box;
}

.hbd-note {
	margin: 5px 0 12px;
	font-size: 12px;
	font-weight: 600;
	color: #64748b;
}

.hbd-getkey {
	margin: 6px 0 0;
	font-size: 12px;
}

.hbd-getkey a {
	color: #2271b1;
	font-weight: 600;
	text-decoration: underline;
}

.hbd-error {
	margin: 6px 0 0;
	font-size: 13px;
	color: #c92c2c;
}

.hbd-error:empty {
	margin: 0;
}

.hbd-modal button.hbd-start {
	width: 100%;
	margin-top: 14px;
	padding: var(--btn-accented-padding, var(--btn-padding, 12px 20px));
	min-height: var(--btn-accented-height, var(--btn-height, 42px));
	border: 0;
	border-radius: var(--btn-accented-brd-radius, 6px);
	background-color: var(--btn-accented-bgcolor, #2271b1);
	color: var(--btn-accented-color, #fff);
	box-shadow: var(--btn-accented-box-shadow);
	font-size: var(--btn-accented-font-size, var(--btn-font-size, 15px));
	font-weight: var(--btn-accented-font-weight, var(--btn-font-weight, 600));
	font-family: var(--btn-accented-font-family, var(--btn-font-family, inherit));
	text-transform: var(--btn-accented-transform, var(--btn-transform, uppercase));
	cursor: pointer;
}

.hbd-modal button.hbd-start:hover {
	background-color: var(--btn-accented-bgcolor-hover, #135e96);
	color: var(--btn-accented-color-hover, #fff);
	box-shadow: var(--btn-accented-box-shadow-hover);
}

.hbd-more {
	margin-top: 12px;
	border-top: 1px solid #e2e8f0;
	padding-top: 10px;
	font-size: 12px;
	color: #64748b;
}

.hbd-more summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	cursor: pointer;
	font-weight: 600;
	color: #334155;
	list-style: none;
}

.hbd-more summary::-webkit-details-marker {
	display: none;
}

.hbd-more summary::after {
	content: "+";
	font-size: 18px;
	font-weight: 400;
	line-height: 1;
	color: #2271b1;
	width: 14px;
	text-align: center;
}

.hbd-more[open] summary::after {
	content: "-";
}

.hbd-more p,
.hbd-more ul {
	margin: 8px 0 0;
	line-height: 1.5;
}

.hbd-more ul {
	padding-left: 18px;
}

.hbd-more li {
	margin-bottom: 4px;
}

.hbd-modal button.hbd-forget {
	width: 100%;
	padding: 8px;
	margin-top: 14px;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	background: none;
	font-size: 13px;
	color: #64748b;
	cursor: pointer;
}

/* Nudge banner */
.hbd-nudge {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 99997;
	display: flex;
	align-items: center;
	gap: 12px;
	max-width: calc(100% - 40px);
	padding: 12px 14px;
	border-radius: 10px;
	background: #1e3a5f;
	color: #fff;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.hbd-nudge-text {
	font-size: 13px;
	line-height: 1.4;
}

.hbd-nudge button.hbd-nudge-btn {
	flex-shrink: 0;
	padding: 7px 14px;
	border: 0;
	border-radius: 6px;
	background: #2271b1;
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

.hbd-nudge button.hbd-nudge-close {
	flex-shrink: 0;
	padding: 0;
	border: 0;
	background: none;
	color: #94a3b8;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

@media (max-width: 600px) {
	.hbd-nudge {
		left: 10px;
		right: 10px;
		bottom: 10px;
		max-width: none;
	}
}

/* Demo rules panel */
.hbd-rules {
	margin: 20px 0;
	padding: 18px 20px;
	border: 1px solid #cbd5e1;
	border-left: 4px solid #2271b1;
	border-radius: 8px;
	background: #f8fafc;
}

.hbd-rules-title {
	margin: 0 0 6px;
	font-size: 15px;
	font-weight: 700;
	color: #1e3a5f;
	text-transform: none;
}

.hbd-rules-lead {
	margin: 0 0 14px;
	font-size: 13px;
	line-height: 1.5;
	color: #475569;
}

.hbd-rules-sub {
	margin: 16px 0 6px;
	font-size: 13px;
	font-weight: 600;
	color: #1e3a5f;
}

.hbd-rules table.hbd-rules-table {
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: collapse;
	font-size: 13px;
}

.hbd-rules table.hbd-rules-table th,
.hbd-rules table.hbd-rules-table td {
	padding: 7px 0;
	border: 0;
	border-bottom: 1px solid #e2e8f0;
	background: none;
	text-align: left;
	color: #334155;
}

.hbd-rules table.hbd-rules-table th {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	color: #64748b;
}

.hbd-rules table.hbd-rules-table tr:last-child td {
	border-bottom: 0;
}

.hbd-rules .hbd-rules-floor,
.hbd-rules td.hbd-rules-floor {
	font-weight: 700;
	color: #0f7b3f;
}

.hbd-rules-meta {
	margin: 14px 0 0;
	padding: 12px 0 0;
	border-top: 1px solid #e2e8f0;
	list-style: none;
	font-size: 12px;
	color: #64748b;
}

.hbd-rules-meta li {
	margin: 0 0 4px;
	padding: 0;
	list-style: none;
}

.hbd-rules-meta li:last-child {
	margin-bottom: 0;
}

.hbd-rules-note {
	margin: 12px 0 0;
	padding: 10px 12px;
	border-radius: 6px;
	background: #fef3c7;
	font-size: 12px;
	line-height: 1.5;
	color: #78350f;
}

@keyframes hbd-pulse {
	0% {
		box-shadow: 0 0 0 0 rgba(34, 113, 177, 0.55);
	}

	70% {
		box-shadow: 0 0 0 14px rgba(34, 113, 177, 0);
	}

	100% {
		box-shadow: 0 0 0 0 rgba(34, 113, 177, 0);
	}
}

.hb-offer-btn {
	animation: hbd-pulse 1.6s ease-out 3;
}

@media (prefers-reduced-motion: reduce) {
	.hb-offer-btn {
		animation: none;
	}
}