/* Document Signer Plugin Styles */
.document-content {
	font-family: "Montserrat", Sans-serif;
	line-height: 1.6;
	max-width: 100%;
	background: white;
}

.document-content h2 {
	color: #002856;
	text-align: left;
	margin-bottom: 30px;
	border-bottom: 2px solid #002856;
	padding-bottom: 25px;
	text-transform: capitalize;
	font-size: 30px;
}

.document-content h3 {
	color: #002856;
	margin-top: 30px;
	margin-bottom: 15px;
}

.document-content table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 20px;
	font-size: 14px;
}

.document-content table td {
	padding: 8px;
	text-align: left;
	border: 1px solid #ccc;
	vertical-align: top;
	font-size: 16px;
}

.document-content table .fees-row td:nth-child(even) {
	background-color: #cccccc4f;
}

.document-content .inner-coverage {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
}

.document-content .inner-coverage p {
	width: 34%;
	text-align: center;
}

.document-content .document-table-section .title-td {
	width: 300px;
}

.document-content p {
	margin-bottom: 10px;
	text-align: justify;
}

.signature-section {
	margin-top: 30px;
	border-top: 2px solid #002856;
	padding: 20px;
	background: #f9f9f9;
	text-align: left;
}

.signature-section label {
	font-weight: bold;
	display: inline-block;
	width: 190px;
	margin-right: 25px;
	vertical-align: top;
}

.signature-section input[type="text"] {
	padding: 5px;
	border: 1px solid #ccc;
	width: 200px;
	margin-bottom: 10px;
}

#signature-pad {
	background: white;
	cursor: crosshair;
	border: 1px solid #2c33382b !important;
	margin: 10px 0;
}

#clear-signature, #sign-and-submit {
	margin: 5px;
	padding: 10px 20px;
	background: #002856;
	color: white;
	border: none;
	cursor: pointer;
	font-size: 14px;
	transition: background-color 0.3s;
	font-family: "montserrat", Sans-serif;
	text-transform: uppercase;
	font-weight: 500;
}

#clear-signature:hover, #sign-and-submit:hover {
	background: #0D4D94;
}

#sign-and-submit {
	background: #A32035;
}

#sign-and-submit:hover {
	background: #C00;
}

#open-sign-modal {
	background-color: rgba(0, 40, 86, 0.9) !important;
	color: white;
	padding: 12px 24px;
	border: none;
	cursor: pointer;
	font-size: 16px;
	font-weight: bold;
	margin-bottom: 20px;
	transition: background-color 0.3s;
}

.sign-modal {
	background-color: rgba(0, 40, 86, 0.9) !important;
}

.sign-modal .modal-content .modal-body {
	padding-right: 20px;
}

#open-sign-modal:hover {
	background: #0D4D94;
}

#open-sign-modal.unsigned {
	background-color: #A32035;
	color: white;
}

#open-sign-modal.unsigned:hover {
	background: #002856 !important;
}

#open-sign-modal.signed {
	background-color: #002856;
	color: white;
}

#open-sign-modal.signed:hover {
	background: #218838;
}

.download-link {
	margin-top: 15px;
	display: inline-block;
	color: #002856;
	text-decoration: none;
	font-weight: bold;
	padding: 10px 20px;
	background: #f8f9fa;
	border: 1px solid #002856;
	transition: all 0.3s;
}

.download-link:hover {
	background: #002856;
	color: white;
	text-decoration: none;
}

#sign-modal {
	position: fixed;
	top: 10%;
	left: 0;
	width: 100%;
	height: 100%;
	background: #002857E6;
	z-index: 9999;
	overflow: auto;
}

#sign-modal > div {
	background: white;
	margin: 2% auto;
	padding: 20px;
	width: 95%;
	max-width: 1200px;
	HEIGHT: 82%;
	box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
	overflow-y: auto;
}

#close-modal {
	float: right;
	background: #A32035;
	color: white;
	border: none;
	padding: 8px 15px;
	cursor: pointer;
	font-size: 14px;
}

#close-modal:hover {
	background: #C00;
}

#toast {
	position: fixed;
	bottom: 20px;
	right: 20px;
	color: white;
	padding: 15px 20px;
	z-index: 10000;
	box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
	font-weight: bold;
	min-width: 300px;
	text-align: center;
}

#document-signer-container {
	padding: 0 0 40px;
	border-bottom: 1px solid var(--the7-input-border-color);
	margin-bottom: 40px;
	text-align: right;
}

.document-signer-header {
	text-align: center;
	margin-bottom: 30px;
}

.document-signer-header h2 {
	color: #002856;
	margin-bottom: 10px;
}

