/* NSS HostBill Connector — frontend */

.nss-hb-products-grid {
	display: grid;
	gap: 24px;
	margin: 24px 0;
}

.nss-hb-product {
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 20px;
	background: #fff;
	display: flex;
	flex-direction: column;
	transition: box-shadow .2s, transform .2s;
	position: relative;
}
.nss-hb-product:hover {
	box-shadow: 0 6px 24px rgba(0,0,0,.08);
	transform: translateY(-2px);
}

.nss-hb-product-image img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 4px;
	margin-bottom: 12px;
}

.nss-hb-product-title {
	margin: 0 0 8px;
	font-size: 1.15em;
}

.nss-hb-product-desc {
	color: #555;
	font-size: .92em;
	margin-bottom: 12px;
	flex: 1;
}

.nss-hb-product-price {
	font-size: 1.3em;
	font-weight: 700;
	color: #c62828;
	margin: 8px 0 14px;
}
.nss-hb-cycle {
	font-size: .65em;
	font-weight: 400;
	color: #777;
	margin-left: 4px;
}

/* Buy button — overrides any theme '.button' styles */
.nss-hb-product .nss-hb-add-to-cart,
.nss-hb-product .nss-hb-buy-now,
a.nss-hb-buy-now,
button.nss-hb-add-to-cart {
	width: 100% !important;
	padding: 12px 18px !important;
	background: #c62828 !important;
	background-color: #c62828 !important;
	background-image: none !important;
	color: #ffffff !important;
	border: 1px solid #c62828 !important;
	border-radius: 6px !important;
	cursor: pointer !important;
	font-weight: 700 !important;
	font-size: 1em !important;
	line-height: 1.4 !important;
	transition: background .15s, transform .1s !important;
	text-align: center !important;
	text-decoration: none !important;
	text-shadow: none !important;
	display: inline-block !important;
	box-sizing: border-box !important;
	box-shadow: 0 2px 4px rgba(198, 40, 40, .25) !important;
}
.nss-hb-product .nss-hb-add-to-cart:hover,
.nss-hb-product .nss-hb-buy-now:hover,
a.nss-hb-buy-now:hover,
button.nss-hb-add-to-cart:hover {
	background: #a31818 !important;
	background-color: #a31818 !important;
	border-color: #a31818 !important;
	color: #ffffff !important;
	transform: translateY(-1px) !important;
	box-shadow: 0 4px 8px rgba(198, 40, 40, .35) !important;
}
.nss-hb-product .nss-hb-add-to-cart:active,
.nss-hb-product .nss-hb-buy-now:active,
a.nss-hb-buy-now:active,
button.nss-hb-add-to-cart:active {
	transform: translateY(0) !important;
	box-shadow: 0 1px 2px rgba(198, 40, 40, .25) !important;
}
a.nss-hb-buy-now:visited,
a.nss-hb-buy-now:focus {
	color: #ffffff !important;
	text-decoration: none !important;
}
.nss-hb-add-to-cart:disabled,
.nss-hb-add-to-cart.is-loading {
	opacity: .6;
	cursor: wait;
}

/* Cart */
.nss-hb-cart-table {
	width: 100%;
	border-collapse: collapse;
	margin: 24px 0;
}
.nss-hb-cart-table th,
.nss-hb-cart-table td {
	padding: 12px;
	border-bottom: 1px solid #eee;
	text-align: left;
}
.nss-hb-cart-table thead th {
	background: #f5f5f5;
	font-weight: 600;
}
.nss-hb-cart-table tfoot th {
	background: #fafafa;
	font-size: 1.1em;
}
.nss-hb-qty {
	width: 70px;
	padding: 6px 8px;
	border: 1px solid #ccc;
	border-radius: 4px;
}
.nss-hb-cart-actions {
	display: flex;
	gap: 12px;
	justify-content: flex-end;
	margin-top: 18px;
}
.nss-hb-remove {
	color: #c62828;
	background: transparent;
	border: none;
	cursor: pointer;
}
.nss-hb-cart-empty {
	padding: 40px;
	text-align: center;
	color: #777;
	background: #fafafa;
	border-radius: 8px;
}

