
body {
	line-height: 1.2em;		
}
	
@media (max-width: 600px) {
    .main-container {
        padding: 10px;
    }
}
	
.test-container {
	max-width: 1155px;
    margin-top:0 !important;
	
}
/* For desktop */
 @media (min-width: 1001px) {
  .test-container	{
  	box-shadow: 0px 0px 16px rgba(0,0,0,0.3);
	border-radius: 10px;
	margin: 60px auto;
	padding: 50px 50px 20px 50px;
  }
}

/* For mobile */
 @media (max-width: 1000px) {
  .test-container	{
  	padding: 10px;
  }
}


 .test-title {
 	padding: 0px 0 20px 0;
	font-size: 1.7em;
	font-family: 'Roboto', 'Open Sans', Arial, Verdana, sans-serif;
	line-height: 1.0em;
	color: black;
	text-align: center;
	/* For printing on paper */
	-webkit-print-color-adjust: exact !important;   /* Chrome, Safari 6 – 15.3, Edge */
	color-adjust: exact !important;                 /* Firefox 48 – 96 */
	print-color-adjust: exact !important;
 }

 .test-title span {
	display: inline-block;
	background: linear-gradient(to right, purple, red, orange);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
 }

 .follow-up {
	display: block !important;
 	font-size: 0.8em;
	font-family: 'Roboto', 'Open Sans', Arial, Verdana, sans-serif;
	line-height: 1em;
	margin-top: 6px;
 }

 .follow-up-link {
	font-size: 0.6em;
	position: relative;
	top: -6px;
	color: #ca5050;
 }

 .followup-kits {
	display: block !important;
 	font-size: 0.8em;
	font-family: 'Roboto', 'Open Sans', Arial, Verdana, sans-serif;
	line-height: 1em;
	margin-top: 6px;
 }

 .followup-kits-link {
	font-size: 0.6em;
	position: relative;
	top: -6px;
	color: #ca5050;
 }

 .top-info {
 	font-size: 1.3em;
	font-family: 'Roboto', 'Open Sans', Arial, Verdana, sans-serif;
	line-height: 1.2em;
	color: #5f5f5f;
	text-align: center;
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	border-bottom:0px solid #E5E5E5;
	padding: 0px 0 20px 0;
 }

 .top-info .left-info {
	text-align: left;
	font-size:16px;
	line-height: 22px;
  }
  
  .top-info .right-info {
	text-align: right;
	font-size:16px;
	line-height: 18px;
  }

/* Responsive Design for Mobile */
@media (max-width: 500px) {
    .top-info {
        flex-direction: column; /* Stack content vertically */
        align-items: flex-start; /* Align items to the start */
        text-align: center; /* Ensure left alignment for mobile */
    }

    .top-info .left-info, 
    .top-info .right-info {
        text-align: center; /* Align text to the left */
        width: 100%; /* Full width for each block */
    }

    .top-info .right-info {
        margin-top: 10px; /* Add space between left and right info */
    }
}

.test-view-header {
    margin-top: 40px;;
}

/* SUMMARY PAGE */

.clinical-summary {
	margin-bottom: 20px;
}

/* Parent container styles */
.summary-category-list-header {
    display: flex; /* Use flexbox for layout */
    justify-content: space-between; /* Push title and button to opposite sides */
    align-items: center; /* Vertically align items */
    width: 100%; /* Full width */
    padding: 10px; /* Add some spacing */
    box-sizing: border-box; /* Include padding in width calculation */
}

/* Title styles */
.summary-header-title {
    font-size: 1.8em;
    font-weight: 300;
    margin: 0; /* Remove default margins */
    color: black;
    display: flex; /* Align icon and text horizontally */
    align-items: center; /* Vertically align icon and text */
    gap: 5px; /* Space between icon and text */
}

/* Bottom Button Container */
.summary-bottom-button {
    display: flex;
    justify-content: center; /* Center button horizontally */
    margin-top: 20px; /* Add spacing above the button */
    width: 100%; /* Full width */
}

@media (max-width: 640px) {
    .summary-category-list-header {
        flex-direction: column; /* Stack items vertically */
        align-items: center; /* Align items to the left */
        gap: 10px; /* Add spacing between the title and button */
    }

	.header-title {
        text-align: center; /* Center-align text inside the title */
    }
		

    .main-button {
        align-self: stretch; /* Make the button span the full width */
    }

	.summary-bottom-button .main-button {
        width: 100%; /* Full width for the bottom button */
    }
}



/* DETAILED RESULTS */

/* ############### Summary Box #################### */

.box-container {
  display: flex;
}

.summary-box {
  flex: 1; /* Makes both summary-boxes take up equal space */
  display: flex;
  flex-direction: column; /* Stacks content vertically */
  justify-content: center; /* Centers content vertically */
  align-items: center; /* Centers content horizontally */
  height: 80px; /* Example height */
  margin: 10px;
  color: #4a4848; /* Text color */
  font-family: Arial, sans-serif; /* Example font */
  border-radius: 10px;
  line-height: 1.2;
}

.summary-box.abnormal {
  background-color:#FFF5F6;
  /* For printing on paper */
  -webkit-print-color-adjust: exact !important;   /* Chrome, Safari 6 – 15.3, Edge */
  color-adjust: exact !important;                 /* Firefox 48 – 96 */
  print-color-adjust: exact !important;
}

.summary-box.normal {
  background-color:#F5FFF5;
  /* For printing on paper */
  -webkit-print-color-adjust: exact !important;   /* Chrome, Safari 6 – 15.3, Edge */
  color-adjust: exact !important;                 /* Firefox 48 – 96 */
  print-color-adjust: exact !important;
}

.summary-box p {
  margin: 0;
  font-size: 20px;
  text-align: center;
}

.summary-box span {
  font-size: 24px; /* Example font size for the number */
  font-weight: bold; /* Makes the number bold */
  color: #717171;
}

@media only screen and (max-width: 500px) {
    .summary-box {
      padding-top:20px;
	  font-size: 0.9em;
    }

	.summary-box p {
		font-size: 18px;
		text-align: center;
	}
		
	.summary-box span {
		font-size: 20px; /* Example font size for the number */
		font-weight: bold; /* Makes the number bold */
		padding-top:5px;
	}
}

/* ############### NAVIGATION #################### */

.navigation-container {
	padding: 16px 0 20px 0;
	text-align: center;
}

.navigation-container span {
	font-family: 'Roboto', 'Open Sans', Arial, Verdana, sans-serif;
	display: block;
}

