/**
 * Invoice lookup.
 *
 * Follows the cloud26 language used across hitechcloud.vn: flat surfaces, a
 * single blue, 16px radii, type weight 400–600, no gradients, no lift-on-hover,
 * no glassmorphism. A billing document should read like a document.
 */

.hc-wp .hci-page {
	--hci-blue: #0969ff;
	--hci-blue-dark: #0553cc;
	--hci-navy: #071832;
	--hci-text: #22304a;
	--hci-muted: #667895;
	--hci-line: #d9e7f5;
	--hci-line-soft: #eaf1f9;
	--hci-soft: #f5f9ff;
	--hci-page-bg: #f2f6fb;
	--hci-white: #fff;
	--hci-ok: #0f7a4d;
	--hci-ok-bg: #e9f7f0;
	--hci-warn: #a4590a;
	--hci-warn-bg: #fdf3e5;
	--hci-error: #b3261e;
	--hci-error-bg: #fdeceb;
	--hci-radius: 16px;

	background: var(--hci-page-bg);
	color: var(--hci-text);
	font-size: 16px;
	line-height: 1.55;
	padding: clamp(24px, 4vw, 56px) 0 clamp(40px, 6vw, 80px);
}

.hc-wp .hci-page *,
.hc-wp .hci-page *::before,
.hc-wp .hci-page *::after {
	box-sizing: border-box;
}

.hc-wp .hci-shell {
	margin: 0 auto;
	max-width: 1260px;
	padding-inline: clamp(16px, 3vw, 24px);
	width: 100%;
}

.hc-wp .hci-icon {
	flex: none;
	height: 1.15em;
	width: 1.15em;
}

/* ─── Masthead ─── */

.hc-wp .hci-masthead {
	margin-bottom: clamp(24px, 3vw, 36px);
	max-width: 720px;
}

.hc-wp .hci-eyebrow {
	color: var(--hci-blue);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: normal;
	margin: 0 0 8px;
	text-transform: none;
}

.hc-wp .hci-h1 {
	color: var(--hci-navy) !important;
	font-size: clamp(28px, 3.4vw, 40px) !important;
	font-weight: 600 !important;
	letter-spacing: normal !important;
	line-height: 1.2 !important;
	margin: 0 0 12px !important;
}

.hc-wp .hci-lede {
	color: var(--hci-muted);
	font-size: 17px;
	margin: 0;
}

/* ─── Layout ─── */

.hc-wp .hci-layout {
	align-items: start;
	display: grid;
	gap: 24px;
	grid-template-columns: 380px minmax(0, 1fr);
}

.hc-wp .hci-aside {
	display: flex;
	flex-direction: column;
	gap: 16px;
	position: sticky;
	top: calc(var(--hc-sticky-header, 0px) + 24px);
}

.hc-wp .hci-card {
	background: var(--hci-white);
	border: 1px solid var(--hci-line);
	border-radius: var(--hci-radius);
	padding: 24px;
}

.hc-wp .hci-card-title {
	color: var(--hci-navy) !important;
	font-size: 17px !important;
	font-weight: 600 !important;
	letter-spacing: normal !important;
	margin: 0 0 18px !important;
}

/* ─── Form ─── */

.hc-wp .hci-form {
	display: flex;
	flex-direction: column;
}

.hc-wp .hci-field {
	margin-bottom: 18px;
}

.hc-wp .hci-field label {
	color: var(--hci-navy);
	display: block;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 6px;
}

.hc-wp .hci-req {
	color: var(--hci-error);
	margin-left: 3px;
}

.hc-wp .hci-field input {
	background: var(--hci-white);
	border: 1px solid var(--hci-line);
	border-radius: 10px;
	color: var(--hci-text);
	font-family: inherit;
	font-size: 15px;
	min-height: 46px;
	padding: 11px 14px;
	transition: border-color .15s ease, box-shadow .15s ease;
	width: 100%;
}

.hc-wp .hci-field input:focus {
	border-color: var(--hci-blue);
	box-shadow: 0 0 0 3px rgba(9, 105, 255, .14);
	outline: none;
}

.hc-wp .hci-help {
	color: var(--hci-muted);
	font-size: 13px;
	line-height: 1.5;
	margin: 7px 0 0;
}

.hc-wp .hci-decoy {
	height: 0;
	overflow: hidden;
	position: absolute;
	width: 0;
}

/* ─── Buttons ─── */

