/*
 * Quick actions block. Loaded only on pages that use it. 2 x 2 on phones,
 * all tiles in a row from 900px. Source: the builder's ".quick-f" CSS (look F)
 * and "LOOK C quick actions: block layout, Clinic Grade skin".
 *
 * --quick-cols (set inline by the template) = how many tiles there are.
 * A custom quick actions background colour (Look and feel → Section colours)
 * arrives as body.has-qa-bg with --qa-bg.
 */

.quick { padding: 22px 0 6px; }

/* Directly after a fade or video hero there is a little more room. */
.hero--fade + .quick,
.hero--video + .quick { padding-top: 28px; }

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

/* Three tiles on a phone: the last one spans the full width. */
.quick__tile:last-child:nth-child(odd) { grid-column: 1 / -1; }

.quick__tile {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 16px;
	color: var(--ink);
	font-size: 15px;
	font-weight: var(--wq, 700);
	line-height: 1.2;
	text-decoration: none;
}

.quick__tile:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.quick__icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; }
.quick__icon .ico { width: 22px; height: 22px; }

.quick__text { display: block; }
.quick__text small { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; font-weight: 400; }

/* ---------- Look F: pastel rounded tiles ---------- */

.look-f .quick__tile { border-radius: 22px; background: color-mix(in srgb, var(--accent) 22%, var(--surface)); }
.look-f .quick__tile:nth-child(2) { background: color-mix(in srgb, var(--accent-2) 26%, var(--surface)); }
.look-f .quick__tile:nth-child(3) { background: color-mix(in srgb, var(--sun) 55%, var(--surface)); }
.look-f .quick__tile:nth-child(4) { background: color-mix(in srgb, var(--brand) 14%, var(--surface)); }

.look-f .quick__icon { border-radius: 50%; background: var(--surface); color: var(--brand-text, var(--brand)); }

/* ---------- Look C: one joined, outlined panel with hairline dividers ---------- */

.look-c .quick__grid {
	gap: 1px;
	overflow: hidden;
	background: var(--line);
	border: 1px solid var(--line);
	border-radius: var(--card-r);
	box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 6%, transparent);
}

.look-c .quick__tile {
	position: relative;
	gap: 10px;
	padding: 16px 34px 16px 16px;
	background: var(--surface);
	font-weight: var(--wq, 650);
	transition: background-color 0.15s;
}

/* The chevron on each tile. */
.look-c .quick__tile::after {
	content: "";
	position: absolute;
	top: 20px;
	right: 16px;
	width: 7px;
	height: 7px;
	border-top: 2px solid var(--muted);
	border-right: 2px solid var(--muted);
	transform: rotate(45deg);
	transition: transform 0.15s, border-color 0.15s;
}

.look-c .quick__tile:hover { background: color-mix(in srgb, var(--brand) 4%, var(--surface)); }
.look-c .quick__tile:hover::after { border-color: var(--brand); transform: translateX(3px) rotate(45deg); }
.look-c .quick__tile:focus-visible { outline-offset: -2px; }

.look-c .quick__icon { border-radius: var(--m-r); background: color-mix(in srgb, var(--brand) 9%, var(--surface)); color: var(--brand-text, var(--brand)); }
.look-c .quick__tile--alert .quick__icon { background: color-mix(in srgb, var(--accent-2) 12%, var(--surface)); color: var(--accent-2); }

/* Alert tile in look F: a stronger tint (its pastel accent-2 is too light as a colour on its own). */
.look-f .quick__tile.quick__tile--alert { background: color-mix(in srgb, var(--accent-2) 40%, var(--surface)); }

/* ---------- A custom quick actions background colour ---------- */

body.has-qa-bg .quick { background: var(--qa-bg); padding-bottom: 30px; }

/* ---------- Desktop ---------- */

@media (min-width: 900px) {
	.quick { padding: 36px 0 12px; }
	.hero--fade + .quick,
	.hero--video + .quick { padding-top: 48px; }
	.look-c .quick { padding-top: 32px; }

	.quick__grid { grid-template-columns: repeat(var(--quick-cols, 4), 1fr); gap: 16px; }
	.quick__tile:last-child:nth-child(odd) { grid-column: auto; }
	.quick__tile { padding: 20px; min-height: 130px; }

	.look-c .quick__grid { gap: 1px; }
	.look-c .quick__tile { min-height: 0; padding: 22px 40px 22px 22px; font-size: 16px; }
	.look-c .quick__tile::after { top: 28px; right: 22px; }

	body.has-qa-bg .quick { padding-bottom: 48px; }
}