.button-link {
    display: inline-block; /* Allows the use of padding and sets the element in line */
    padding: 3px 7px; /* Adjusts the size of the button */
    margin-top: 10px;
    color: #515151; /* Text color */
    text-align: center; /* Centers the text */
    text-decoration: none; /* Removes the underline from links */
    font-weight: 400; /* Makes the text bold */
    border-radius: 5px; /* Rounds the corners */
    transition: background-color 0.3s, color 0.3s, transform 0.3s;
	border-width: 1px 1px 1px 2px;
	border-style: solid;
    font-size: 0.9em;
    font-family: 'Roboto', 'Open Sans', Arial, Verdana, sans-serif;
    position: relative; /* Needed for ::after to position relative to this element */
}

.button-link.red-border {
	border-color:rgb(205, 90, 14);
	/* background: linear-gradient(to right, #fff4f4, rgb(255 255 255));*/
}
.button-link.green-border {
	border-color: #74c172;
	/*background: linear-gradient(to right, #F5FFF5, rgb(255 255 255));*/
}

.button-link.red-dot::after {
    content: ''; /* Create the dot */
    position: absolute;
    top: -5px; /* Adjust position for the top */
    right: -2px; /* Adjust position for the right */
    width: 8px; /* Width of the dot */
    height: 8px; /* Height of the dot */
    background-color: rgb(205, 90, 14); /* Red color for the dot */
    border-radius: 50%; /* Make it a circle */
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.2); /* Optional subtle shadow */
    pointer-events: none; /* Prevent the pseudo-element from interfering with hover */
}

.button-link:hover {
   color: #000000; /* Lighter text color on hover */
    transform: translateY(-4px); /* Slightly move upwards on hover */
}

.expand-all-btn {
    border-style: solid !important;
    border-color: #aaa !important;
    color: #777 !important;
    cursor: pointer;
}

.expand-all-btn:hover {
    color: #333 !important;
    border-color: #666 !important;
}

@media print {
	.switch-tab-button {
		display: none;
	}
}




/* ########################## SECTIONS ########################## */

.section {
	padding-bottom: 40px;
	background-color: #FFFFFF; 
}

.section-header {
	background-color: #FAFAFA; 
	color: #333333; 
	padding: 20px 0; 
	margin: 20px 0;
	font-family: 'Roboto', 'Open Sans', Arial, Verdana, sans-serif;
	font-size: 1.8em; 
	letter-spacing: 1px; 
	border-radius: 2px; 
	clear: both;
	border-bottom: 1px solid gray;
  
}

.section-description {
	font-size: 1.0em;
	font-family: 'Roboto', 'Open Sans', Arial, Verdana, sans-serif;
	line-height: 1.5em;
	color: black;
	margin-bottom: 40px;
}


.graph-bottom-container {
	display: block;
	position: relative;
	margin-top:20px;
}






/* ############### CATEGORY LAYOUT #################### */


.grid {
    display: grid;
    grid-template-columns: 1fr; /* Default to one column */
    gap: 20px;
  }
@media only screen and (min-width: 1000px) {
    .grid {
      grid-template-columns: repeat(2, 1fr); /* Two columns on desktop */
    }
  }
 
 .grid-item	{
 	width: 100%;
	padding: 10px;
    box-sizing: border-box;
  	min-height: 100px;
    position: relative;
	padding:10px 24px;
	border: 1px solid gray;
	border-radius: 10px;
 }
 
 
 
 /* For mobile */
 @media (max-width: 1000px) {
  .grid	{
	width: 100%;
  }
}

/* For desktop */
 @media (min-width: 1001px) {
  .grid	{
  	
  }
}



/* ############### CATEGORY HEADER #################### */

	/* Main container */
	.cat-header-container {
		display: flex;
		width: 100%;
		padding: 10px 0;
		box-sizing: border-box; /* Include padding in width */
		align-items: flex-start; /* Align content to the top */
		margin-bottom: 20px;
	}

	/* Icon */
	.cat-header-icon {
		flex-shrink: 0; /* Prevent the icon from resizing */
		width: 50px;
		margin-right: 10px; /* Space between icon and text */
		display: flex;
		align-items: center; /* Center icon vertically */
	}

	.cat-header-icon img {
		max-width: 100%; /* Ensure the icon fits within 50px */
		height: auto;
	}

	/* Content container */
	.cat-header-content {
		flex: 1; /* Take up remaining space */
		display: flex;
		flex-direction: column; /* Stack rows vertically */
		gap: 5px; /* Add spacing between rows */
	}

	/* Rows */
	.cat-header-row {
		display: flex;
		justify-content: space-between; /* Space elements in the row */
		align-items: center;
		flex-wrap: nowrap; /* Prevent wrapping within a single row */
	}

	/* Title */
	.cat-header-title {
		flex: 1;
		font-size: 1.5em;
		font-weight: 400;
		line-height: 1.0em;
		color: #333;
		text-align: left;
	}

	.category-desc-toggle {
		display: inline-block;
		height: 0;
		overflow: visible;
		vertical-align: middle;
		line-height: 0;
		background: none;
		border: none;
		cursor: pointer;
		padding: 0;
		margin: 0 0 0 6px;
		color: #aaa;
		font-size: 0.9em;
		position: relative;
		top: -12px;
	}

	.cat-title-chevron-wrap {
		white-space: nowrap;
	}

	.cat-header-back-to-top {
		margin-left: 10px;
		font-size: 1.5em;
		align-self: flex-start; /* Align to the top of the row */
	}

	.cat-header-back-to-top:hover {
		transform: scale(1.2);
	}

	.cat-header-back-to-top a {
		text-decoration: none;
		color: #0077cc;
	}

	.cat-header-back-to-top a:hover {
		color: #218edc;
		transform: scale(1.1);
	}
	@media (max-width: 768px) { /* Adjust max-width for your mobile breakpoint */
		.cat-header-back-to-top a:hover {
			transform: none;
		}
	}

	/* Status Dots */
	.cat-header-status-dots {
		flex-shrink: 0;
		font-size: 1em;
		color: #007700;
		margin-right: 10px;
		text-align: left;
		white-space: nowrap; /* Prevent wrapping */
	}

	/* Status Text */
	.cat-header-status-text {
		flex: 1;
		font-size: 1em;
		text-align: left;
		color: #666;
		white-space: nowrap; /* Prevent wrapping */
	}




