/**
 * ISI Sticky Drawer Styles
 * 
 * @package HelloElementorChild
 */

/* Basic Reset / fonts inherit */
.isi-sticky, .isi-full { 
	font-family: inherit; 
	color: inherit; 
}

.isi-sticky {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 9999;
	background: #fff;
	border-top: 1px solid #cfcfcf;
	box-shadow: 0 -6px 20px rgba(0,0,0,0.08);
	transition: height 0.45s ease, transform 0.3s ease;
	height: 66px;
	overflow: hidden;
	will-change: height, transform;
	min-height: 0;
	margin: 0;
	padding: 0;
}

.isi-sticky.hidden {
	display: none !important;
	visibility: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
	transform: translateY(100%) !important;
	height: 0 !important;
}

.isi-sticky.initial-expanded {
	height: 130px;
}

.isi-sticky.fully-expanded {
	height: 400px;
}

.isi-sticky .isi-sticky-inner {
	height: 100%;
	overflow-y: auto;
}

.isi-sticky .isi-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 0;
	cursor: pointer;
	max-width: var(--isi-container-width, 1140px);
	margin: 0 auto;
}

.isi-sticky .isi-header .isi-title {
	font-family: 'Fustat', Helvetica, Arial, Lucida, sans-serif !important;
	font-size: 19px !important;
	font-weight: bold;
	font-style: normal;
	line-height: 1.2;
	color: #000477 !important;
	text-transform: uppercase;
}

.isi-sticky .isi-header .isi-toggle {
	display: flex;
	align-items: center;
	gap: 8px;
	font-family: 'Fustat', Helvetica, Arial, Lucida, sans-serif !important;
	font-size: 14px !important;
	font-weight: bold;
	font-style: normal;
	line-height: 1.2;
	color: #000477;
}

.isi-sticky .isi-header .isi-caret {
	font-size: 18px;
	display: inline-block;
	width: 18px;
	text-align: center;
	line-height: 20px;
	background-color: #000477;
	color: #fff;
	font-weight: normal;
	border-radius: 100%;
	height: 18px;
}

/* HCP Style - Same circular button as main site */
.isi-sticky.isi-hcp-style .isi-header .isi-caret {
	font-size: 18px;
	display: inline-block;
	width: 18px;
	text-align: center;
	line-height: 20px;
	background-color: #000477;
	color: #fff;
	font-weight: normal;
	border-radius: 100%;
	height: 18px;
}

/* HCP Style - Title color */
.isi-sticky.isi-hcp-style .isi-header .isi-title {
	color: #000477 !important;
}

/* HCP Style - Toggle text color */
.isi-sticky.isi-hcp-style .isi-header .isi-toggle-text {
	color: #000477;
}

/* HCP Style - Full ISI section title color */
.isi-full.isi-hcp-style .isi-full-inner h2 {
	color: #000477 !important;
}

.isi-sticky .isi-body-inner h4 {
	font-size: 16px;
	line-height: 20px;
	margin-bottom: 5px;
	color: #00014D;
	font-weight: 700;
	text-transform: uppercase;
}

.isi-sticky .isi-body-inner h5 {
	font-size: 16px;
	line-height: 20px;
	margin-bottom: 5px;
	color: #00014D;
	font-weight: 700;
}

.isi-sticky .isi-body-inner ul {
	margin-bottom: 20px;
	padding-left: 15px;
}

.isi-sticky .isi-body-inner ul li {
	list-style-type: disc;
}

.isi-sticky .isi-body-inner p span {
	font-weight: bold;
}

.isi-sticky .isi-body {
	padding: 0;
	max-height: 0;
	opacity: 0;
	visibility: hidden;
	margin-top: 2px;
}

.isi-sticky.initial-expanded .isi-body {
	padding: 16px 20px 20px;
	max-height: 55px;
	opacity: 1;
	visibility: visible;
	margin-top: 0;
	overflow: hidden;
}

.isi-sticky.initial-expanded .isi-body-inner {
	padding-bottom: 16px;
}

.isi-sticky.initial-expanded .isi-body-inner > *:not(:first-child) {
	display: none;
}

.isi-sticky.fully-expanded .isi-body {
	padding: 16px 20px 28px;
	max-height: none;
	opacity: 1;
	visibility: visible;
	margin-top: 0;
}

