/*
 * The "content guide" component (template/_public/content-guide.php): the
 * yellow heading styles, the "at a glance" list and the ready-made blocks of
 * its text (service cards, use cases, notice, inline links). The bundle has no
 * rules for these, so this file is printed only on the pages that use the
 * component, see hidata_print_component_styles(). Direction-neutral: logical
 * properties, and the arrows turn round for left-to-right pages at the end.
 */

.content-guide .hl {
	background: linear-gradient(transparent 62%,#FC0 62%,#FC0 92%,transparent 92%);
	padding: 0 2px;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}

.content-guide .cg-h3-underline h3:after {
	content: "";
	display: block;
	width: 2.5rem;
	height: 3px;
	border-radius: 2px;
	background: #FC0;
	margin-top: .45rem;
}

.content-guide .cg-h3-marker h3:before {
	content: "";
	display: inline-block;
	width: 4px;
	height: .85em;
	border-radius: 2px;
	background: #FC0;
	margin-inline-end: .55rem;
	vertical-align: -1px;
}

.content-guide .cg-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #FC0;
	margin-top: 10px;
	flex: none;
}

.content-guide .cg-glance-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: .5rem 2rem;
}

.content-guide .cg-bullet {
	display: flex;
	gap: .75rem;
}

.content-guide .cg-usecases {
	display: grid;
	grid-template-columns: repeat(auto-fit,minmax(min(100%,320px),1fr));
	gap: .5rem 2.5rem;
	margin-bottom: 1rem;
}

/* The use cases are divs in older texts and a list in newer ones. */
.content-guide .cg-usecases>:is(div,li) {
	display: flex;
	gap: .75rem;
}

.content-guide .cg-usecases>:is(div,li):not(.cg-bullet):before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #0247AE;
	margin-top: 10px;
	flex: none;
}

.content-guide .cg-glance-grid {
	padding: 0;
	margin: 0;
}

.content-guide .cg-usecases {
	padding: 0;
	margin-top: 0;
}

/* Numbered in the digits of the language: Persian ones on Persian pages only. */
.content-guide .cg-body ol {
	list-style: decimal;
	padding-inline-start: 1.5rem;
	margin: 0 0 2rem;
}

.content-guide .cg-body ol>li {
	list-style: decimal;
	font-weight: 500;
	text-align: start;
	line-height: 2;
	margin-bottom: .75rem;
}

.content-guide:lang(fa) .cg-body ol,
.content-guide:lang(fa) .cg-body ol>li {
	list-style: persian;
}

.content-guide p:has(+ .cg-usecases) {
	margin-bottom: .5rem!important;
}

.content-guide .cg-inline-link {
	font-weight: 700;
	text-decoration: none;
	border-bottom: 1px dotted #9EBFD7;
}

.content-guide .cg-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit,minmax(min(100%,280px),1fr));
	gap: 1rem;
	margin-bottom: 2rem;
}

.content-guide .cg-card {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	background: #fff;
	border: 1px solid #E1E8EF;
	border-radius: 1.375rem;
	padding: 1rem 1.375rem;
	text-decoration: none;
}

.content-guide .cg-card-title {
	display: block;
	font-size: 1rem;
	font-weight: 700;
	color: #103F63;
	margin-bottom: 2px;
}

.content-guide .cg-card-sub {
	display: block;
	font-size: .875rem;
	color: #557894;
}

.content-guide .cg-card:after {
	content: "";
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 50%;
	flex: none;
	background: #EDF6FD url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='9' viewBox='0 0 11 9'%3E%3Cpath d='M10.5431 3.93966H2.36991L5.33582 0.973754L4.54349 0.181427L0.224915 4.5L4.54349 8.81858L5.33582 8.02625L2.36991 5.06035H10.5431V3.93966Z' fill='%23557894'/%3E%3C/svg%3E") center/10px 9px no-repeat;
	transition: background-color .25s ease;
}

.content-guide .cg-card:hover:after {
	background: #0247AE url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='9' viewBox='0 0 11 9'%3E%3Cpath d='M10.5431 3.93966H2.36991L5.33582 0.973754L4.54349 0.181427L0.224915 4.5L4.54349 8.81858L5.33582 8.02625L2.36991 5.06035H10.5431V3.93966Z' fill='%23fff'/%3E%3C/svg%3E") center/10px 9px no-repeat;
}