/* ############### CATEGORY COLUMN #################### */

	.category-column {
		border: 0;
		box-shadow: none;
		padding: 0;
	}
	@media only screen and (max-width: 800px) { /* stacked on mobile */
		.category-column {
			padding-top: 0;
		}
	}

	.category-content {
		font-size: 1.0em;
		font-family: 'Roboto', 'Open Sans', Arial, Verdana, sans-serif;
		line-height: 1.5em;
		color: black;
		margin: 0 0 20px 0;
	}
	

	.category-container {
		display: flex; /* Use flexbox for alignment */
		max-width: 100%; /* Set your desired max width */
		margin: 0 auto; /* Center the container if needed */
		gap: 20px; /* Add space between the icon and text */
		align-items: flex-start; /* Align icon to the top */
	}

	.category-container .icon {
		font-size: 2em;
		color: #c2c5c4;
		flex-shrink: 0; /* Prevent icon from resizing */
		position: relative;
		left: -7px;
	}

	.category-container .text {
		flex: 1; /* Allow text to take up remaining space */
	}

	.category-container .text p {
		word-wrap: break-word; /* Ensure long words wrap */
		font-size: 1em;
	}



	.interpretation-container {
		display: flex; /* Use flexbox for alignment */
		max-width: 100%; /* Set your desired max width */
		margin: 0 auto; /* Center the container if needed */
		gap: 20px; /* Add space between the icon and text */
		align-items: flex-start; /* Align icon to the top */
	}

	.interpretation-container .icon {
		font-size: 2em;
		color: #c2c5c4;
		flex-shrink: 0; /* Prevent icon from resizing */
		position: relative;
		left: -7px;
	}

	.interpretation-container .text {
		flex: 1; /* Allow text to take up remaining space */
	}

	.interpretation-container .text p {
		word-wrap: break-word; /* Ensure long words wrap */
		font-size: 1em;
		font-family: "Kalam", serif;
		font-weight: 400;
		font-style: normal;
		color:rgb(95 96 97);
	}
	.interpretation-container .text strong {
		color:gray;
		font-weight: 400;
	}


/* ############### NEW LAYOUT: DESCRIPTION FULL WIDTH + COMPOUND GRID #################### */

.category-description-full {
    width: 100%;
    margin-bottom: 8px;
}

.category-description-full .category-content {
    display: none;
    margin-top: 8px;
}

.category-description-full.expanded .category-content {
    display: block;
    margin-bottom: 30px;
}

.category-desc-toggle .toggle-chevron {
    display: inline-block;
    transition: transform 0.2s ease;
}

.category-desc-toggle.expanded .toggle-chevron {
    transform: rotate(90deg);
}

.compound-column-full {
    width: 100%;
}

.compound-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.compound-grid .compound-box {
    margin-bottom: 0;
}

