/* Security Site CSS Overrides */
/* This file contains security-site specific overrides that should not be shared */

/* TrueNAS Brand Font Import for Security Site */
@import url('https://fonts.googleapis.com/css2?family=DIN+2014:wght@300;400;500;600;700&display=swap');

/* Security Site Font Overrides */
/* Headers use DIN 2014 for branding */
h1,h2,h3,h4,
.truenas-menubutton,
.truenas-downloadbutton,
.truenas-supportbutton,
.truenas-column-header {
  font-family: "DIN 2014", din-2014, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Body and general text uses Liberation Sans (security site standard) */
body, p, a, td, th {
  font-family: "Liberation Sans", sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Adjust site width for security site */
.container {
	max-width: 90rem;
}

/* Disable Nav sidebar (security site uses simplified navigation) */
.gdoc-nav {
	display: none;
}

/* Style Security Sections column boxes */
.security-sections {
  display: grid;
  grid-template-columns: auto auto auto auto;
  gap: 2rem;
  padding: 1rem;
}
@media screen and (max-width: 50rem) {
	.security-sections {
		grid-template-columns: auto auto;
	}
}
@media screen and (max-width: 25rem) {
	.security-sections {
		grid-template-columns: auto;
	}
}
.security-sections div {
  text-align: center;
  padding: 20px 0;
  font-size: 18px;
  font-weight: bold;
  color: #555;
  box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
  transition: 0.3s;
  background-color: rgb(248, 249, 250);
}
.security-sections a {
	text-align: center;
	padding: 20px 15px;
	font-size: 18px;
	font-weight: bold;
	color: #555;
	box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
	transition: box-shadow 0.3s ease;
	background-color: rgb(248, 249, 250);
    border-radius: 15px;
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
}
.security-sections a *,
.security-sections .product-name,
.security-sections .product-edition,
.security-sections .product-edition span,
.security-sections a span,
.security-sections a::before,
.security-sections a::after,
.security-sections a *::before,
.security-sections a *::after {
	transition: none !important;
}

.product-name {
	margin-top: 8px;
	margin-bottom: 4px;
	background: none !important;
	box-shadow: none !important;
	border: none !important;
	padding: 0 !important;
	transition: none !important;
}

.product-edition {
	margin-bottom: 4px;
	white-space: nowrap;
	background: none !important;
	box-shadow: none !important;
	border: none !important;
	padding: 0 !important;
	transition: none !important;
}
.security-sections a:hover {
	color: #0095d5 !important;
	box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);
}
.security-sections a:hover *,
.security-sections a:hover span,
.security-sections a:hover .product-edition span,
.security-sections a:hover::before,
.security-sections a:hover::after,
.security-sections a:hover *::before,
.security-sections a:hover *::after {
	color: #0095d5 !important;
}
.security-sections a:visited {
	color: #555 !important;
}
.security-sections a:visited *,
.security-sections a:visited span,
.security-sections a:visited .product-edition span,
.security-sections a:visited::before,
.security-sections a:visited::after,
.security-sections a:visited *::before,
.security-sections a:visited *::after {
	color: #555 !important;
}
.security-sections a:visited:hover {
	color: #0095d5 !important;
}
.security-sections a:visited:hover *,
.security-sections a:visited:hover span,
.security-sections a:visited:hover .product-edition span,
.security-sections a:visited:hover::before,
.security-sections a:visited:hover::after,
.security-sections a:visited:hover *::before,
.security-sections a:visited:hover *::after {
	color: #0095d5 !important;
}
.security-sections a img {
	width: 50px;
	height: 50px;
	padding-bottom: 5px;
}
.section-sup {
	display: inline-block;
	font-size: 40%;
	vertical-align: super;
	margin-left: 2px;
	margin-right: 2px;
	line-height: normal;
}

/* Security-specific table container */
.tablecontainer {
	max-height: 40rem;
	overflow: auto;
	margin-top: 1rem;
	border: 1px solid #ddd;
}

/* Ensure table and its contents span full width */
.tablecontainer table,
.tablecontainer .truetable,
#securityTable {
	width: 100% !important;
	max-width: none !important;
}
.tablecontainer thead,
.tablecontainer tbody,
.tablecontainer tr {
	width: 100% !important;
	max-width: none !important;
}

/* Ensure table controls row spans full container width */
.table-controls {
	width: 100% !important;
	max-width: none !important;
}

/* Expand rows for Data Table */
.expanded-row {
  display: none;
}
.expanded-row.show {
  display: table-row;
}
.cve_expand {
	cursor: default;
}
.expanded-content-left {
	float: left;
	width: 25%;
	margin-left: 5%;
}
.expanded-content-right {
}

