/* DhishaAI Terms & Conditions viewer - on-site, view-only document modal.
   Scoped entirely under .dhai-tcv / .dhai-tcv-trigger so nothing else is affected.
   Deliberately mirrors the Job Description viewer so both read as one system. */

html.dhai-tcv-open { overflow: hidden; }

.dhai-tcv {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(0.75rem, 3vw, 2.5rem);
	font-family: inherit;
}
.dhai-tcv[hidden] { display: none; }

.dhai-tcv__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(7, 27, 42, 0.72);
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
}

.dhai-tcv__dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	width: min(960px, 100%);
	max-height: 100%;
	background: #fff;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 30px 70px -20px rgba(7, 27, 42, 0.6);
}

.dhai-tcv__bar {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 0.9rem 1.15rem;
	background: #073E5C;
	color: #fff;
	flex: 0 0 auto;
}

.dhai-tcv__title {
	margin: 0;
	font-size: clamp(0.98rem, 1.6vw, 1.12rem);
	font-weight: 600;
	line-height: 1.35;
	color: #fff;
	overflow-wrap: anywhere;
}

.dhai-tcv__close {
	margin-left: auto;
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 1.6rem;
	line-height: 1;
	color: #fff;
	background: rgba(255, 255, 255, 0.12);
	border: 0;
	border-radius: 6px;
	cursor: pointer;
	transition: background-color 0.18s ease;
}
.dhai-tcv__close:hover { background: #FF6A00; }
.dhai-tcv__close:focus-visible { outline: 3px solid rgba(255, 106, 0, 0.6); outline-offset: 2px; }

.dhai-tcv__body {
	flex: 1 1 auto;
	overflow: auto;
	-webkit-overflow-scrolling: touch;
	background: #F8FAFC;
	padding: clamp(0.75rem, 2vw, 1.5rem);
}
.dhai-tcv__body:focus-visible { outline: 2px solid rgba(7, 62, 92, 0.4); outline-offset: -2px; }

.dhai-tcv__status {
	margin: 0;
	padding: 2.5rem 1rem;
	text-align: center;
	color: #475569;
	font-size: 0.95rem;
}
.dhai-tcv__status:empty { display: none; }

.dhai-tcv__pages {
	display: flex;
	flex-direction: column;
	gap: clamp(0.75rem, 2vw, 1.25rem);
	max-width: 820px;
	margin: 0 auto;
}

.dhai-tcv__page {
	display: block;
	width: 100%;
	height: auto;
	background: #fff;
	border: 1px solid rgba(7, 62, 92, 0.12);
	border-radius: 4px;
	box-shadow: 0 4px 14px -8px rgba(7, 27, 42, 0.4);
	-webkit-user-select: none;
	user-select: none;
	-webkit-user-drag: none;
}

/* The trigger is a normal footer link; keep it looking like one. */
.dhai-tcv-trigger { cursor: pointer; }

@media (max-width: 560px) {
	.dhai-tcv { padding: 0; }
	.dhai-tcv__dialog { border-radius: 0; height: 100%; width: 100%; }
}

@media print {
	/* Never let the open viewer reach a print sheet. */
	.dhai-tcv { display: none !important; }
}