.signing-prompt {
	text-align: center;
	padding: 30px;
	background: #f8f9fa;
	border: 2px dashed #002856;
}

.signing-prompt p {
	font-size: 16px;
	margin-bottom: 20px;
	color: #333;
}

.sign-button {
	background: #002856;
	color: white;
	padding: 10px 20px;
	border: none;
	cursor: pointer;
	font-size: 14px;
	transition: all 0.3s;
	font-weight: 600;
	text-transform: uppercase;
}

.sign-button:hover {
	background: #0D4D94 !important;
}

.signed-status {
	text-align: center;
	padding: 30px;
}

.status-success {
	background: #d4edda;
	border: 2px solid #28a745;
	padding: 30px;
	color: #155724;
}

.status-success h3 {
	color: #28a745;
	margin-bottom: 15px;
	font-size: 24px;
}

.status-success p {
	font-size: 16px;
	margin-bottom: 20px;
}

.modal-content {
	background: white;
	margin: 2% auto;
	padding: 0;
	width: 60%;
	max-height: 100% !important;
	max-width: 900px;
	box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
	overflow: hidden;
}

.modal-header {
	background: #002856;
	color: white;
	padding: 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.modal-header h3 {
	margin: 0;
	color: white;
}

.close-button {
	background: #A32035 !important;
	color: white !important;
	border: none;
	padding: 8px 12px;
	cursor: pointer;
	font-size: 16px;
	width: 35px;
	height: 35px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.close-button:hover {
	background: #CC0000 !important;
}

.modal-body {
	max-height: 80vh;
	overflow-y: auto;
}

.signed-document-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #A32035;
	color: white;
	padding: 8px 20px;
	text-decoration: none;
	font-weight: bold;
	transition: all 0.3s ease;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.signed-document-link:hover {
	background: #C00;
	text-decoration: none !important;
	color: #fff !important;
}

.signed-document-link::before {

	/* content: '📄'; */



	margin-right: 10px;
	font-size: 20px;
}

.document-content .document-body {
	overflow-x: auto;
	margin: 0 0 30px;
}

.document-content .document-body table {
	width: 700px;
	max-width: 700px;
	margin: 0;
}

.pdf-action-buttons {
	display: flex;
	justify-content: center;
	gap: 15px;
	margin-top: 20px;
}

.view-pdf-button, .download-pdf-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 20px;
	text-decoration: none;
	font-weight: 600;
	transition: all 0.3s ease;
	cursor: pointer;
	font-size: 16px;
	border: none;
}

.view-pdf-button {
	background-color: #3498db;
	color: white;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.view-pdf-button:hover {
	background-color: #2980b9;
	transform: translateY(-2px);
	box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.download-pdf-button {
	background-color: #2ecc71;
	color: white;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.download-pdf-button:hover {
	background-color: #27ae60;
	transform: translateY(-2px);
	box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

#pdf-viewer-modal {
	position: fixed;
	z-index: 1000;
	left: 0;
	top: 0%;
	width: 100%;
	height: 100%;
	background-color: #002857E6;
	right: 0;
	margin: 0 auto;
	border-radius: 0;
	max-width: 100%;
	box-shadow: 0 0 5px rgb(0, 0, 0, 0.2);
}

#pdf-viewer-modal .modal-content {
	background-color: white;
	margin: 2% auto !important;
	width: 96% !important;
	height: 625px;
	position: relative;
	border-radius: 0 !important;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#pdf-viewer-modal .close-pdf-modal {
	color: #002856 !important;
	float: right;
	font-size: 28px;
	font-weight: bold;
	cursor: pointer;
	transition: color 0.3s ease;
}

#pdf-viewer-modal .close-pdf-modal:hover, #pdf-viewer-modal .close-pdf-modal:focus {
	color: #A32035 !important;
	text-decoration: none;
}

#pdf-viewer-modal h2 {
	text-align: center;
	margin-bottom: 20px !important;
	color: #002856;
	border-bottom: 2px solid #002856;
	padding-bottom: 10px;
	width: 100%;
}

.sign-action-buttons button {
	border: none !important;
	background-color: #A32035 !important;
	color: #fff !important;
	padding: 10px 15px !important;
	font-size: 14px !important;
	line-height: normal !important;
	text-transform: uppercase !important;
	font-weight: 600 !important;
}

.document-content p strong {
	font-weight: 600;
}

.signed-document-details p {
	font-weight: 500;
}

.pdf-viewer {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 40, 86, 0.9);
	z-index: 9999;
	display: flex;           /* flex so inner can scroll naturally      */
	align-items: flex-start; /* don't force vertical-center on overflow  */
	justify-content: center;
	overflow-y: auto;        /* scroll the backdrop when content is tall */
	padding: 20px 0;
	box-sizing: border-box;
	-webkit-overflow-scrolling: touch; /* smooth momentum scroll iOS       */
}