@media only screen and (min-width: 800px) {
    .compound-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* ############### COMPOUND COLUMN #################### */

	.compound-column {
		border: 0;
		box-shadow: none;
		padding-top: 4px;
	}
	@media only screen and (max-width: 800px) { /* stacked on mobile */
		.compound-column {
			padding: 0;
		}
	}

	.compound-box {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 130px 14px;
		grid-template-rows: auto auto;
		column-gap: 6px;
		row-gap: 2px;
		align-items: center;
		padding: 8px 6px 8px 12px;
		border-radius: 10px;
		background-color: #F5F5F5;
		margin-bottom: 10px;
		width: 100%;
		box-sizing: border-box;
	}

	.compound-box {
		cursor: pointer;
		transition: transform 0.3s ease;
	}
	
	.compound-box:hover {
		transform: scale(1.05);
	}

	/* Grid slots */
	.cb-name {
		grid-column: 1;
		grid-row: 1;
		font-weight: 500;
		font-size: 0.85em;
		line-height: 1.1;
		min-width: 0;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		overflow: hidden;
		word-break: break-word;
	}

	.cb-graph {
		grid-column: 2;
		grid-row: 1;
		min-width: 0;
	}

	.cb-chevron {
		grid-column: 3;
		grid-row: 1 / span 2;
		align-self: center;
		justify-self: center;
		font-size: 1.1em;
		font-weight: 300;
		color: #9f9f9f;
	}

	.cb-value {
		grid-column: 1;
		grid-row: 2;
		font-size: 0.8em;
		color: #333;
		min-width: 0;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.cb-range {
		grid-column: 2;
		grid-row: 2;
		font-size: 0.7em;
		color: #777;
		text-align: center;
		min-width: 0;
		white-space: nowrap;
	}

	/* Status-tinted chevron colours */
	.normal-compact .cb-chevron { color: #b4d5bb; }
	.abnormal-compact .cb-chevron { color: #d5b4b4; }
	.borderline-compact .cb-chevron { color: #d5ceb4; }
	.unestablished-compact .cb-chevron { color: #b4c3d5; }

	/* Legacy classes kept for any non-migrated callers */
	.compound-header {
		display: flex;
		justify-content: space-between;
		align-items: center;
		width: 100%;
		margin-bottom: 0;
	}
	
	.compound-name {
		font-weight: 500;
		font-size: 0.9em;
		flex-grow: 1;
	}
	
	.compound-details-icon {
		font-size: 1.1em;
		font-weight:300;
		color: #9f9f9f;
		cursor: pointer;
	}
	.normal-compact .compound-details-icon {
		color: #b4d5bb;
	}
	.abnormal-compact .compound-details-icon {
		color: #d5b4b4;
	}
	.borderline-compact .compound-details-icon {
		color: #d5ceb4;
	}
	.unestablished-compact .compound-details-icon {
		color: #b4c3d5;
	}

	.compound-bottom {
		display: flex;
		justify-content: space-between;
		align-items: center;
		width: 100%;
	}

	.compound-value {
		font-size: 0.8em;
		color: #333;
		padding-left: 5px;
	}

	.compound-range {
		width:30%;
		text-align: right;
	}

	.compound-range-group {
		width: 30%;
		text-align: right;
	}

	.compound-range-group .compound-range {
		width: 100%;
	}

/* ############### COMPOUND LIST COLLAPSIBLE #################### */

/* Container for compounds with collapse functionality */
.compound-list {
    position: relative;
    isolation: isolate;
    transition: max-height 1.5s ease;
}

/* Hidden compounds */
.hidden-compound {
    display: none;
}

/* When the list is expanded, show all compounds */
.compound-list.expanded .hidden-compound {
    display: grid;
}

/* Fade overlay at the bottom */
.fade-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px; /* Adjust based on desired fade height */
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1)); /* Match compound-box background */
    pointer-events: none; /* Allows clicks to pass through */
    z-index: 1; /* Ensure it sits above compound boxes */
    transition: opacity 0.5s ease;
    opacity: 1;
}

/* Hide fade overlay when expanded */
.compound-list.expanded .fade-overlay {
    opacity: 0;
}

.button-container {
    display: flex; /* Use flexbox for layout */
    justify-content: center; /* Horizontally center the button */
    align-items: center; /* Vertically center the button */
    width: 100%; /* Optional: Ensure container spans full width */
    margin-top: 12px;
}


.toggle-button {
    display: flex;
    flex-direction: column; /* Stack content vertically */
    align-items: center; /* Center content horizontally */
    justify-content: center; /* Center content vertically */
    min-width: 120px; /* Prevent width changes */
    padding: 8px 16px;
    background-color: #ffffff;
    color: #000000;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8em;
    transition: background-color 0.3s;
    gap: 0px; /* Add space between caret and text */
    outline: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    appearance: none;
}

.toggle-button:focus-visible {
    outline: 2px solid #3278e1;
    outline-offset: 2px;
}

/* Default: caret below text */
.toggle-button .caret-icon {
    order: 2; /* Place caret below the text by default */
    font-size: 1.8em;
    color: rgb(50, 120, 225);
	line-height: 1.3;
}

.toggle-button .button-text {
    order: 1; /* Place text above the caret by default */
    font-size: 1em;
    color: rgb(50, 120, 225);
    text-align: center;
	line-height: 0;
}

/* When the button is showing 'Less' (caret up) */
.toggle-button.up .caret-icon {
    order: 1; /* Move caret above the text */
}

.toggle-button.up .button-text {
    order: 2; /* Move text below the caret */
}




.normal {
	border-top:5px solid #6aad68 !important;
	background: linear-gradient(to bottom, #F5FFF5, rgb(255 255 255)) !important;
}

.normal-compact {
 	border-left: 3px solid #6aad68;
	border-top:0;
	border-bottom: 1px solid #6aad68;
	background-color: #F5FFF5;
	color: rgb(69, 82, 69)
}

.normal-compact i {
	color: #1a8716;
	font-style: normal;
	font-weight: 500;
}

 
.abnormal {
 	border-top: 5px solid rgb(205, 90, 14) !important;
	background: linear-gradient(to bottom, rgb(255 243 243), rgb(255 255 255)) !important;
}

.abnormal-compact {
 	border-left: 3px solid rgb(205, 90, 14);
	border-top:0;
	background-color: #FFF5F6;
	border-bottom: 1px solid rgb(205, 90, 14);
	color: rgb(104, 85, 85)
}

.abnormal-compact i {
	color: #933715;
	font-style: normal;
	font-weight: 500;
}

.borderline {
	border-top:5px solid #f2d22e !important;
	background: linear-gradient(to bottom, rgb(255, 255, 245), rgb(255 255 255)) !important;
}

.borderline-compact {
	border-left: 3px solid #f2d22e;
	border-top: 0;
	border-bottom: 1px solid #f2d22e;
	background-color: #fffdea;
	color: #4d4906;
}
  
.borderline-compact i {
	color: #928208;   
	font-style: normal;
	font-weight: 500;
}

.number-display {
	border-top:5px solid #4a6ed1 !important;
	background: linear-gradient(to bottom, #f6f9ff, rgb(255 255 255)) !important;
}

.number-display-compact {
	border-left: 3px solid #a2bffb;
	border-top:0;
	border-bottom: 1px solid #a2bffb;
	background-color: #f6f9ff;
	color: #6e6e6e;
}

.number-display-compact i {
	color: #4a6ed1;   
	font-style: normal;
	font-weight: 500;
}
  
  
.graph-title {
    position: relative;
    font-family: 'Roboto', 'Open Sans', Arial, Verdana, sans-serif;
    font-size: 1.5em;
    line-height: 1.2em;
    color: #30669B;
    text-align: center;
    height: 60px; /* Ensures consistent height */
    margin-top: 20px; /* Adds spacing above */
}

.graph-title span {
    font-size: 0.8em;
    color: #787878;
    font-family: 'Courier New', Courier, monospace;
    font-weight: 600;
    position: absolute;
    right: 0; /* Aligns the unit to the far-right of the container */
    top: 50%;
    transform: translateY(-50%); /* Centers vertically within the title */
}





 /* #################### MINI GRAPH ######################## */

.mini-bar {
   display: flex;
   width: 100%; /* Adjust the width as needed */
   height: 3px;
   position: relative;
   background-color: #f7d25a; /* Yellow background */
   border-radius: 5px;
   /* For printing on paper */
   -webkit-print-color-adjust: exact !important;   /* Chrome, Safari 6 – 15.3, Edge */
   color-adjust: exact !important;                 /* Firefox 48 – 96 */
   print-color-adjust: exact !important;
 }

.mini-arrow-bar-container {
    display: flex;
    width: 100%;
    height: 2px;
    position: relative;
}

.mini-down-arrow {
	position: relative;
	display: inline-block; /* Make the child inline-block */
	margin: auto;
	width: 0; 
	height: 0; 
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-top: 5px solid black;    
}


/* ############### GRAPH #################### */
 
 .bar-container {
 	margin-top: 20px;
	margin-bottom: 50px;
 }
 
 .bar {
    display: flex;
    width: 100%; /* Adjust the width as needed */
    height: 20px;
    position: relative;
    background-color: #f7d25a; /* Yellow background */
	border-radius: 5px;
	/* For printing on paper */
	-webkit-print-color-adjust: exact !important;   /* Chrome, Safari 6 – 15.3, Edge */
	color-adjust: exact !important;                 /* Firefox 48 – 96 */
	print-color-adjust: exact !important;
  }
  	.percentage .bar {
		background-color:#007bff;
		/* For printing on paper */
		-webkit-print-color-adjust: exact !important;   /* Chrome, Safari 6 – 15.3, Edge */
		color-adjust: exact !important;                 /* Firefox 48 – 96 */
		print-color-adjust: exact !important;
	}
	
	
  .yellow-part, .green-part {
    height: 100%;
    position: relative; /* For absolute positioning of the labels */
  }

  .yellow-part:first-child {
    background-color: #f7d25a;
	/*background: linear-gradient(to right, #eebfff 0%, #eebfff 90%, #008000 100%);*/
    flex: 1; /* Equal flex value for equal width */
	width:25%;
	border-radius: 5px;
	/* For printing on paper */
	-webkit-print-color-adjust: exact !important;   /* Chrome, Safari 6 – 15.3, Edge */
	color-adjust: exact !important;                 /* Firefox 48 – 96 */
	print-color-adjust: exact !important;
  }

   .yellow-part:last-child {
    background-color: #f7d25a;
	/*background: linear-gradient(to left, #eebfff 0%, #eebfff 90%, #008000 100%);*/
    flex: 1; /* Equal flex value for equal width */
	width:25%;
	border-radius: 5px;
	/* For printing on paper */
	-webkit-print-color-adjust: exact !important;   /* Chrome, Safari 6 – 15.3, Edge */
	color-adjust: exact !important;                 /* Firefox 48 – 96 */
	print-color-adjust: exact !important;
  }
	
  .green-part {
	 background: #0aa42b;
		 background: linear-gradient(to left, #bacb1f, #4fd86d, #a3cb1f);;
	 width: 50%;
	 /* For printing on paper */
	 -webkit-print-color-adjust: exact !important;   /* Chrome, Safari 6 – 15.3, Edge */
	 color-adjust: exact !important;                 /* Firefox 48 – 96 */
	 print-color-adjust: exact !important;
  }

  .green-part.green-part-gradient-no-min,
  .mini-bar .green-part.green-part-gradient-no-min {
	 background: linear-gradient(to left, #bacb1f, #4fd86d, #37cb1f);
  }

  .green-part.green-part-gradient-no-max,
  .mini-bar .green-part.green-part-gradient-no-max {
	 background: linear-gradient(to right, #bacb1f, #4fd86d, #37cb1f);
  }

	.bar.no-min .green-part,
	.mini-bar.no-min .green-part {
		width: 75%;
	}

	.bar.no-max .green-part,
	.mini-bar.no-max .green-part {
		width: 75%;
	}

	.bar.no-min.no-max .green-part,
	.mini-bar.no-min.no-max .green-part {
		width: 100%;
	}
	.percentage .green-part {
		background: #0a37d6;
		background: linear-gradient(to left, #6ba3f1, #0a37d6, #6ba3f1);
		width: 100%;
		border-radius: 5px;
		/* For printing on paper */
		-webkit-print-color-adjust: exact !important;   /* Chrome, Safari 6 – 15.3, Edge */
		color-adjust: exact !important;                 /* Firefox 48 – 96 */
		print-color-adjust: exact !important;
		}
		

  .label {
    position: absolute;
    top: 30px; /* Adjust if you want more space between the bar and the label */
    font-size: 0.8em;
	font-family: 'Roboto', 'Open Sans', Arial, Verdana, sans-serif;
    color: black;
  }

  .label.start { /* Position the "24" at the beginning of the green part */
    left: 0px;
	color:#0aa42b;
	transform: translate(-50%, 0%);
  }
  	.percentage .label.start, .percentage .label.end {
		color: #0a37d6
	}

  .label.end { /* Position the "270" at the end of the green part */
    right: 0px;
	color:#0aa42b;
	transform: translate(50%, 0%);
  }
  .label.middle { /* Position the "270" at the end of the green part */
   	text-align: center;
	width: 100%;
	color: #0aa42b;
	font-size: 0.8em;
	display: flex;
  	align-items: center;
	justify-content: center;
	line-height: 0.9em;
  }
  
  @media only screen and (max-width: 800px) { /* stacked on mobile */
		.label.middle {
		  transform: translate(0px, -4px); 
		}
		.word {
			max-width: 55px;
		}
	}
  
  .left-arrow, .right-arrow {
	width: 0;
	height: 0;
	border-top: 4px solid transparent; /* Adjust arrow size as needed */
	border-bottom: 4px solid transparent; /* Adjust arrow size as needed */
}


	.word { display: flex;
		align-items: center;}

	.left-arrow {
		border-right: 15px solid #0aa42b; /* Adjust arrow size as needed */
		margin-right:10px;
	}

	.right-arrow {
		border-left: 15px solid #0aa42b; /* Adjust arrow size as needed */
		margin-left:10px;
	}
  
  
  .arrow-bar-container {
    display: flex;
    width: 100%; /* Adjust the width as needed */
    height: 20px;
    position: relative;
  }
  
  .arrow-container {
		position: relative;
		top: -15px; /* Adjust based on the height of your bar */
		left: 50%; /* Default position at 50%, adjust via inline style */
		text-align: center;
		transform: translate(-50%, 0%);
  }
  
   .down-arrow {
		position: relative;
		display: inline-block; /* Make the child inline-block */
		margin: auto;
		width: 0; 
		height: 0; 
		border-left: 10px solid transparent;
		border-right: 10px solid transparent;
		border-top: 10px solid black;    
	}
	
	.abnormal .down-arrow {border-top-color: red;}
	
	.arrow-text {
		position: relative;
		display: block; /* Make the child inline-block */
		margin: auto;
		top: -0px; /* Adjust based on the height of your bar */
		font-size: 1em;
		font-family: 'Roboto', 'Open Sans', Arial, Verdana, sans-serif;
		color: black;
		font-weight: 600;
  }
  
  .unit-text {
	font-size: 0.9em;
	color: #787878;
	font-family: 'Courier New', Courier, monospace;
	font-weight: 600;
	position: relative;
	top: 9px;	
	float:right;
  }



/* ############### NUMBER DISPLAY #################### */
  .display-number-container {
	  margin-top: 20px;
	  text-align: center;
  }
  .display-number {
	  font-size: 2.0em;
	  font-family: math;
	  color: #30669B;
	  font-weight: 600;
	  border: 1px solid #ccc;
	  padding: 10px 20px;
	  box-shadow: #c6c6c6 0px 0px 5px;
	  border-radius: 10px;
	  background-color: white;
  }



	/* ########################## Collapsible Graph Info ########################## */
		
		.info-content-button {
			position: relative;
			border: 0px;
			background-color: transparent;
			float: left;
			font-family: 'Roboto', 'Open Sans', Arial, Verdana, sans-serif;
			font-size: 0.8em;
			color:#869FFF;
		}
		
		/* Initial state of content is hidden */
		.info-content {
			max-height: 0;
			overflow: hidden;
			font-family: 'Roboto', 'Open Sans', Arial, Verdana, sans-serif;
			font-size: 1em;
			padding:40px 20px 0 20px;
			
		}

		/* When content is active, max-height is increased */
		.info-content.active {
			max-height: 100vh; 
			
			overflow: visible;
			
		}

		.info-content p {
			font-size: 1em;
		}

		.info-content li {
			list-style-type: disc;
			margin-left: 30px;
		}

		
	
	/* ########################## Graph Result ########################## */
	
		.result {
			display: block;
			position: relative;
			font-size: 1em;
			font-family: 'Roboto', 'Open Sans', Arial, Verdana, sans-serif;
			color: red;
		 }
 
		.red {
			color:rgb(205, 90, 14); 
		}

		.green {
			color:#6aad68;
		}

		.black {
			color:black;
		}

		.orange {
			color:#d59114;
		}
		
		 
		 
		 




/* ############### TEST INTERPRETATION ################ */

.test-interpretation {
	padding: 30px 40px 20px 40px;
	/*font-family: "Kalam", serif;	*/
}
@media screen and (max-width: 500px) {
	.test-interpretation {
		padding: 20px 0 10px 0px;
	}
	
}
 
.test-interpretation p {
 	font-size: 1.0em;
	line-height: 1.6em;
	color: #454444;
	font-weight: 400;
	margin-bottom: 0.8em;
}

.test-interpretation i {
	display: block;
	font-style: normal;
	padding: 20px;
	background-color: #fff6d7;
	border-radius: 10px;
	font-size: 1em;
}



/* ############### CATEGORY ICONS #################### */

.category-list-icons {
    list-style: none; /* Remove default bullets */
    padding-left: 0;
}

.category-list-icons li {
    padding-left: 70px; /* Space for the custom icon */
	padding-bottom: 10px;
    position: relative;
    margin-bottom: 10px; /* Add spacing between items */
	min-height: 50px;
	line-height: 1.4em;
	border-bottom: 1px solid #E5E5E5;
	font-size: 0.9em;

}

.category-list-icons li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
   	width: 50px; /* Adjust icon width */
    height: 50px; /* Adjust icon height */
    background-size: contain;
    background-repeat: no-repeat;
}

.category-list-icons .category-name {
	font-size: 1.2em;
	font-weight: bold;
	margin-bottom: 10px;
}

.category-list-icons .compound-list {
	padding: 10px 20px 15px 20px;
	padding-top:10px;
}


/* ========== STATUS DOTS STYLES ========== */

	.status-dots-row {
		display: flex;
		align-items: center;
		gap: 3px;
	}
	.dot-wrapper {
		position: relative;
		display: inline-block; /* so the dot is sized per width/height */
		width: 9px;
		height: 9px;
	}
	
	/* The circle */
	.dot {
		display: block;
		width: 100%;
		height: 100%;
		border-radius: 50%;
	}
	
	/* Colors */
	.dot.abnormaldot   { background-color: #d86565; }
	.dot.borderlinedot { background-color: #f4bf56; }
	.dot.normaldot     { background-color: #74c172; }
	
	/* Fade overlay for the last dot if there's more than 10 total */
	.dot-wrapper.fade::after {
		content: "";
		position: absolute;
		top: 0; right: 0; bottom: 0; left: 0;
		background: linear-gradient(to right,
									rgba(255,255,255,0) 60%,
									rgba(255,255,255,1) 100%);
		pointer-events: none;
	}
	
	.status-dots-text {
		display: inline-block;
		padding-left:15px;
		font-size: 0.5em;
		color: #787878;
	}
	@media only screen and (max-width: 800px) { /* stacked on mobile */
		.status-dots-text {
			padding-top: 0;
		}
	}

	.plus-dot-wrapper {
		display: inline-block;
		font-size: 1em;
		color: rgb(134, 134, 134);
		position: relative;
		top:1px;
	}
  
  


/* ############### DETAILS POPUP #################### */

/* ############### DETAILS POPUP #################### */

/* Global Box-Sizing */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Modal Overlay */
.details-modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 3000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    background-color: rgba(0, 0, 0, 0.7); /* Black w/ opacity */
    overflow: hidden; /* Prevent scrolling of the background */
}

/* Modal Content */
.details-modal-content {
    margin: auto; /* Centered */
	margin-top: 30px;
    padding: 0; /* Remove padding to manage spacing via header and body */
    width: 95%; /* Adjust width for smaller screens */
    max-width: 800px; /* Max width for desktop */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    border-radius: 15px;
    display: flex;
    flex-direction: column; /* Stack header and body vertically */
    max-height: 90vh; /* Ensure modal doesn't exceed 90% of the viewport height */
    overflow: visible; /* Allow close button to overflow */
}

/* Modal Header */
.modal-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1002;
    pointer-events: none;
}

.modal-header > * {
    pointer-events: auto;
}

/* Close Button */
.close-button {
    position: absolute;
    top: -8px;
    right: -6px;
    background: white;
    border: none;
    border-radius: 50%;
    color: #555;
    font-size: 22px;
    cursor: pointer;
    z-index: 1003;
    padding: 0;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: color 0.2s;
}

.close-button:hover,
.close-button:focus {
    color: #e74c3c;
    outline: none;
}

.close-button i {
    position: relative;
    left: 1px;
}

/* Modal Body */
.modal-body {
    padding: 0px;
    overflow-y: auto; /* Enable vertical scrolling for the content */
    max-height: 100vh; /* Limit body height to fit within viewport */
    flex: 1 1 auto; /* Allow body to grow and shrink as needed */
    border-radius: 15px;
	scrollbar-width: thin; /* Firefox: Use thin scrollbar */
	scrollbar-color: #ccc transparent; /* Firefox: Thumb and track colors */
}

.modal-body::-webkit-scrollbar {
width: 8px; /* Width of the scrollbar */
}

.modal-body::-webkit-scrollbar-track {
background: transparent; /* Track background color */
}

.modal-body::-webkit-scrollbar-thumb {
background-color: #ccc; /* Thumb color */
border-radius: 4px; /* Round edges */
border: 2px solid transparent; /* Padding inside the track */
}

.modal-body::-webkit-scrollbar-thumb:hover {
background-color: #aaa; /* Darker thumb on hover */
}

.details-compound-description {
	padding: 0 0 0 0;
	font-size: 1.0em;
	line-height: 1.5em;
	color: black;
}
.details-compound-description p {
	font-size: 1em;
}
.details-compound-description ul {
	list-style-type: disc;
	margin-left: 30px;
	line-height: 1.3;
}

.details-compound-interpretation {
	padding: 10px 20px 0 0;
	font-size: 1.1em;
	line-height: 1.5em;
	color: black;
}


/* SHARE TEST RESULTS MODAL */
/* Modal Content */
.share-results-modal-content {
    margin: auto; /* Centered */
	margin-top: 30px;
    padding: 0; /* Remove padding to manage spacing via header and body */
    width: 95%; /* Adjust width for smaller screens */
    max-width: 800px; /* Max width for desktop */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    border-radius: 15px;
    display: flex;
    flex-direction: column; /* Stack header and body vertically */
    height: 400px; /* Ensure modal doesn't exceed 90% of the viewport height */
    overflow: hidden; /* Prevent content overflow */
}
@media (max-width: 568px) {
	.share-results-modal-content {
		height: 100vh; /* Full height for mobile */
		border-radius: 10px;
	}
}



.other-cats-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 0; /* Space between icons and text */
    align-items: flex-start;
    margin-bottom: 16px; /* Spacing below the container */
}

.other-cats-icons {
    display: grid;
    grid-template-columns: repeat(6, auto); /* Up to 6 icons in one row */
    grid-gap: 0; /* Space between icons */
    flex-shrink: 0; /* Prevent icons from shrinking */
}

.other-cats-category-icon {
    width: 48px; /* Icon size */
    height: 48px; /* Keep square aspect ratio */
	margin-right:2px;
}

.other-cats-text {
    flex: 1; /* Take up remaining space */
    margin: 0 0 10px 0; /* Ensure spacing between icons and text */
    max-width: 100%; /* Prevent text from shrinking */
    word-wrap: break-word; /* Handle long text gracefully */
}


.inline-block-container {
    display: inline-block; /* Makes the element inline-block */
    border: 1px solid #dddddd; /* Border color */
    border-radius: 5px; /* Rounded corners */
    padding: 0 8px 0 0; /* Inner spacing */
	margin:6px 5px 0px 0;
    background-color: #f9f9f9; /* Optional: background color */
    vertical-align: middle; /* Aligns with surrounding inline elements */
}

.inline-block-container img {
    width: 30px; /* Icon width */
    height: 30px; /* Icon height */
   vertical-align: middle; /* Align icon with text */
}

.inline-block-container span {
    font-size: 14px; /* Adjust font size */
    font-weight: 400; /* Font weight */
    color: #333; /* Text color */
    line-height: 30px; /* Align text with the icon */
    vertical-align: middle; /* Ensures text aligns with the icon */
    white-space: nowrap; /* Prevents wrapping */
}


/* Mobile responsiveness */
@media (max-width: 768px) {
    .other-cats-container {
        flex-wrap: wrap; /* Stack content vertically on mobile */
    }
    .other-cats-icons {
        grid-template-columns: repeat(6, 1fr); /* 6 icons in one row */
        width: 100%; /* Full width for icons on mobile */
        margin-bottom: 16px; /* Space below icons */
    }
    .other-cats-text {
        width: 100%; /* Text takes full width below icons */
        margin-left: 0; /* Reset left margin */
    }
}







/* Responsive Styles */
@media screen and (max-width: 800px) {
    .details-modal-content {
        width: 100%; /* Full width for mobile */
        height: 100%; /* Full height for mobile */
        margin: 0; /* Remove margin */
        border-radius: 0; /* Remove border radius */
        padding: 0; /* Remove padding as it's managed by header and body */
		max-height: 100vh;
    }

	.modal-body {
		padding-top: 20px;
		height: 100vh;
	}

      .close-button {
        top: 8px;
        right: 8px;
    }

    .modal-watch-btn {
        top: 40px !important;
    }

	.details-compound-interpretation {
		padding: 10px 0 0 0;
	}
}



/* ############### BOTTOM INFO #################### */

/* Container */
.bottom-info-title {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr; /* Three equal columns */
    gap: 16px; /* Space between columns */
    font-family: 'Roboto', 'Open Sans', Arial, Verdana, sans-serif;
    font-size: 1.3em;
    line-height: 1.2em;
    color: rgb(0, 0, 0);
    text-align: center;
    border-top: 1px solid rgb(221, 221, 221); /* Border at the top */
    padding: 20px 0 0 0; /* Padding at the top and bottom */
}

/* Left Column */
.bottom-info-left {
    text-align: left;
    font-size: 14px;
    line-height: 1.2em;
}

/* Middle Column */
.bottom-info-middle {
    text-align: center;
    font-size: 12px;
    line-height: 1.2em;
}

/* Right Column */
.bottom-info-right {
    text-align: right;
    font-size: 14px;
    line-height: 1.2em;
}

/* Spacing Element */
.bottom-info-spacing {
    margin-top: 10px;
}

/* Bottom Info Dislaimer */
.bottom-info-disclaimer {
	font-size: 13px;
	line-height: 1.3em;
	color: rgb(8, 8, 8);
	text-align: center;
	margin-top: 30px; /* Spacing above the disclaimer */
}

/* Responsive Design for Mobile */
@media (max-width: 768px) {
    .bottom-info-title {
        grid-template-columns: 1fr; /* Stack all columns vertically */
        text-align: left; /* Ensure text aligns left */
    }

    .bottom-info-middle {
        order: 3; /* Move the middle column to the bottom */
        margin-top: 0px; /* Add spacing above the middle column */
		text-align: center;
    }

    .bottom-info-left,
    .bottom-info-right {
        order: initial; /* Keep the left and right info in their natural order */
        margin-bottom: 20px; /* Add spacing below each section */
		text-align: center;
    }
	.bottom-info-disclaimer {
		margin-top: 10px; /* Ensure disclaimer has spacing above */
		text-align: center; /* Center the disclaimer text */
	}
}


.dimmed {
    opacity: 0.3;
}

.compound-box.dimmed {
    opacity: 1; /* Full opacity on container */
    position: relative;
}

.compound-box.dimmed::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.7); /* or use 0,0,0 for gray overlay */
    z-index: 1;
    pointer-events: none;
}

.compound-box.dimmed .dim-overlay-content {
    opacity: 0.3;
    position: relative;
    z-index: 2;
}

.hidden-label {
    position: absolute;
    top: 8px;
    right: 8px;
    background: red;
    color: white;
    font-weight: bold;
    font-size: 0.7em;
	line-height: 1.5em;
    padding: 0 6px;
    border-radius: 4px;
    z-index: 3;
}

.bar-container.dimmed .bar {
    opacity: 0.3;
    position: relative;
}

.hidden-label-large {
    position: absolute;
    top: 100px; /* adjust as needed to look clean */
    right: 10px;
    background: red;
    color: white;
    font-weight: bold;
    font-size: 0.8em;
    padding: 2px 8px;
    border-radius: 4px;
    z-index: 10;
    opacity: 1;
    pointer-events: none;
}

.bar-container.dimmed .hidden-label-large {
  opacity: 1 !important;
}


.compound-popup.dimmed .bar {
    opacity: 0.3;
    position: relative;
}

/* ========================================
   Trend Graph Styles
   ======================================== */

.trend-graph-container {
    margin: 0;
    padding: 0;
}

.trend-chart-wrapper h4 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 1.1em;
    font-weight: 600;
    text-align: center;
}

.trend-loading,
.trend-no-data,
.trend-error {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-style: italic;
}

.trend-loading {
    background: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="20" fill="none" stroke="%236c757d" stroke-width="4" stroke-dasharray="31.416" stroke-dashoffset="31.416"><animate attributeName="stroke-dasharray" dur="2s" values="0 31.416;15.708 15.708;0 31.416" repeatCount="indefinite"/><animate attributeName="stroke-dashoffset" dur="2s" values="0;-15.708;-31.416" repeatCount="indefinite"/></circle></svg>') no-repeat center center;
    background-size: 20px 20px;
    padding-left: 30px;
}

.trend-error {
    color: #dc3545;
}

.trend-no-data {
    color: #6c757d;
}

.chart-wrapper {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 0;
}

@media (max-width: 768px) {
    .trend-graph-container {
        margin: 0;
        padding: 0;
    }
    
    .chart-wrapper {
        height: 180px !important;
    }
}

/* Refresh button for development environment */
.trend-refresh-btn {
    position: absolute;
    top: 10px;
    right: 50px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 1px solid #dee2e6;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
}

.trend-refresh-btn:hover {
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.trend-refresh-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.trend-refresh-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
}

.trend-refresh-btn i {
    color: #6c757d;
    font-size: 14px;
    transition: color 0.2s ease;
}

.trend-refresh-btn:hover:not(:disabled) i {
    color: #495057;
}

/* Font Awesome already provides fa-spin class for rotation animation */


/* =============================================
   WATCHED COMPOUNDS SECTION
   ============================================= */

/* Watched section at top of results */
.watched-section {
    margin-bottom: 20px;
	padding: 0;
    border: none;
    border-radius: 0;
    background: none;
}

@media (min-width: 800px) {
    .watched-section {
        padding: 16px;
        border: 1px solid #e8d48b;
        border-radius: 12px;
        background: #fffef5;
    }
}

.watched-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.watched-section-title {
    font-weight: 600;
    font-size: 1em;
    color: #333;
}

.watched-section-title i {
    color: #f5a623;
    margin-right: 4px;
}

.watched-manage-link {
    font-size: 0.85em;
    color: #666;
    text-decoration: none;
}

.watched-manage-link:hover {
    color: #333;
}

.watched-compounds-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
}

.watched-compounds-list .compound-box {
    margin-bottom: 0;
}

@media (min-width: 800px) {
    .watched-compounds-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

.watched-compound-card {
    min-width: 0;
    margin-bottom: 0;
}

.no-result-card {
    opacity: 0.55;
    border-style: dashed !important;
}

.no-data-text {
    color: #999;
    font-style: italic;
    font-size: 0.85em;
}

/* Out of Range Markers section (collapsible) */
.out-of-range-section {
    margin-top: 20px;
}

@media (min-width: 800px) {
    .out-of-range-section {
        border-color: #f0c0c0;
        background: none;
    }
}

.out-of-range-header {
    cursor: pointer;
    user-select: none;
    margin-bottom: 0;
    -webkit-tap-highlight-color: transparent;
}

.out-of-range-section:not(.collapsed) .out-of-range-header {
    margin-bottom: 12px;
}

.out-of-range-section .watched-section-title i.fa-triangle-exclamation {
    color: #d9534f;
}

.out-of-range-count {
    color: #888;
    font-weight: 500;
    margin-left: 4px;
}

.out-of-range-chevron {
    color: #888;
    font-size: 0.95em;
    transition: transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.out-of-range-section:not(.collapsed) .out-of-range-chevron {
    transform: rotate(180deg);
}

.out-of-range-section.collapsed .out-of-range-list {
    display: none;
}

/* Watch indicator star on compound bars */
.watch-indicator {
    color: #f5a623;
    font-size: 0.75em;
    margin-right: 4px;
    vertical-align: middle;
}

.watch-indicator:not(.watched) {
    display: none;
}

/* Modal watch button */
.modal-watch-btn {
    position: absolute;
    top: 24px;
    left: 8px;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.3em;
    cursor: pointer;
    color: #ccc;
    padding: 4px 8px;
    transition: color 0.2s;
    z-index: 1001;
}

.modal-watch-btn.watched {
    color: #f5a623;
}

.modal-watch-btn:hover {
    color: #f5a623;
}

/* Admin-only badge */
.admin-only-badge {
    display: inline-block;
    font-size: 0.65em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #fff;
    background: #e07070;
    border-radius: 4px;
    padding: 2px 6px;
    vertical-align: middle;
    float: right;
    margin-top: 3px;
}

/* Search within results */
.results-search-container {
    position: relative;
    margin-bottom: 20px;
    z-index: 1001;
    background: #eef5fd;
    border: 1px solid #ccdff5;
    border-radius: 12px;
    padding: 14px 16px 10px;
}

.results-search-label {
    display: block;
    font-size: 0.75em;
    font-weight: 700;
    color: #4a90d9;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 8px;
}

.results-search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.results-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #4a90d9;
    font-size: 0.95em;
    line-height: 1;
    pointer-events: none;
}

.results-search-input {
    width: 100%;
    padding: 7px 36px 7px 40px !important;
    border: 1.5px solid #c0d8f0;
    border-radius: 8px;
    font-size: 0.95em;
    background: white;
    box-sizing: border-box;
    box-shadow: none;
    margin-bottom: 0;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.results-search-input:focus {
    outline: none;
    border-color: #4a90d9;
    background: white;
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.18);
}

.results-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 500;
    max-height: 300px;
    overflow-y: auto;
}

.results-search-clear {
    position: absolute;
    right: 10px;
    top: 0;
    background: none;
    border: none;
    color: #999;
    font-size: 1em;
    cursor: pointer;
    padding: 4px 6px;
    display: none;
    line-height: 1;
}

.results-search-clear:hover {
    color: #555;
}

.search-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: #f5f5f5;
}

.search-result-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.search-result-name {
    font-weight: 500;
    font-size: 0.95em;
}

.search-result-category {
    font-size: 0.8em;
    color: #888;
}

.search-result-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.search-watch-btn,
.search-jump-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    font-size: 1em;
    color: #ccc;
    transition: color 0.2s;
}

.search-watch-btn.watched {
    color: #f5a623;
}

.search-watch-btn:hover {
    color: #f5a623;
}

.search-jump-btn:hover {
    color: #007bff;
}

.search-no-results {
    padding: 12px 14px;
    color: #999;
    font-style: italic;
    font-size: 0.9em;
}

/* Compound pulse animation for jump-to */
.compound-highlight {
    animation: compoundPulse 0.4s ease-in-out 2;
}

@keyframes compoundPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(245, 166, 35, 0.5); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 4px rgba(245, 166, 35, 0.4); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(245, 166, 35, 0); }
}

