﻿/*<meta />*/

/* ============================================================
   ActivityHD Dynamic Modal Styles
   ============================================================ */

/* ---------- Modal overlay ---------- */

.ahd-modal
{
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	z-index: 1000;
}

/* ---------- Modal container ---------- */

.ahd-modal-content
{
	position: relative;
	background: #ffffff;
	width: 50%;
	max-width: 900px;
	max-height: 90vh;
	margin: 5vh auto;
	display: flex;
	flex-direction: column;
	border-radius: 4px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
	overflow: visible;
}

/* ---------- Modal header ---------- */

.ahd-modal-header
{
	display: flex;
	align-items: baseline;
	padding: 0.75rem 1rem;
	background-color: #003366;
	flex: 0 0 auto;
}

.ahd-modal-header h2
{
	flex: 1 1 auto;
	margin: 0;
	font-size: 1.25rem;
	font-weight: bolder;
	font-family: Rajdhani;
	color: #ffffff !important;
	border-bottom: none;
}

/* ---------- Close button ---------- */

.ahd-modal-close
{
	flex: 0 0 auto;
	margin-left: 0.5rem;
	background: none;
	border: none;
	color: #ffffff;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	z-index: 9999;
}

/* ---------- Print button ---------- */

.ahd-modal-print
{
	flex: 0 0 auto;
	align-self: center;
	width: 1.5rem;
	height: 1.5rem;
	background-image: url('../Images/Assets/Icons/MainIcons/printer-icon-modal.png');
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	border: none;
	background-color: transparent;
	cursor: pointer;
	z-index: 9999;
	margin-left: 0.75rem;
}

/* ---------- Modal body ---------- */

.ahd-modal-body
{
	flex: 1 1 auto;
	padding: 1rem;
	overflow-y: auto;
	overflow-x: hidden;
}

/* ---------- Hidden modal content sources ---------- */

.ahd-modal-source,
.ahd-modal-title-source
{
	display: none;
}

/* ============================================================
   PRINT STYLES — TABLE SAFE
   ============================================================ */

@media print
{
	html,
	body
	{
		height: auto !important;
		overflow: visible !important;
		margin: 0 !important;
	}

	/* Hide skin chrome — title bar, nav bar, and the sticky toolbar that
	   StickyToolbar.js moves to document.body at runtime */

	nav.title-bar,
	.title-bar-container,
	#navigation,
	div.side-content
	{
		display: none !important;
	}

	/* StickyToolbar.js sets an inline padding-top on div.content-container
	   to push body text below the fixed toolbar.  !important overrides it. */

	div.content-container
	{
		padding-top: 25px !important;
	}

	body:has(#ahd-print-container) > *:not(#ahd-print-container)
	{
		display: none !important;
	}

	#ahd-print-container
	{
		display: block !important;
		position: static !important;
		width: 100% !important;
		height: auto !important;
		margin: 0 !important;
		padding: 0 !important;
	}

	#ahd-print-container .ahd-modal-content
	{
		position: static !important;
		width: 100% !important;
		max-width: 100% !important;
		max-height: none !important;
		height: auto !important;
		margin: 0 !important;
		padding: 0 !important;
		box-shadow: none !important;
		border-radius: 0 !important;
		overflow: visible !important;
	}

	/* HARD RESET ALL LAYOUT INSIDE PRINT CONTAINER */

	#ahd-print-container div,
	#ahd-print-container section,
	#ahd-print-container article
	{
		float: none !important;
		display: block !important;
		position: static !important;
		width: auto !important;
		max-width: none !important;
		min-height: 0 !important;
		height: auto !important;
	}

	.ahd-modal,
	.ahd-modal-header,
	.ahd-modal-close,
	.ahd-modal-print
	{
		display: none !important;
	}

	/* Remove UI controls */

	#ahd-print-container .ahd-modal-close,
	#ahd-print-container .ahd-modal-print
	{
		display: none !important;
	}

	/* Restore inline semantics */

	#ahd-print-container span,
	#ahd-print-container a,
	#ahd-print-container strong,
	#ahd-print-container em,
	#ahd-print-container b,
	#ahd-print-container i,
	#ahd-print-container code,
	#ahd-print-container sup,
	#ahd-print-container sub
	{
		display: inline !important;
		white-space: normal !important;
	}

	#ahd-print-container p
	{
		margin: 0.5em 0 !important;
	}

	/* Lists */

	#ahd-print-container ul,
	#ahd-print-container ol
	{
		margin: 0.5em 0 0.5em 1.5em !important;
		padding-left: 0 !important;
	}

	#ahd-print-container li
	{
		list-style-position: outside !important;
	}

	#ahd-print-container ol ol > li
	{
		list-style-type: lower-alpha !important;
	}

	#ahd-print-container ol ol ol > li
	{
		list-style-type: lower-roman !important;
	}

	/* ------------------------------------------------
       CRITICAL: Preserve Table Semantics
       ------------------------------------------------ */

	#ahd-print-container table
	{
		display: table !important;
		width: 100% !important;
		border-collapse: collapse !important;
	}

	#ahd-print-container thead
	{
		display: table-header-group !important;
	}

	#ahd-print-container tbody
	{
		display: table-row-group !important;
	}

	#ahd-print-container tr
	{
		display: table-row !important;
	}

	#ahd-print-container th,
	#ahd-print-container td
	{
		display: table-cell !important;
	}
}
