/* WC Hosting Subscriptions — customer dashboard. Override the tokens in your theme. */
.hsub {
	--hsub-ink: #16202b;
	--hsub-muted: #5d6b79;
	--hsub-line: #dfe4ea;
	--hsub-surface: #f6f8fa;
	--hsub-accent: #0b6e4f;   /* uptime green */
	--hsub-warn: #b86a00;
	--hsub-danger: #b3261e;
	--hsub-radius: 10px;
	color: var(--hsub-ink);
	font-size: 15px;
	line-height: 1.5;
	max-width: 980px;
}
.hsub *, .hsub *::before, .hsub *::after { box-sizing: border-box; }
.hsub-h { font-size: 1.1rem; font-weight: 650; margin: 2rem 0 .75rem; }
.hsub-muted, .hsub-lead { color: var(--hsub-muted); }

/* Summary strip */
.hsub-summary {
	display: grid; grid-template-columns: repeat(3, 1fr);
	border: 1px solid var(--hsub-line); border-radius: var(--hsub-radius); overflow: hidden;
}
.hsub-summary > div { padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: .15rem; }
.hsub-summary > div + div { border-left: 1px solid var(--hsub-line); }
.hsub-summary span { color: var(--hsub-muted); font-size: .85rem; }
.hsub-summary strong { font-size: 1.5rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.hsub-summary .is-alert strong { color: var(--hsub-danger); }

/* Services */
.hsub-services { display: flex; flex-direction: column; border: 1px solid var(--hsub-line); border-radius: var(--hsub-radius); overflow: hidden; }
.hsub-service {
	display: grid; grid-template-columns: 1.3fr 1.2fr auto; gap: 1.25rem; align-items: center;
	padding: 1rem 1.25rem; border-left: 4px solid var(--hsub-accent);
}
.hsub-service + .hsub-service { border-top: 1px solid var(--hsub-line); }
.hsub-service--overdue { border-left-color: var(--hsub-warn); }
.hsub-service--suspended { border-left-color: var(--hsub-danger); background: #fdf6f5; }
.hsub-service--cancelled, .hsub-service--expired { border-left-color: var(--hsub-line); opacity: .65; }

.hsub-service__id { display: flex; gap: .75rem; align-items: flex-start; min-width: 0; }
.hsub-service__id > i { font-size: 1.35rem; color: var(--hsub-muted); line-height: 1.2; }
.hsub-service__id strong { display: block; font-weight: 650; word-break: break-all; }
.hsub-service__id small, .hsub-service__cycle small { color: var(--hsub-muted); font-size: .82rem; }

.hsub-cycle__text { display: flex; gap: .5rem; align-items: center; font-size: .88rem; margin-bottom: .4rem; }
.hsub-meter { height: 6px; border-radius: 3px; background: var(--hsub-surface); box-shadow: inset 0 0 0 1px var(--hsub-line); overflow: hidden; margin-bottom: .35rem; }
.hsub-meter span { display: block; height: 100%; background: var(--hsub-accent); }
.hsub-service--overdue .hsub-meter span { background: var(--hsub-warn); }
.hsub-service--suspended .hsub-meter span { background: var(--hsub-danger); }

.hsub-service__actions { display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; }
.hsub-inline { margin: 0; }

/* Pills */
.hsub-pill { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--hsub-surface); color: var(--hsub-muted); }
.hsub-pill--active, .hsub-pill--paid { background: #e3f3ec; color: var(--hsub-accent); }
.hsub-pill--overdue, .hsub-pill--due { background: #fbefdc; color: var(--hsub-warn); }
.hsub-pill--suspended { background: #f9e1df; color: var(--hsub-danger); }

/* Buttons */
.hsub .hsub-btn {
	display: inline-flex; align-items: center; gap: .35rem; cursor: pointer;
	padding: .5rem .9rem; border-radius: 8px; border: 1px solid var(--hsub-accent);
	background: var(--hsub-accent); color: #fff; font: inherit; font-weight: 600; font-size: .88rem;
	text-decoration: none; white-space: nowrap;
}
.hsub .hsub-btn:hover { filter: brightness(1.08); }
.hsub .hsub-btn--ghost { background: transparent; color: var(--hsub-accent); }
.hsub .hsub-btn--sm { padding: .3rem .7rem; font-size: .82rem; }
.hsub .hsub-link { background: none; border: 0; padding: 0; font: inherit; font-size: .85rem; color: var(--hsub-muted); text-decoration: underline; cursor: pointer; }
.hsub .hsub-btn:focus-visible, .hsub .hsub-link:focus-visible { outline: 2px solid var(--hsub-accent); outline-offset: 2px; }

/* Invoices */
.hsub-table-wrap { overflow-x: auto; border: 1px solid var(--hsub-line); border-radius: var(--hsub-radius); }
.hsub-table { width: 100%; border-collapse: collapse; margin: 0; font-size: .9rem; }
.hsub-table th, .hsub-table td { padding: .7rem 1rem; text-align: left; border: 0; border-bottom: 1px solid var(--hsub-line); }
.hsub-table th { font-weight: 600; color: var(--hsub-muted); background: var(--hsub-surface); }
.hsub-table tr:last-child td { border-bottom: 0; }
.hsub-table td { font-variant-numeric: tabular-nums; }
.hsub-right { text-align: right !important; }

/* Empty state */
.hsub-empty { text-align: center; padding: 2.5rem 1rem; border: 1px dashed var(--hsub-line); border-radius: var(--hsub-radius); }
.hsub-empty i { font-size: 2rem; color: var(--hsub-muted); }
.hsub-empty p { margin: .5rem 0 1rem; color: var(--hsub-muted); }

/* Product page domain field */
.hsub-field { margin-bottom: 1rem; }
.hsub-field label { display: block; font-weight: 600; margin-bottom: .3rem; }
.hsub-field input { width: 100%; max-width: 360px; }

@media (max-width: 720px) {
	.hsub-summary { grid-template-columns: 1fr; }
	.hsub-summary > div + div { border-left: 0; border-top: 1px solid var(--hsub-line); }
	.hsub-service { grid-template-columns: 1fr; gap: .75rem; }
	.hsub-service__actions { flex-direction: row; align-items: center; justify-content: space-between; }
}