/* =====================================================================
 * Style of the tiles (set on the block). Each setting adds a class to the
 * section: quick--joined / quick--separate, quick--scheme-*, quick--corners-*,
 * quick--large / quick--squares, quick--attached(-full), quick--icon-*.
 * "Follow the look" adds no class, so nothing below applies.
 * A tile's own colours arrive as classes qt-bg, qt-ink, qt-icon-bg, qt-icon
 * with the variables --qt-bg, --qt-ink, --qt-icon-bg, --qt-icon.
 * ===================================================================== */

/* ---------- Layout: swap the look's own layout ---------- */

/* Look C, but separate tiles. */
.look-c .quick.quick--separate .quick__grid { gap: 10px; overflow: visible; border: 0; border-radius: 0; background: none; box-shadow: none; }
.look-c .quick.quick--separate .quick__tile { border: 1px solid var(--line); border-radius: var(--card-r); }

/* Look F, but one joined panel. */
.look-f .quick.quick--joined .quick__grid { gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--card-r); background: var(--line); }
.look-f .quick.quick--joined .quick__tile { border-radius: 0; background: var(--surface); }

/* ---------- Colour scheme ---------- */

.quick.quick--scheme-plain .quick__tile:nth-child(n) { background: var(--surface); }
.quick.quick--scheme-plain .quick__icon { background: color-mix(in srgb, var(--brand) 9%, var(--surface)); color: var(--brand-text, var(--brand)); }

.quick.quick--scheme-soft .quick__tile:nth-child(n) { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); }
.quick.quick--scheme-soft .quick__tile:nth-child(2) { background: color-mix(in srgb, var(--accent-2) 26%, var(--surface)); }
.quick.quick--scheme-soft .quick__tile:nth-child(3) { background: color-mix(in srgb, var(--sun) 45%, var(--surface)); }
.quick.quick--scheme-soft .quick__tile:nth-child(4) { background: color-mix(in srgb, var(--brand) 14%, var(--surface)); }
.quick.quick--scheme-soft .quick__tile.quick__tile--alert:nth-child(n) { background: color-mix(in srgb, var(--accent-2) 40%, var(--surface)); }
.quick.quick--scheme-soft .quick__icon { background: var(--surface); color: var(--brand-text, var(--brand)); }

/* ---------- Corners ---------- */

.quick.quick--corners-square .quick__grid,
.quick.quick--corners-square .quick__tile { border-radius: 0; }
.quick.quick--corners-square:not([class*="quick--icon-"]) .quick__icon { border-radius: 0; }

.quick.quick--corners-round .quick__grid { border-radius: 22px; }
.quick.quick--corners-round.quick--separate .quick__tile,
.look-f .quick.quick--corners-round:not(.quick--joined) .quick__tile { border-radius: 22px; }

/* ---------- Icon background shape ---------- */

.quick.quick--icon-square .quick__icon { border-radius: var(--m-r, 10px); }
.quick.quick--icon-round .quick__icon { border-radius: 50%; }
.quick.quick--icon-none .quick__icon { width: auto; height: auto; place-items: start; background: transparent; }

/* ---------- Size ---------- */

.quick.quick--large .quick__tile,
.quick.quick--squares .quick__tile { gap: 14px; padding: 22px; font-size: 17px; }
.quick.quick--large .quick__text small,
.quick.quick--squares .quick__text small { font-size: 14px; }
.quick.quick--large .quick__icon:not(:empty),
.quick.quick--squares .quick__icon:not(:empty) { width: 52px; height: 52px; }
.quick.quick--large .quick__icon .ico,
.quick.quick--squares .quick__icon .ico { width: 28px; height: 28px; }
.quick.quick--large.quick--icon-none .quick__icon,
.quick.quick--squares.quick--icon-none .quick__icon { width: auto; height: auto; }

/* Squares: the icon at the top, the words at the bottom. */
.quick.quick--squares .quick__tile { aspect-ratio: 1; justify-content: space-between; min-height: 0; }
.quick.quick--squares .quick__text { font-size: 17px; }

/* ---------- Position: attached to the hero ---------- */
/* No space above and no gap between the tiles (a joined panel keeps its 1px dividers). */