@media (max-width: 600px) {
    .watched-compound-card {
        flex: 1 1 100%;
    }
}

/* ── Results Actions Icon Tooltips (desktop) ── */
.results-action-btn {
    position: relative;
}

.results-action-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    font-size: 12px;
    font-family: sans-serif;
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 4px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 200;
}

.results-action-btn:hover::after {
    opacity: 1;
}

/* ── Results Actions Mobile 3-Dot Menu ── */
.results-actions-mobile-menu {
    display: none;
}

@media (max-width: 768px) {
    .results-actions-mobile-menu {
        display: inline-block;
        float: right;
        position: relative;
        top: 8px;
        font-size: 20px;
        z-index: 100;
    }

    .results-actions-mobile-menu > i {
        cursor: pointer;
        color: #888;
        padding: 4px 8px;
    }

    .results-mobile-dropdown {
        display: none;
        position: absolute;
        right: 0;
        top: 100%;
        background: #1a1a1a;
        border: 1px solid #444;
        border-radius: 8px;
        list-style: none;
        padding: 4px 0;
        margin: 4px 0 0 0;
        z-index: 1000;
        min-width: 160px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    .results-mobile-dropdown li {
        padding: 0;
        white-space: nowrap;
    }

    .results-mobile-dropdown li a {
        display: block;
        padding: 10px 16px;
        color: #fff;
        text-decoration: none;
        font-size: 0.85em;
        cursor: pointer;
    }

    .results-mobile-dropdown li a i {
        margin-right: 8px;
        width: 16px;
        text-align: center;
    }

    .results-mobile-dropdown li:hover {
        background: #333;
    }

    .results-mobile-dropdown li:first-child:hover {
        border-radius: 8px 8px 0 0;
    }

    .results-mobile-dropdown li:last-child:hover {
        border-radius: 0 0 8px 8px;
    }
}