/* Checkout */
.nss-hb-checkout-summary {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 30px;
}
.nss-hb-checkout-summary th,
.nss-hb-checkout-summary td {
	padding: 10px;
	border-bottom: 1px solid #eee;
	text-align: left;
}
.nss-hb-checkout-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-bottom: 24px;
}
.nss-hb-checkout-grid .nss-hb-full { grid-column: 1 / -1; }
.nss-hb-checkout-grid label {
	display: block;
	font-weight: 600;
	margin-bottom: 4px;
	font-size: .92em;
}
.nss-hb-checkout-grid input,
.nss-hb-checkout-form select {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #ccc;
	border-radius: 6px;
	font-size: 1em;
}

.nss-hb-submit-order {
	padding: 14px 32px;
	font-size: 1.05em;
	background: #2e7d32;
	color: #fff;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	font-weight: 700;
}
.nss-hb-submit-order:hover { background: #1b5e20; }
.nss-hb-submit-order:disabled { opacity: .6; cursor: wait; }

/* Notices and flashes */
.nss-hb-notice {
	padding: 12px 16px;
	border-radius: 6px;
	margin: 16px 0;
}
.nss-hb-notice-info    { background: #e3f2fd; color: #0d47a1; border-left: 4px solid #1976d2; }
.nss-hb-notice-warning { background: #fff3e0; color: #e65100; border-left: 4px solid #f57c00; }
.nss-hb-notice-error   { background: #ffebee; color: #b71c1c; border-left: 4px solid #c62828; }

.nss-hb-flash {
	padding: 8px 12px;
	border-radius: 4px;
	margin-top: 8px;
	font-size: .92em;
}
.nss-hb-flash-success { background: #c8e6c9; color: #1b5e20; }
.nss-hb-flash-error   { background: #ffcdd2; color: #b71c1c; }
.nss-hb-flash-info    { background: #bbdefb; color: #0d47a1; }

@media (max-width: 720px) {
	.nss-hb-checkout-grid { grid-template-columns: 1fr; }
	.nss-hb-cart-table thead { display: none; }
	.nss-hb-cart-table tr {
		display: block;
		margin-bottom: 14px;
		border-bottom: 2px solid #eee;
		padding-bottom: 14px;
	}
	.nss-hb-cart-table td { display: flex; justify-content: space-between; border-bottom: none; padding: 4px 0; }
}

/* --- Term-based purchasing (v1.4.0) --- */
.nss-hb-product { position: relative; }
.nss-hb-trial-badge {
	display: inline-block;
	background: #2e8b57;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	padding: 3px 10px;
	border-radius: 4px;
	margin-bottom: 8px;
}
.nss-hb-trial-badge-sm { font-size: 11px; padding: 1px 7px; margin-left: 6px; }
.nss-hb-trial-note { display: block; font-size: 13px; color: #2e8b57; margin-top: 4px; }
.nss-hb-cycle-field { margin: 12px 0 8px; }
.nss-hb-cycle-label { display: block; font-size: 13px; color: #555; margin-bottom: 4px; font-weight: 600; }
.nss-hb-cycle-select {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #ccc;
	border-radius: 6px;
	font-size: 14px;
	background: #fff;
	cursor: pointer;
}
.nss-hb-cycle-select:focus { border-color: #ca000f; outline: none; }
.nss-hb-product-trial { border: 1px solid #2e8b57; }

/* --- Payment methods (HostBill modules) v1.5.0 --- */
.nss-hb-payment-methods { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 4px; }
.nss-hb-payment-option {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 14px;
	border: 1px solid #ddd;
	border-radius: 8px;
	cursor: pointer;
	transition: .15s;
}
.nss-hb-payment-option:hover { border-color: #ca000f; background: #fff7f7; }
.nss-hb-payment-option input { margin: 0; }
.nss-hb-payment-option span { font-weight: 600; color: #333; }

/* --- Domain fields at checkout (v1.6.0) --- */
.nss-hb-domain-hint { color:#666; font-size:14px; margin:4px 0 10px; }
.nss-hb-domain-fields p { margin:0 0 12px; }
.nss-hb-domain-fields label { display:block; font-weight:600; margin-bottom:4px; font-size:14px; }
.nss-hb-domain-fields input { width:100%; padding:9px 12px; border:1px solid #ccc; border-radius:6px; font-size:15px; }
.nss-hb-domain-fields input:focus { border-color:#ca000f; outline:none; }

/* --- SSL upsell modal (v1.10.0) --- */
.nss-hb-up-overlay{position:fixed;inset:0;background:rgba(0,0,0,.5);display:flex;align-items:center;justify-content:center;z-index:99999;padding:16px}
.nss-hb-up-modal{background:#fff;border-radius:14px;max-width:560px;width:100%;max-height:90vh;overflow:auto;box-shadow:0 20px 60px rgba(0,0,0,.3)}
.nss-hb-up-head{background:#ca000f;color:#fff;padding:18px 24px;border-radius:14px 14px 0 0}
.nss-hb-up-head h3{margin:0;font-size:19px;color:#fff}
.nss-hb-up-head p{margin:4px 0 0;opacity:.9;font-size:14px}
.nss-hb-up-body{padding:18px 24px}
.nss-hb-up-row{display:flex;align-items:center;gap:12px;padding:14px;border:1px solid #eee;border-radius:10px;margin-bottom:10px;cursor:pointer;transition:.15s}
.nss-hb-up-row:hover{border-color:#ca000f;background:#fff7f7}
.nss-hb-up-row.sel{border-color:#ca000f;background:#fff2f2}
.nss-hb-up-row input{width:18px;height:18px;accent-color:#ca000f;margin:0}
.nss-hb-up-n{flex:1;font-weight:600}
.nss-hb-up-p{color:#ca000f;font-weight:700;white-space:nowrap}
.nss-hb-up-foot{padding:16px 24px;border-top:1px solid #eee;display:flex;gap:10px}
.nss-hb-up-foot .button{flex:1}

/* ---- 3-mode domain selector (checkout) ---- */
.nss-hb-domain-block {
	border: 1px solid #e3e8ef;
	border-radius: 8px;
	padding: 14px 16px;
	margin-bottom: 14px;
	background: #fafbfc;
}
.nss-hb-domain-title {
	margin: 0 0 10px;
	font-size: 14px;
}
.nss-hb-dm-opt {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	padding: 6px 0;
	cursor: pointer;
}
.nss-hb-dm-opt input[type="radio"] { margin: 0; }
.nss-hb-dm-panel {
	margin: 4px 0 10px 26px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}
.nss-hb-dm-panel .nss-hb-dm-input {
	flex: 1 1 220px;
	min-width: 180px;
	padding: 8px 10px;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	font-size: 14px;
}
.nss-hb-dm-check {
	white-space: nowrap;
}
.nss-hb-dm-check-result {
	flex-basis: 100%;
	font-size: 13px;
	margin-top: 2px;
	min-height: 1em;
}
.nss-hb-dm-check-result.ok  { color: #0a7d33; }
.nss-hb-dm-check-result.bad { color: #ca000f; }
.nss-hb-domain-hint {
	flex-basis: 100%;
	margin: 2px 0 0;
	font-size: 12px;
	color: #6b7280;
}
.nss-hb-dm-subwrap {
	display: inline-flex;
	align-items: stretch;
	flex: 1 1 220px;
	min-width: 180px;
}
.nss-hb-dm-subwrap .nss-hb-dm-subinput {
	flex: 1 1 auto;
	min-width: 0;
	border-top-right-radius: 0;
	border-bottom-right-radius: 0;
}
.nss-hb-dm-suffix {
	display: inline-flex;
	align-items: center;
	padding: 0 10px;
	background: #eef2f7;
	border: 1px solid #cbd5e1;
	border-left: 0;
	border-top-right-radius: 6px;
	border-bottom-right-radius: 6px;
	font-size: 14px;
	color: #334155;
	white-space: nowrap;
}

/* ---- Domain search ([hostbill_domain_search]) ---- */
.nss-hb-dsearch {
	max-width: 760px;
	margin: 0 auto;
}
.nss-hb-ds-title { text-align: center; margin: 0 0 6px; }
.nss-hb-ds-sub { text-align: center; color: #6b7280; margin: 0 0 20px; }
.nss-hb-ds-inputwrap {
	display: flex;
	gap: 8px;
}
.nss-hb-ds-input {
	flex: 1 1 auto;
	min-width: 0;
	padding: 14px 16px;
	font-size: 16px;
	border: 2px solid #cbd5e1;
	border-radius: 8px;
}
.nss-hb-ds-input:focus { outline: none; border-color: #ca000f; }
.nss-hb-ds-btn {
	flex: 0 0 auto;
	padding: 0 26px;
	font-size: 16px;
	background: #ca000f;
	color: #fff;
	border: 0;
	border-radius: 8px;
	cursor: pointer;
}
.nss-hb-ds-btn:hover { background: #a5000c; }
.nss-hb-ds-btn:disabled { opacity: .6; cursor: default; }
.nss-hb-ds-hint { color: #9ca3af; font-size: 13px; margin: 8px 2px 0; }
.nss-hb-ds-status { margin: 18px 2px 10px; min-height: 1.4em; font-size: 15px; }
.nss-hb-ds-ok { color: #0a7d33; font-weight: 600; }
.nss-hb-ds-spin {
	display: inline-block; width: 14px; height: 14px; vertical-align: -2px;
	border: 2px solid #cbd5e1; border-top-color: #ca000f; border-radius: 50%;
	animation: nss-hb-ds-rot .7s linear infinite;
}
@keyframes nss-hb-ds-rot { to { transform: rotate(360deg); } }

.nss-hb-ds-row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	margin-bottom: 8px;
	background: #fff;
}
.nss-hb-ds-row.is-available { border-color: #b7e4c7; background: #f6fdf8; }
.nss-hb-ds-row.is-taken { opacity: .72; }
.nss-hb-ds-dot { flex: 0 0 auto; font-size: 12px; }
.nss-hb-ds-name { flex: 1 1 auto; font-size: 16px; font-weight: 600; word-break: break-all; }
.nss-hb-ds-prem {
	font-size: 11px; font-style: normal; background: #fde68a; color: #92400e;
	padding: 1px 6px; border-radius: 4px; margin-left: 6px;
}
.nss-hb-ds-price { flex: 0 0 auto; color: #111827; font-weight: 600; white-space: nowrap; }
.nss-hb-ds-price small { color: #6b7280; font-weight: 400; }
.nss-hb-ds-price-ask { color: #6b7280; font-weight: 400; font-size: 14px; }
.nss-hb-ds-taken-label { flex: 0 0 auto; color: #9ca3af; font-size: 14px; }
.nss-hb-ds-reg {
	flex: 0 0 auto;
	padding: 8px 16px;
	background: #ca000f; color: #fff; border: 0; border-radius: 6px;
	text-decoration: none; font-size: 14px; white-space: nowrap;
}
.nss-hb-ds-reg:hover { background: #a5000c; color: #fff; }
@media (max-width: 560px) {
	.nss-hb-ds-row { flex-wrap: wrap; }
	.nss-hb-ds-name { flex: 1 1 100%; }
}
.nss-hb-ds-more { text-align: center; margin-top: 14px; }
.nss-hb-ds-more a { color: #ca000f; font-size: 14px; text-decoration: none; }
.nss-hb-ds-more a:hover { text-decoration: underline; }