.pdf-viewer-inner {
	background-color: white;
	padding: 20px;
	width: 90%;
	max-width: 1000px;
	position: relative;      /* no longer position:absolute              */
	left: auto;
	right: auto;
	top: auto;
	transform: none;         /* remove translateY(-50%) that caused clip */
	flex-shrink: 0;          /* don't shrink inside flex container        */
	margin: auto;
	box-sizing: border-box;
}

.pdf-viewer-inner-sec {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 15px;
	flex-wrap: wrap;
}

#download-pdf-btn {
	background: #A32035;
	color: white;
	border: none;
	padding: 8px 16px;
	border-radius: 4px;
	cursor: pointer;
	text-transform: uppercase;
}

#download-pdf-btn:hover {
	background: #002856;
}

#download-signed-contract-btn {
	background: #A32035;
	color: white;
	border: none;
	padding: 8px 16px;
	cursor: pointer;
	text-transform: uppercase;
	font-weight: 600;
	font-family: "Montserrat", Sans-serif;
}

#download-signed-contract-btn:hover {
	background-color: #CC0000;
}

.close-myaccount-pdf-modal {
	color: #002856;
	font-size: 28px;
	font-weight: bold;
	cursor: pointer;
}

.close-myaccount-pdf-modal:hover {
	color: #A32035;
}

/* My Account Signed Contract Section */
.signed-contract-button-container {
	animation: fadeInDown 0.5s ease-out;
}

@keyframes fadeInDown {
	from {
		opacity: 0;
		transform: translateY(-20px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}

}

#view-signed-contract {
	font-family: 'Montserrat', sans-serif;
	transition: all 0.3s ease;
	position: relative;
	color: white;
	border: none;
	padding: 15px 40px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s;
	position: relative;
	overflow: hidden;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

#view-signed-contract:hover {
	background-color: #A32035 !important;
}

/* Your Contract Page Styles */
.contract-success-card {
	background: #008000;
	width: 70%;
	padding: 20px 30px 10px;
	margin-bottom: 30px;
	text-align: left;
	color: #fff;
}

.woocommerce-account .dashboard-section .woocommerce-MyAccount-content.contract-page {
	width: 100%;
}

.contract-success-card .tick-mark {
	color: #fff;
	font-size: 30px;
	margin: 0 10px 0px 0;
}

.contract-success-card .signed-heading {
	color: #fff !important;
	font-size: 24px;
	margin: 0;
}

.contract-success-card strong {
	color: #fff;
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}

}

/* PDF Upload Progress Indicator */
#upload-progress { margin-top: 10px; padding: 10px; background-color: #f0f7ff; border: 1px solid #0D4D94; border-radius: 4px; text-align: center; font-weight: 600; color: #0D4D94; display: none; }
#upload-progress.active { display: block; }
.pdf-processing-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 40, 86, 0.95); z-index: 99999; display: flex; align-items: center; justify-content: center; flex-direction: column; }
.pdf-processing-overlay .spinner { width: 60px; height: 60px; border: 6px solid rgba(255, 255, 255, 0.2); border-top: 6px solid #fff; border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 20px; }
.pdf-processing-overlay .message { color: white; font-size: 18px; font-weight: 600; margin-bottom: 10px; }
.pdf-processing-overlay .sub-message { color: rgba(255, 255, 255, 0.8); font-size: 14px; }

html.ds-overlay-active,
body.ds-overlay-active {
	overflow: hidden !important;
	height: 100% !important;
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}

	100% {
		transform: rotate(360deg);
	}

}