.content-guide .cg-notice {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	background: #103F63;
	border-radius: 1.75rem;
	padding: 1.375rem 1.875rem;
	margin-bottom: 2rem;
}

.content-guide .cg-notice p {
	margin: 0!important;
	color: #fff;
}

.content-guide .cg-notice strong {
	color: #FC0;
}

/* Links on the navy box: the blue that the body's builder colour utility
   gives links (text-c-0163A9, a rule as specific as `.cg-notice a` and printed
   after this file) is 1.7:1 there, and so is the blue focus ring. */
.content-guide .cg-notice p a {
	color: #FC0;
	border-bottom-color: currentColor;
}

.content-guide .cg-notice :focus-visible {
	outline-color: #FC0;
}

.content-guide .cg-notice:before {
	content: "";
	width: 3.5rem;
	height: 3.5rem;
	border-radius: 50%;
	flex: none;
	background: #ffffff17 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24'%3E%3Cpath d='M20.995 6.903a.997.997 0 0 0-.547-.797l-7.973-4a.997.997 0 0 0-.895-.002l-8.027 4c-.297.15-.502.437-.544.767-.013.097-1.145 9.741 8.541 15.008a.995.995 0 0 0 .969-.009c9.307-5.259 8.514-14.573 8.476-14.967zm-8.977 12.944c-6.86-4.01-7.14-10.352-7.063-12.205l7.071-3.523 6.998 3.511c.005 1.87-.481 8.243-7.006 12.217z' fill='%23FC0'/%3E%3C/svg%3E") center no-repeat;
}

.content-guide .cg-cta {
	flex-wrap: wrap;
}

/* The title of the call to action never leaves its last word alone on a
   line of its own (a narrow phone). */
.content-guide .cg-cta-title {
	text-wrap: pretty;
}

/*
 * A comparison table (the «جدول مقایسه» block). A wide one scrolls inside its
 * box on a phone, not the page; the box is focusable (tabindex) so that it
 * scrolls from the keyboard too. A hyphen is a place to break a line, so a
 * plan code such as IR-G9-NVMe1 or a CPU name is kept whole only in the first
 * column and inside <bdi> (which also keeps a Latin code in order in Persian
 * text).
 */
.content-guide .cg-table tbody th,
.content-guide .cg-table tbody td:first-child,
.content-guide .cg-body bdi {
	white-space: nowrap;
}

.content-guide .cg-table {
	overflow-x: auto;
	margin: 0 0 2rem;
	border: 1px solid #E1E8EF;
	border-radius: 1rem;
	background: #fff;
}

.content-guide .cg-table table {
	width: 100%;
	border-collapse: collapse;
	font-size: .9rem;
	line-height: 1.8;
}

.content-guide .cg-table th,
.content-guide .cg-table td {
	padding: .75rem 1rem;
	text-align: start;
	vertical-align: top;
	min-width: 6.5rem;
	overflow-wrap: normal;
	border-bottom: 1px solid #E1E8EF;
	color: #2B628C;
	font-weight: 500;
}

.content-guide .cg-table thead th {
	background: #EDF6FD;
	color: #103F63;
	font-weight: 700;
}

.content-guide .cg-table tbody th,
.content-guide .cg-table tbody td:first-child {
	color: #103F63;
	font-weight: 700;
}

.content-guide .cg-table tbody tr:last-child > * {
	border-bottom: 0;
}

/* The guide's text is scaled down on phones; a table's smaller text more so. */
@media (max-width: 991.98px) {
	.content-guide .cg-table table {
		font-size: 1rem;
	}
}

.content-guide .cg-table:focus-visible {
	outline: 2px solid #0247AE;
	outline-offset: 2px;
}

@media (max-width: 767.98px) {
	.content-guide .cg-glance-grid {
		grid-template-columns: 1fr;
	}
}

[dir="ltr"] .content-guide .cg-card:after,
[dir="ltr"] .content-guide .cg-cta .button svg {
	transform: scaleX(-1);
}