html body .quick.quick--attached,
html body .quick.quick--attached-full { padding-top: 0; }

.quick.quick--attached .quick__grid,
.quick.quick--attached-full .quick__grid { gap: 0; border-top: 0; border-radius: 0; }
.quick.quick--attached .quick__tile,
.quick.quick--attached-full .quick__tile { border-radius: 0; }
.look-c .quick.quick--attached:not(.quick--separate) .quick__grid,
.look-c .quick.quick--attached-full:not(.quick--separate) .quick__grid,
.look-f .quick.quick--attached.quick--joined .quick__grid,
.look-f .quick.quick--attached-full.quick--joined .quick__grid { gap: 1px; }

/* Full width: edge to edge, no page margin. */
.quick.quick--attached-full .quick__wrap { width: 100%; }
.quick.quick--attached-full .quick__grid { border-inline: 0; }

/* ---------- A tile's own colours (these win over everything above) ---------- */

.quick .quick__tile.qt-bg:nth-child(n) { background: var(--qt-bg); }
.quick .quick__tile.qt-bg:hover { filter: brightness(0.96); }

.quick .quick__tile.qt-ink { color: var(--qt-ink); }
.quick .quick__tile.qt-ink .quick__text small { color: var(--qt-ink); opacity: 0.8; }
.quick .quick__tile.qt-ink::after { border-color: var(--qt-ink); }
.quick .quick__tile.qt-ink .quick__icon { background: color-mix(in srgb, var(--qt-ink) 14%, transparent); color: var(--qt-ink); }

.quick .quick__tile.qt-icon-bg .quick__icon { background: var(--qt-icon-bg); }
.quick .quick__tile.qt-icon .quick__icon { color: var(--qt-icon); }

/* ---------- Premium finish: corners, shadow, gradient, arrow button and fonts ---------- */
/* No coloured strips on the tile edges: the finish comes from the tile colour and the look's own button style. */

/* Corners and shadow that match the look's buttons (Look and feel → Buttons). A pill is capped so a tile never turns into a capsule. */
.quick.quick--corners-buttons .quick__grid,
.quick.quick--corners-buttons .quick__tile { border-radius: min(var(--btn-r), 28px); }

.quick.quick--shadow-buttons .quick__tile { box-shadow: var(--btn-shadow); }
body.btn-shadow-hard .quick.quick--shadow-buttons .quick__tile { border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }

/* Gradient: a soft shade across each tile, made from the tile colour. */
.quick.quick--finish-gradient .quick__tile.qt-bg:nth-child(n) {
	background: linear-gradient(160deg, color-mix(in srgb, var(--qt-bg) 78%, #fff) 0%, var(--qt-bg) 55%, color-mix(in srgb, var(--qt-bg) 90%, #000) 100%);
}

/* The arrow: a round button (colours: the arrow settings, else the look's main button), or none. */
.quick.quick--arrow-off .quick__tile::after,
.quick.quick--arrow-button .quick__tile::after,
.quick.quick--arrow-button-line .quick__tile::after { display: none; }

/* The arrow lane sits on the right of the tile: a round button, and (button-line) a thin line to its left. */
.quick.quick--arrow-button .quick__tile,
.quick.quick--arrow-button-line .quick__tile { position: relative; padding-right: 72px; }

.quick__go {
	position: absolute;
	top: 14px;
	right: 0;
	bottom: 14px;
	display: grid;
	place-items: center;
	width: 62px;
}
.quick--arrow-button-line .quick__go { border-left: 1px solid color-mix(in srgb, var(--qt-ink, var(--ink)) 16%, transparent); }

.quick__go-btn {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--qa-go-bg, var(--primary));
	color: var(--qa-go-ink, var(--on-primary));
	transition: transform 0.15s;
}
.quick__go-btn .ico { width: 18px; height: 18px; transform: rotate(-90deg); }
.quick__tile:hover .quick__go-btn { transform: translateX(2px); }

/* Small phones: no line, a slimmer arrow lane, so the text keeps its room and the 2 x 2 tiles stay equal. */
@media (max-width: 599px) {
	.quick__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.quick__tile { min-width: 0; overflow-wrap: anywhere; }
	.quick.quick--arrow-button .quick__tile,
	.quick.quick--arrow-button-line .quick__tile { padding-right: 38px; }
	.quick__go { width: 32px; }
	.quick--arrow-button-line .quick__go { border-left: 0; }
	.quick__go-btn { width: 26px; height: 26px; }
	.quick__go-btn .ico { width: 14px; height: 14px; }
}
/* Fonts already loaded on the site: heading (--fh), body (--fb) or accent/script (--fs, the heading font when there is none). */
.quick.quick--title-heading .quick__text { font-family: var(--fh); font-weight: var(--hw); }
.quick.quick--title-body .quick__text { font-family: var(--fb); }
.quick.quick--title-script .quick__text { font-family: var(--fs, var(--fh)); font-weight: 400; }

.quick[class*="quick--title-"]:not([class*="quick--text-"]) .quick__text small { font-family: var(--fb); font-weight: 400; }
.quick.quick--text-heading .quick__text small { font-family: var(--fh); }
.quick.quick--text-body .quick__text small { font-family: var(--fb); }
.quick.quick--text-script .quick__text small { font-family: var(--fs, var(--fh)); }

/* ---------- Quick styles, space between tiles, borders, raised shadow ---------- */
/* "Separate" tiles are the Separate layout, or look F unless the joined panel was chosen. */

.quick--gap-none { --qgap: 0px; }
.quick--gap-tight { --qgap: 8px; }
.quick--gap-normal { --qgap: 18px; }
.quick--gap-roomy { --qgap: 30px; }

.quick[class*="quick--gap-"]:is(.quick--separate, .look-f .quick:not(.quick--joined)):not(.quick--attached):not(.quick--attached-full) .quick__grid { gap: var(--qgap); }

.quick.quick--border-none:is(.quick--separate, .look-f .quick:not(.quick--joined)) .quick__tile:nth-child(n) { border: 0; }
.quick.quick--border-hairline:is(.quick--separate, .look-f .quick:not(.quick--joined)) .quick__tile:nth-child(n) { border: 1px solid color-mix(in srgb, var(--ink) 11%, transparent); }
.quick.quick--border-tinted:is(.quick--separate, .look-f .quick:not(.quick--joined)) .quick__tile:nth-child(n) { border: 1px solid color-mix(in srgb, var(--qt-bg, var(--brand)) 40%, #fff); }

/* Raised (3D): a white inner highlight along the top edge and a soft layered shadow. */
.quick.quick--shadow-3d .quick__tile {
	box-shadow:
		inset 0 1px 0 rgb(255 255 255 / 0.85),
		0 1px 2px color-mix(in srgb, var(--ink) 12%, transparent),
		0 16px 28px -16px color-mix(in srgb, var(--ink) 40%, transparent);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}
body:not(.hov-card-none) .quick.quick--shadow-3d .quick__tile:hover {
	transform: translateY(-3px);
	box-shadow:
		inset 0 1px 0 rgb(255 255 255 / 0.85),
		0 2px 4px color-mix(in srgb, var(--ink) 14%, transparent),
		0 24px 36px -18px color-mix(in srgb, var(--ink) 45%, transparent);
}
@media (prefers-reduced-motion: reduce) {
	body:not(.hov-card-none) .quick.quick--shadow-3d .quick__tile:hover { transform: none; }
}

/* ---------- Premium 3D ---------- */
/* Light tiles with a top-to-bottom gradient (the tile colour, a lot lighter at the top), dark text, a round dark icon
   and the arrow lane. No coloured strip on any edge. Every part can still be changed in the settings. */

.quick.quick--preset-premium:not([class*="quick--corners-"]) .quick__tile { border-radius: 18px; }
.quick.quick--preset-premium.quick--finish-gradient .quick__tile.qt-bg:nth-child(n) {
	background: linear-gradient(180deg, color-mix(in srgb, var(--qt-bg) 32%, #fff) 0%, var(--qt-bg) 100%);
}
.quick.quick--preset-premium .quick__tile { gap: 12px; padding-block: 20px; }
.quick.quick--preset-premium .quick__icon { width: 46px; height: 46px; border-radius: 50%; }
.quick.quick--preset-premium .quick__icon .ico { width: 22px; height: 22px; }
.quick.quick--preset-premium .quick__tile:not(.qt-icon-bg) .quick__icon { background: var(--brand); }
.quick.quick--preset-premium .quick__tile:not(.qt-icon) .quick__icon { color: var(--on-brand); }
.quick.quick--preset-premium .quick__text { font-size: 1.05rem; }