.contract-success-inner { margin: 0 0px 10px 0; display: inline-block; }
.contract-success-card p { color: #fff; font-size: 16px; }
.about-your-contract { margin-bottom: 20px; }
.about-your-contract ul li { color: #424242; font-size: 18px; font-weight: 500; }

@keyframes fadeInScale {
	from {
		opacity: 0;
		transform: scale(0.9);
	}

	to {
		opacity: 1;
		transform: scale(1);
	}

}

.contract-not-signed { animation: fadeIn 0.5s ease-out; }

@keyframes fadeIn {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}

}

.sign-action-buttons { padding-left: 211px; }
.signed-contract-btn-sec { display: flex; gap: 10px; align-items: center; }
.sign-contract-page-wrapper { max-width: 1300px; margin: 80px auto; padding: 0 20px; }
.review-contract-heading { text-align: center; margin-bottom: 30px; text-transform: capitalize; }
.contract-main-sec { background: white; border: 1px solid #ddd; padding: 30px; max-height: 600px; overflow-y: auto; margin-bottom: 30px; }
.contract-success-inner { display: flex; }
.include-sec { padding-left: 28px; }
.company-text { margin-top: 30px; text-align: center; }

/* Responsive design */
@media (max-width:1024px) {
	.contract-success-card { width: 80%; }
	.document-content h2 { font-size: 24px; }
}

@media (max-width:767px) {
	.sign-contract-page-wrapper { margin: 50px auto; }
	.contract-main-sec { padding: 30px 20px; }
	.document-content table td { padding: 5px; }
	#signature-pad { width: 100%; height: 150px; }
	.signature-section #sign_date, .signature-section #user_name { width: 100%; }
	#sign-modal > div { margin: 5% auto; width: 98%; padding: 15px; }
	#toast { left: 10px; right: 10px; bottom: 10px; min-width: auto; }
	.sign-action-buttons { padding-left: 0px; }
	.signed-contract-button-container { text-align: center !important; padding: 10px 0 !important; }
	#view-signed-contract { width: auto; padding: 10px 20px !important; font-size: 14px !important; white-space: normal; line-height: normal; }
	#download-signed-contract-btn { font-size: 14px; }
	.signed-contract-button-container > div:last-child { text-align: center !important; font-size: 12px !important; margin-top: 8px !important; }
	.contract-success-card { width: 100%; }
	.about-your-contract ul li { font-size: 16px; }
	.signed-contract-btn-sec { margin-top: 10px; }
	.woocommerce .woocommerce-MyAccount-content .contract-success-card .signed-heading { font-size: 18px; color: #fff; }
}

@media (max-width:480px) {
	.document-table-section { width: 370px; overflow: auto; margin-bottom: 15px; }
}

/* ═══════════════════════════════════════════════════════════════════
   PDF VIEWER — Mobile: PDF.js canvas mode
   Renders every page as <canvas> so all pages show on iOS + Android.
   ═══════════════════════════════════════════════════════════════════ */

/* Mobile PDF viewer: full-screen, scrollable */
.pdf-viewer--mobile {
	flex-direction: column;
	overflow: hidden !important;
	padding: 0 !important;
}

/* Inner panel scrolls its own content (canvas stack) */
#pdf-viewer-inner-mob {
	overflow-y: auto;
	-webkit-overflow-scrolling: touch; /* iOS momentum scroll */
	overscroll-behavior: contain;      /* don't let scroll bubble to body */
}

/* Each page canvas: full width, auto height */
#pdf-canvas-container canvas {
	display: block;
	width: 100% !important;
	height: auto !important;
	max-width: 100%;
}

/* ── Desktop iframe viewer — keep original centered layout ──────── */
@media (min-width: 900px) {
	.pdf-viewer:not(.pdf-viewer--mobile) {
		align-items: center; /* vertically center on big screens */
	}

	.pdf-viewer-inner {
		margin: 20px auto;
	}

	#pdf-iframe {
		height: 600px;
	}
}

/* ── Responsive breakpoints ─────────────────────────────────────── */
@media (max-width: 899px) {
	/* On tablets/phones, always use column flex + full width */
	.pdf-viewer {
		padding: 0;
		align-items: flex-start;
	}

	.pdf-viewer-inner {
		width: 100% !important;
		max-width: 100% !important;
		min-height: 100vh;
		padding: 12px;
		border-radius: 0;
		margin: 0;
	}

	/* Desktop iframe on tablet also fills height */
	#pdf-iframe {
		height: calc(100dvh - 140px) !important;
		min-height: 400px !important;
	}
}

@media (max-width: 480px) {
	#pdf-canvas-container {
		padding: 0;
	}

	.pdf-viewer-inner-sec h2 {
		font-size: 14px !important;
	}
}

/* Document Signer Success Message - WooCommerce Style */

.woocommerce-notices-wrapper.my-global-wrapper #ds-success-message { margin: 20px 0; padding: 30px 40px; background: #008000; color: #fff; border-radius: 8px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3); max-width: 600px; width: 90%; text-align: left; }
.woocommerce-notices-wrapper.my-global-wrapper #ds-success-message .ds-success-inner { display: flex; align-items: center; }
.woocommerce-notices-wrapper.my-global-wrapper #ds-success-message .ds-success-icon { font-size: 50px; margin-right: 20px; color: #fff; }
.woocommerce-notices-wrapper.my-global-wrapper #ds-success-message .ds-success-content h2 { color: #fff !important; margin: 0 0 10px 0; font-size: 28px; font-weight: bold; }
.woocommerce-notices-wrapper.my-global-wrapper #ds-success-message .ds-success-content p { color: #fff; margin: 0; font-size: 18px; }