.isi-sticky .isi-body-inner {
	font-size: 16px;
	line-height: 1.6;
	color: #222;
	max-width: var(--isi-container-width, 1140px);
	margin: 0 auto;
}

.isi-sticky .isi-section + .isi-section {
	margin-top: 18px;
	border-top: 1px dashed #e5e5e5;
	padding-top: 14px;
}

.isi-sticky .isi-subtitle {
	margin: 0 0 8px 0;
	font-size: 13px;
	color: #266dd3;
	font-weight: 700;
	text-transform: uppercase;
}

/* FULL SECTION (normal flow) */
.isi-full {
	max-width: 1180px;
	margin: 40px auto 0 auto;
	padding: 20px 20px 0 20px;
}

.isi-full .isi-full-inner h2 {
	font-family: 'Fustat', Helvetica, Arial, Lucida, sans-serif !important;
	font-size: 19px !important;
	color: #266dd3;
	text-transform: uppercase;
	font-weight: 700;
	line-height: 1.2;
	margin-bottom: 16px;
}

.isi-full .isi-full-section + .isi-full-section {
	margin-top: 28px;
	border-top: 1px solid #eef2f7;
	padding-top: 18px;
}

.isi-full .isi-full-section h3 {
	margin: 0 0 12px 0;
	font-size: 16px;
	color: #266dd3;
	font-weight: 700;
	text-transform: uppercase;
}

/* Responsive */
@media (min-width: 768px) and (max-width: 991px) {
	.isi-sticky .isi-header {
		max-width: 100%;
		padding: 14px 20px;
	}
	.isi-sticky .isi-body-inner {
		max-width: 100%;
	}
}

/* ================= FULL ISI SECTION - TITLE IN 3 LINES (below iPad) ================= */
@media (max-width: 991px) {
	.isi-full .isi-full-inner h2 {
		font-size: 16px !important;
		line-height: 1.3 !important;
		max-width: 60%;
		word-break: break-word;
		white-space: normal;
	}
}