.hc-wp .hci-btn {
	align-items: center;
	background: var(--hci-white);
	border: 1px solid var(--hci-line);
	border-radius: 10px;
	color: var(--hci-navy);
	cursor: pointer;
	display: inline-flex;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	gap: 9px;
	justify-content: center;
	line-height: 1.3;
	min-height: 46px;
	padding: 11px 18px;
	text-decoration: none;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.hc-wp .hci-btn:hover {
	background: var(--hci-soft);
	border-color: var(--hci-blue);
	color: var(--hci-blue);
}

.hc-wp .hci-btn:focus-visible {
	box-shadow: 0 0 0 3px rgba(9, 105, 255, .2);
	outline: none;
}

.hc-wp .hci-btn--primary {
	background: var(--hci-blue);
	border-color: var(--hci-blue);
	color: var(--hci-white);
}

.hc-wp .hci-btn--primary:hover {
	background: var(--hci-blue-dark);
	border-color: var(--hci-blue-dark);
	color: var(--hci-white);
}

.hc-wp .hci-btn--small {
	font-size: 13px;
	min-height: 34px;
	padding: 6px 12px;
}

.hc-wp .hci-btn[disabled],
.hc-wp .hci-btn.is-busy {
	cursor: default;
	opacity: .65;
}

.hc-wp .hci-link {
	background: none;
	border: 0;
	color: var(--hci-blue);
	cursor: pointer;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	padding: 4px 2px;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ─── Messages ─── */

.hc-wp .hci-msg {
	display: none;
}

.hc-wp .hci-msg.is-visible {
	border-radius: 10px;
	display: block;
	font-size: 14px;
	line-height: 1.5;
	margin-top: 16px;
	padding: 12px 14px;
}

.hc-wp .hci-msg--ok {
	background: var(--hci-ok-bg);
	color: var(--hci-ok);
}

.hc-wp .hci-msg--error {
	background: var(--hci-error-bg);
	color: var(--hci-error);
}

.hc-wp .hci-flag {
	align-items: flex-start;
	border-radius: 12px;
	display: flex;
	font-size: 14px;
	gap: 10px;
	line-height: 1.55;
	margin: 0 0 20px;
	padding: 14px 16px;
}

.hc-wp .hci-flag .hci-icon {
	margin-top: 2px;
}

.hc-wp .hci-flag--warn {
	background: var(--hci-warn-bg);
	color: var(--hci-warn);
}

.hc-wp .hci-flag--alert,
.hc-wp .hci-flag--error {
	background: var(--hci-error-bg);
	color: var(--hci-error);
}

.hc-wp .hci-flag--info {
	background: var(--hci-soft);
	color: var(--hci-muted);
}

.hc-wp .hci-flag--ok {
	background: var(--hci-ok-bg);
	color: var(--hci-ok);
}

/* ─── Support card ─── */

.hc-wp .hci-support-list {
	list-style: none;
	margin: 0 0 16px;
	padding: 0;
}

.hc-wp .hci-support-list li {
	align-items: center;
	color: var(--hci-text);
	display: flex;
	font-size: 15px;
	gap: 10px;
	padding: 6px 0;
}

.hc-wp .hci-support-list a {
	color: var(--hci-text);
	text-decoration: none;
}

.hc-wp .hci-support-list a:hover {
	color: var(--hci-blue);
}

.hc-wp .hci-support-note {
	align-items: flex-start;
	border-top: 1px solid var(--hci-line-soft);
	color: var(--hci-muted);
	display: flex;
	font-size: 13px;
	gap: 9px;
	line-height: 1.5;
	margin: 0;
	padding-top: 14px;
}

/* ─── Result area ─── */

.hc-wp .hci-main {
	min-width: 0;
}

.hc-wp .hci-placeholder {
	align-items: center;
	background: var(--hci-white);
	border: 1px dashed var(--hci-line);
	border-radius: var(--hci-radius);
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 420px;
	padding: 48px 32px;
	text-align: center;
}

.hc-wp .hci-placeholder[hidden] {
	display: none;
}

.hc-wp .hci-placeholder-icon {
	color: var(--hci-blue);
	height: 42px;
	opacity: .5;
	width: 42px;
}

.hc-wp .hci-placeholder h2 {
	color: var(--hci-navy) !important;
	font-size: 19px !important;
	font-weight: 600 !important;
	letter-spacing: normal !important;
	margin: 18px 0 8px !important;
}

.hc-wp .hci-placeholder p {
	color: var(--hci-muted);
	margin: 0;
	max-width: 420px;
}

/* ─── Invoice document ─── */

.hc-wp .hci-doc {
	background: var(--hci-white);
	border: 1px solid var(--hci-line);
	border-radius: var(--hci-radius);
	padding: clamp(20px, 3vw, 32px);
}

.hc-wp .hci-doc-head {
	align-items: flex-start;
	border-bottom: 1px solid var(--hci-line-soft);
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	justify-content: space-between;
	margin-bottom: 24px;
	padding-bottom: 20px;
}

.hc-wp .hci-doc-number {
	color: var(--hci-navy) !important;
	font-size: clamp(22px, 2.4vw, 28px) !important;
	font-weight: 600 !important;
	letter-spacing: normal !important;
	margin: 0 !important;
}

.hc-wp .hci-doc-sub {
	color: var(--hci-navy) !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	letter-spacing: normal !important;
	margin: 28px 0 12px !important;
}

.hc-wp .hci-status {
	align-items: center;
	border-radius: 999px;
	display: inline-flex;
	font-size: 14px;
	font-weight: 600;
	gap: 7px;
	padding: 7px 14px;
	white-space: nowrap;
}

.hc-wp .hci-status--paid {
	background: var(--hci-ok-bg);
	color: var(--hci-ok);
}

.hc-wp .hci-status--unpaid,
.hc-wp .hci-status--pending {
	background: var(--hci-warn-bg);
	color: var(--hci-warn);
}

.hc-wp .hci-status--unpaid.is-overdue,
.hc-wp .hci-status--collections {
	background: var(--hci-error-bg);
	color: var(--hci-error);
}

.hc-wp .hci-status--cancelled,
.hc-wp .hci-status--refunded,
.hc-wp .hci-status--draft,
.hc-wp .hci-status--other {
	background: var(--hci-soft);
	color: var(--hci-muted);
}

/* Facts */

.hc-wp .hci-doc-grid {
	display: grid;
	gap: 24px;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.hc-wp .hci-facts dl {
	margin: 0;
}

.hc-wp .hci-fact {
	border-bottom: 1px solid var(--hci-line-soft);
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
	justify-content: space-between;
	padding: 9px 0;
}

.hc-wp .hci-fact:last-child {
	border-bottom: 0;
}

.hc-wp .hci-fact dt {
	color: var(--hci-muted);
	font-size: 14px;
	margin: 0;
}

.hc-wp .hci-fact dd {
	color: var(--hci-text);
	font-size: 14px;
	font-weight: 600;
	margin: 0;
	text-align: right;
}

/* Tables */

.hc-wp .hci-table-wrap {
	-webkit-overflow-scrolling: touch;
	border: 1px solid var(--hci-line);
	border-radius: 12px;
	overflow-x: auto;
}

.hc-wp .hci-items {
	border-collapse: collapse;
	font-size: 14px;
	min-width: 560px;
	width: 100%;
}

.hc-wp .hci-items th {
	background: var(--hci-soft);
	border-bottom: 1px solid var(--hci-line);
	color: var(--hci-muted);
	font-weight: 600;
	padding: 11px 14px;
	text-align: left;
	white-space: nowrap;
}

.hc-wp .hci-items td {
	border-bottom: 1px solid var(--hci-line-soft);
	padding: 13px 14px;
	vertical-align: top;
}

.hc-wp .hci-items tr:last-child td {
	border-bottom: 0;
}

.hc-wp .hci-items .hci-num {
	text-align: right;
	white-space: nowrap;
}

.hc-wp .hci-items .hci-strong {
	color: var(--hci-navy);
	font-weight: 600;
}

.hc-wp .hci-mono {
	font-family: var(--hc-font-mono);
	font-size: 13px;
}

.hc-wp .hci-item-title {
	color: var(--hci-navy);
	display: block;
	font-weight: 600;
}

.hc-wp .hci-item-period {
	color: var(--hci-muted);
	display: block;
	font-size: 13px;
	margin-top: 3px;
}

.hc-wp .hci-item-specs {
	color: var(--hci-muted);
	font-size: 13px;
	list-style: none;
	margin: 8px 0 0;
	padding: 0;
}

.hc-wp .hci-item-specs li {
	padding: 1px 0 1px 12px;
	position: relative;
}

.hc-wp .hci-item-specs li::before {
	color: var(--hci-line);
	content: "—";
	left: 0;
	position: absolute;
}

/* Totals */

.hc-wp .hci-totals {
	margin-left: auto;
	margin-top: 20px;
	max-width: 420px;
}

.hc-wp .hci-total {
	display: flex;
	font-size: 14px;
	gap: 24px;
	justify-content: space-between;
	padding: 8px 0;
}

.hc-wp .hci-total span:first-child {
	color: var(--hci-muted);
}

.hc-wp .hci-total span:last-child {
	font-weight: 600;
	white-space: nowrap;
}

.hc-wp .hci-total--grand {
	border-top: 2px solid var(--hci-navy);
	color: var(--hci-navy);
	font-size: 17px;
	margin-top: 6px;
	padding-top: 14px;
}

.hc-wp .hci-total--grand span:first-child {
	color: var(--hci-navy);
	font-weight: 600;
}

.hc-wp .hci-note {
	background: var(--hci-soft);
	border-radius: 10px;
	color: var(--hci-text);
	font-size: 14px;
	margin: 0;
	padding: 14px 16px;
	white-space: pre-line;
}

/* Actions */

.hc-wp .hci-actions {
	border-top: 1px solid var(--hci-line-soft);
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 28px;
	padding-top: 22px;
}

.hc-wp .hci-legal {
	align-items: flex-start;
	color: var(--hci-muted);
	display: flex;
	font-size: 13px;
	gap: 9px;
	line-height: 1.55;
	margin: 22px 0 0;
}

/* PDF viewer */

.hc-wp .hci-viewer {
	border: 1px solid var(--hci-line);
	border-radius: 12px;
	margin-top: 22px;
	overflow: hidden;
}

.hc-wp .hci-viewer-bar {
	align-items: center;
	background: var(--hci-soft);
	border-bottom: 1px solid var(--hci-line);
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: space-between;
	padding: 10px 14px;
}

.hc-wp .hci-viewer-title {
	color: var(--hci-navy);
	font-size: 14px;
	font-weight: 600;
}

.hc-wp .hci-viewer-actions {
	display: flex;
	gap: 8px;
}

.hc-wp .hci-viewer-frame {
	background: #fff;
	border: 0;
	display: block;
	height: 640px;
	width: 100%;
}

/* Other invoices */

.hc-wp .hci-others-note {
	color: var(--hci-muted);
	font-size: 13px;
	margin: 0 0 12px;
}

.hc-wp .hci-items--list tr.is-current td {
	background: var(--hci-soft);
}

.hc-wp .hci-chip {
	border-radius: 999px;
	display: inline-block;
	font-size: 13px;
	font-weight: 600;
	padding: 3px 10px;
	white-space: nowrap;
}

.hc-wp .hci-chip--paid {
	background: var(--hci-ok-bg);
	color: var(--hci-ok);
}

.hc-wp .hci-chip--unpaid,
.hc-wp .hci-chip--pending {
	background: var(--hci-warn-bg);
	color: var(--hci-warn);
}

.hc-wp .hci-chip--collections {
	background: var(--hci-error-bg);
	color: var(--hci-error);
}

.hc-wp .hci-chip--cancelled,
.hc-wp .hci-chip--refunded,
.hc-wp .hci-chip--draft,
.hc-wp .hci-chip--other {
	background: var(--hci-soft);
	color: var(--hci-muted);
}

.hc-wp .hci-items--list td:first-child {
	white-space: nowrap;
}

.hc-wp .hci-current-tag {
	color: var(--hci-muted);
	font-size: 12px;
	margin-left: 6px;
}

.hc-wp .hci-items--list .hci-link {
	font-family: var(--hc-font-mono);
	font-size: 13px;
}

/* ─── Responsive ─── */

@media (max-width: 1024px) {
	.hc-wp .hci-layout {
		grid-template-columns: 320px minmax(0, 1fr);
	}
}

@media (max-width: 900px) {
	.hc-wp .hci-layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.hc-wp .hci-aside {
		position: static;
	}

	.hc-wp .hci-placeholder {
		min-height: 260px;
	}

	.hc-wp .hci-viewer-frame {
		height: 460px;
	}
}

@media (max-width: 560px) {
	.hc-wp .hci-card,
	.hc-wp .hci-doc {
		padding: 18px 16px;
	}

	.hc-wp .hci-actions .hci-btn {
		flex: 1 1 100%;
	}

	.hc-wp .hci-totals {
		max-width: none;
	}
}

/* ─── Print ─── */

@media print {
	.hc-wp .hci-page {
		background: #fff;
		padding: 0;
	}

	.hc-wp .hci-masthead,
	.hc-wp .hci-aside,
	.hc-wp .hci-placeholder,
	.hc-wp .hci-actions,
	.hc-wp .hci-viewer,
	.hc-wp .hci-extra,
	.hc-wp .hci-flag--info {
		display: none !important;
	}

	.hc-wp .hci-layout {
		display: block;
	}

	.hc-wp .hci-doc {
		border: 0;
		padding: 0;
	}

	.hc-wp .hci-table-wrap {
		overflow: visible;
	}

	.hc-wp .hci-items {
		min-width: 0;
	}
}