/* Style Advisory Details section */
.advisory-details {
	display: none;
	margin-top: 1rem;
	margin-bottom: 1rem;
	background-color: #F8F9FA;
	border: solid 2px gray;
	padding: .5rem 1rem;
}
.detailspacing {
	margin-bottom: .75rem;
}
.selected-row {
	background-color: #e0e7eb!important;
}

/* Style Response Impact Colors */
.crit-impact {
	color: #cc0000;
}
.med-impact {
	color: #cccc00;
}
.low-impact {
	color: #009933;
}

/* Security Checkbox Style */
.securitycheckbox input[type=checkbox] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #0095D5;
  border-radius: 3px;
  outline: none;
  transition: background-color 0.1s ease-in-out;
  cursor: pointer;
  position: relative;
  margin-right: 5px;
  vertical-align: middle;
}
.securitycheckbox input[type=checkbox]:before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background-color: #0095D5;
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.1s ease-in-out;
}
.securitycheckbox input[type=checkbox]:checked:before {
  opacity: 1;
}
.securitycheckbox input[type=checkbox]:focus {
  outline: none;
  box-shadow: 0 0 3px rgba(0, 149, 213, 0.5);
}

#SBOMdownloadButton {
	display: none;
}

/* Force light mode styling for gdoc-expand elements */
.gdoc-expand {
	background: white !important;
}
.gdoc-expand__head {
	background: rgb(248, 249, 250) !important;
	color: rgb(52, 58, 64) !important;
}
.gdoc-markdown--nested .gdoc-expand__content {
	background: white !important;
	color: rgb(52, 58, 64) !important;
}
.gdoc-expand__content {
	background: white !important;
	color: rgb(52, 58, 64) !important;
}
.gdoc-expand__content p {
	color: rgb(52, 58, 64) !important;
	background: white !important;
}
.gdoc-expand__content b {
	color: rgb(52, 58, 64) !important;
	background: white !important;
}
.gdoc-expand__content * {
	color: rgb(52, 58, 64) !important;
	background: white !important;
}

/* Force light mode for CVE search input and button */
#urlInput {
	background: white !important;
	color: rgb(52, 58, 64) !important;
	border: 1px solid #ddd !important;
}
#urlInput + button,
button[onclick="redirectToUrl()"] {
	background: #0095D5 !important;
	color: white !important;
	border: 1px solid #0095D5 !important;
}

/* Ensure footer spans full width at all viewport sizes */
.gdoc-footer {
	max-width: none !important;
	width: 100% !important;
}
.gdoc-footer .container {
	max-width: none !important;
	width: 100% !important;
}

/* Sortable Data Table specific styles */
#searchBox {
	padding: 8px;
	width: 100%;
	box-sizing: border-box;
	border: 1px solid #ddd;
	margin-bottom: 12px;
}
.asc:after {
	content: "▲";
}
.desc:after {
	content: "▼";
}

/* Disable Dark Mode for Security Site - Force Light Mode Colors */
/* This overrides the shared CSS to ensure security site always uses light mode styling */
@media(prefers-color-scheme: dark){
	:root{
		--header-background: rgb(65, 134, 201);
		--header-font-color: rgb(255, 255, 255);
		--body-background: white;
		--body-font-color: rgb(52, 58, 64);
		--mark-color: rgb(255, 171, 0);
		--button-background: #498bcb;
		--button-border-color: rgb(65, 134, 201);
		--link-color: rgb(10, 83, 154);
		--link-color-visited: rgb(119, 73, 191);
		--hint-link-color: rgb(10, 83, 154);
		--hint-link-color-visited: rgb(119, 73, 191);
		--accent-color-dark: rgb(206, 212, 218);
		--accent-color: rgb(233, 236, 239);
		--accent-color-lite: rgb(248, 249, 250);
		--control-icons: #b2bac1;
		--footer-background: rgb(47, 51, 62);
		--footer-font-color: rgb(255, 255, 255);
		--footer-link-color: rgb(255, 163, 30);
		--footer-link-color-visited: rgb(255, 163, 30);
		--code-background: rgb(248, 249, 250);
		--code-accent-color: #e6eaed;
		--code-accent-color-lite: #f2f4f6;
		--code-font-color: rgb(70, 70, 70);
		--code-copy-background: rgb(248, 249, 250);
		--code-copy-font-color: #6b7784;
		--code-copy-border-color: #adb4bc;
		--code-copy-success-color: rgb(0, 200, 83);
	}
}
/* End Security Site Dark Mode Disable */