@media (max-width: 767px) {

	/* ================= NON-HCP MOBILE LAYOUT ================= */

	/* Base mobile sizing - increased to prevent title cutoff */
	.isi-sticky {
		height: 110px;
		bottom: 0;
		transform: translateY(0);
	}

	.isi-sticky.collapsed {
		height: 110px;
	}

	.isi-sticky.initial-expanded {
		height: 200px;
	}

	.isi-sticky.fully-expanded {
		height: 60vh;
		max-height: calc(100vh - 20px);
	}

	.isi-sticky .isi-body {
		max-height: calc(60vh - 120px);
		padding: 16px 20px 28px 20px !important;
	}

	/* Header layout - flex-start for top alignment with better spacing */
	.isi-sticky .isi-header {
		padding: 18px 20px 16px;
		align-items: flex-start;
		min-height: 90px;
	}

	/* Title - wrap into multiple lines on left side */
	.isi-sticky .isi-header .isi-title {
		font-size: 16px !important;
		line-height: 1.3 !important;
		max-width: 60%;
		word-break: break-word;
		white-space: normal;
		padding: 2px 0;
	}

	/* Toggle button - horizontal layout with + beside "Expand" text */
	.isi-sticky .isi-header .isi-toggle {
		display: flex;
		flex-direction: row;
		align-items: center;
		gap: 8px;
		font-size: 12px;
		margin-top: 0;
	}

	/* Plus/minus button - keep circular style for non-HCP */
	.isi-sticky .isi-header .isi-caret {
		font-size: 18px;
		width: 18px;
		height: 18px;
		line-height: 18px;
		display: flex;
		align-items: center;
		justify-content: center;
		padding-top: 1px;
	}

	/* Toggle text size */
	.isi-sticky .isi-header .isi-toggle-text {
		font-size: 12px;
		line-height: 1;
	}

	/* Content area - show only first line in initial-expanded state */
	.isi-sticky.initial-expanded .isi-body {
		max-height: 130px;
	}

	.isi-sticky.initial-expanded .isi-body-inner > *:not(:first-child) {
		display: none;
	}

	.isi-sticky.initial-expanded .isi-body-inner > *:first-child p {
		white-space: nowrap;
		overflow: hidden;
		text-overflow: clip;
		display: block;
		line-height: 1.5;
		padding-top: 6px;
		padding-bottom: 6px;
		min-height: 1.6em;
	}

	/* ================= HCP MOBILE LAYOUT — SAFE FIX ================= */

	.isi-sticky.isi-hcp-style {
		height: 110px;
	}

	.isi-sticky.isi-hcp-style.collapsed {
		height: 110px;
	}

	.isi-sticky.isi-hcp-style.initial-expanded {
		height: 200px;
	}

	.isi-sticky.isi-hcp-style.fully-expanded {
		height: 60vh;
		max-height: calc(100vh - 20px);
	}

	/* Header layout with better spacing */
	.isi-sticky.isi-hcp-style .isi-header {
		align-items: flex-start;
		padding: 18px 20px 16px;
		min-height: 90px;
	}

	/* ---------- FORCE TITLE INTO ~3 LINES ---------- */
	.isi-sticky.isi-hcp-style .isi-header .isi-title {
		font-size: 16px !important;
		line-height: 1.3 !important;
		max-width: 60%;
		word-break: break-word;
		white-space: normal;
		padding: 2px 0;
	}

	/* ---------- HCP TOGGLE - HORIZONTAL LAYOUT LIKE MAIN SITE ---------- */
	.isi-sticky.isi-hcp-style .isi-header .isi-toggle {
		display: flex;
		flex-direction: row;
		align-items: center;
		gap: 8px;
		font-size: 12px;
		margin-top: 0;
	}

	.isi-sticky.isi-hcp-style .isi-header .isi-caret {
		font-size: 18px;
		width: 18px;
		height: 18px;
		line-height: 18px;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.isi-sticky.isi-hcp-style .isi-header .isi-toggle-text {
		font-size: 12px;
		line-height: 1;
	}

	/* ---------- CONTENT: SHOW ONLY FIRST LINE (NO LAYOUT CHANGE) ---------- */

	/* Hide all blocks except the first one */
	.isi-sticky.isi-hcp-style.initial-expanded .isi-body-inner > *:not(:first-child) {
		display: none;
	}

	/* Clamp ONLY the first paragraph text to a single visible line */
	.isi-sticky.isi-hcp-style.initial-expanded .isi-body-inner > *:first-child p {
		white-space: nowrap;
		overflow: hidden;
		text-overflow: clip;
		display: block;
		line-height: 1.5;
		padding-top: 6px;
		padding-bottom: 6px;
		min-height: 1.6em;
	}

	/* FIX: Prevent first line clipping on HCP mobile initial state */
	.isi-sticky.isi-hcp-style.initial-expanded .isi-body {
		max-height: 130px;
	}
}

/* ==================================================
   PIXEL-PERFECT MATCH WITH FULL ISI SPACING
   ================================================== */

/* Sticky container */
.isi-sticky-inner {
	padding-top: 0 !important;
}

/* Header block — tighter like full version */
.isi-header {
	padding-bottom: 8px !important;
	margin-bottom: 0 !important;
}

/* Title line-height exactly like full ISI */
.isi-title {
	margin-bottom: 0 !important;
	line-height: 1.2 !important;
}

/* First content heading ("What is Rezdiffra?") */
.isi-sticky-inner > :nth-child(2) h3,
.isi-sticky-inner > :nth-child(2) h4 {
	margin-top: 8px !important;
}

/* Ensure no phantom spacing */
.isi-header + * {
	padding-top: 0 !important;
	margin-top: 0 !important;
}

/* Expanded state safety */
.isi-sticky.fully-expanded .isi-header {
	padding-bottom: 8px !important;
}

/* Mobile fixes - iOS Chrome/Safari gap fix */
@media (max-width: 767px) {
	.isi-sticky {
		position: fixed !important;
		bottom: 0 !important;
		left: 0 !important;
		right: 0 !important;
		top: auto !important;
		transform: none !important;
		-webkit-transform: none !important;
		transition: height 0.3s ease !important;
		margin: 0 !important;
	}

	.isi-sticky.hidden {
		display: none !important;
		visibility: hidden !important;
		opacity: 0 !important;
		pointer-events: none !important;
		transform: none !important;
		-webkit-transform: none !important;
	}
}

/* ================= DISABLE INNER SCROLL UNLESS FULLY EXPANDED ================= */

/* Default: prevent inner scrolling */
.isi-sticky .isi-sticky-inner {
	overflow-y: hidden;
}

/* Enable scrolling only when fully expanded */
.isi-sticky.fully-expanded .isi-sticky-inner {
	overflow-y: auto;
}
