/*
 * Shaped Gallery — small helpers for Kadence sections, used through each
 * block's "Additional CSS class" setting. Everything else (colours, sizes,
 * spacing) is set in the Kadence block settings.
 */

/* Pill tabs (Kadence Tabs + class "sg-pill-tabs"): grey track, white active pill. */
.sg-pill-tabs > .kt-tabs-wrap > .kt-tabs-title-list {
	display: flex;
	flex-wrap: nowrap;
	gap: 2px;
	width: fit-content;
	max-width: 100%;
	margin: 0 auto;
	padding: 3px;
	border-radius: 4px;
	background: #f3f4f6;
}

.sg-pill-tabs > .kt-tabs-wrap > .kt-tabs-title-list li {
	margin: 0 !important;
}

.sg-pill-tabs > .kt-tabs-wrap > .kt-tabs-title-list li .kt-tab-title {
	transition: background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.sg-pill-tabs > .kt-tabs-wrap > .kt-tabs-title-list li.kt-tab-title-active .kt-tab-title {
	box-shadow: 0 1px 3px rgba(6, 21, 39, 0.12);
}

.sg-pill-tabs > .kt-tabs-wrap > .kt-tabs-content-wrap {
	overflow: visible;
}

/*
 * Comparison table (Kadence Table + class "sg-compare-table"). Column widths,
 * alignment, row lines and colours are Kadence settings; Kadence has no
 * option for these three:
 * - a rounded outline around the whole table,
 * - a minimum width so the table scrolls sideways on phones,
 * - a background on a single header cell (the "Pro" heading).
 */
.sg-compare-table {
	overflow-x: auto;
	border-radius: 4px;
	box-shadow: inset 0 0 0 1px rgb(229, 231, 235);
}

.sg-compare-table table {
	min-width: 620px;
}

.sg-compare-table tr:first-child > th:last-child {
	background: #e6f4fe;
	color: #0056a1;
}

/* FAQ accordion (Kadence Accordion + class "sg-faq"): the open answer sits above the row line. */
.sg-faq .kt-accordion-pane {
	box-shadow: inset 0 -1px 0 0 rgb(229, 231, 235);
}

/* No focus ring while clicking with a mouse; keyboard focus (:focus-visible) keeps it. */
:where(a, button, [role="button"], [role="tab"], summary, .kt-tab-title, .kt-blocks-accordion-header):focus:not(:focus-visible) {
	outline: none;
}

/* Price format: crossed-out price when the strikethrough option is on. */
.sg-price-tag[data-strike="1"] {
	text-decoration: line-through;
}

/* Link hover: add "sg-link-hover" to any block (Advanced > Additional CSS class)
   and every link inside it turns #0092ec on hover, with a smooth fade.
   Also works when the class is on the link itself. */
.sg-link-hover a,
a.sg-link-hover {
	transition: color 0.2s ease;
}

.sg-link-hover a:hover,
.sg-link-hover a:focus-visible,
a.sg-link-hover:hover,
a.sg-link-hover:focus-visible {
	color: #0092ec;
}

/*
 * Footer newsletter (Fluent Form 2, "Subscription Form"): the inline field
 * error, the server error box and the success message. The button stays
 * level with the field when an error shows under it.
 */
.fluentform_wrapper_2 .ff-t-container {
	align-items: flex-start;
}

.fluentform_wrapper_2 .ff-t-cell.ff-t-column-2 {
	align-self: flex-start;
}

.fluentform_wrapper_2 .ff_submit_btn_wrapper {
	margin-top: 0;
}

.fluentform_wrapper_2 .ff-el-form-control {
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.fluentform_wrapper_2 .ff-el-is-error .ff-el-form-control {
	border-color: #d92d20;
	box-shadow: 0 0 0 3px rgba(217, 45, 32, 0.12);
}

.fluentform_wrapper_2 .ff-el-is-error .text-danger {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 8px;
	color: #b42318;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.4;
}

/* Status icons: a mask, so they take the message colour. */
.fluentform_wrapper_2 .ff-el-is-error .text-danger::before,
.fluentform_wrapper_2 .ff-errors-in-stack .error::before,
.fluentform_wrapper_2 .ff-message-success::before {
	content: "";
	flex: none;
	width: 16px;
	height: 16px;
	background: currentcolor;
	-webkit-mask: var(--sg-ff-icon) center / contain no-repeat;
	mask: var(--sg-ff-icon) center / contain no-repeat;
}

.fluentform_wrapper_2 .ff-el-is-error .text-danger::before,
.fluentform_wrapper_2 .ff-errors-in-stack .error::before {
	--sg-ff-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm0 5a1 1 0 0 1 1 1v5a1 1 0 1 1-2 0V8a1 1 0 0 1 1-1Zm0 8.5a1.25 1.25 0 1 1 0 2.5 1.25 1.25 0 0 1 0-2.5Z'/%3E%3C/svg%3E");
}

/* Errors sent back by the server (e.g. a duplicate or blocked email). */
.fluentform_wrapper_2 .ff-errors-in-stack {
	margin-top: 0;
}

.fluentform_wrapper_2 .ff-errors-in-stack .error {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 0;
	padding: 10px 12px;
	border: 1px solid #fecdca;
	border-radius: 8px;
	background: #fef3f2;
	color: #b42318;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.5;
}

.fluentform_wrapper_2 .ff-errors-in-stack .error::before {
	margin-top: 1px;
}

.fluentform_wrapper_2 .ff-errors-in-stack .error-clear {
	display: none;
}

.fluentform_wrapper_2 .ff-message-success {
	--sg-ff-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm4.7 7.7-5.5 5.5a1 1 0 0 1-1.4 0l-2.5-2.5a1 1 0 1 1 1.4-1.4l1.8 1.8 4.8-4.8a1 1 0 1 1 1.4 1.4Z'/%3E%3C/svg%3E");
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0;
	padding: 12px 14px;
	border: 1px solid #abefc6;
	border-radius: 8px;
	background: #ecfdf3;
	box-shadow: none;
	color: #067647;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.5;
}

.fluentform_wrapper_2 .ff-message-success::before {
	width: 18px;
	height: 18px;
	margin-top: 1px;
}

.fluentform_wrapper_2 .ff-message-success p {
	margin: 0;
	color: inherit;
	font-size: inherit;
	line-height: inherit;
}

/*
 * Contact form card (Kadence Column + class "sg-contact-form", holding a
 * Fluent Form): labels, fields, the select arrow and the submit button. A
 * Fluent "Custom HTML" field placed right before the submit button (the
 * "* Required fields" note) shares its row.
 */
/* Fluent Forms' own variables, so its stylesheet agrees with the card. */
.sg-contact-form .fluentform {
	--fluentform-primary: #0092ec;
	--fluentform-border-color: #e5e9ef;
	--fluentform-border-radius: 6px;
	--fluentform-input-select-height: 48px;
}

.sg-contact-form .fluentform fieldset {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0 16px;
}

.sg-contact-form .fluentform fieldset > * {
	flex: 1 1 100%;
}

.sg-contact-form .fluentform .ff-t-container {
	display: flex;
	align-items: flex-start;
	gap: 20px;
}

.sg-contact-form .fluentform .ff-t-cell {
	flex: 1 1 0;
	min-width: 0;
	padding: 0;
}

.sg-contact-form .fluentform .ff-el-group {
	margin: 0 0 22px;
}

.sg-contact-form .fluentform .ff-el-input--label {
	margin: 0 0 8px;
}

.sg-contact-form .fluentform .ff-el-input--label label {
	margin: 0;
	color: var(--sg-heading, #0a223c);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
}

.sg-contact-form .fluentform .ff-el-is-required.asterisk-right label::after {
	content: " *";
	margin-left: 2px;
	color: #e5484d;
}

.sg-contact-form .fluentform .ff-el-form-control {
	box-sizing: border-box;
	width: 100%;
	height: 48px;
	margin: 0;
	padding: 0 14px;
	border: 1px solid #e5e9ef;
	border-radius: 6px;
	background-color: #fff;
	box-shadow: none;
	color: var(--sg-heading, #0a223c);
	font-size: 15px;
	line-height: 1.4;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sg-contact-form .fluentform textarea.ff-el-form-control {
	height: auto;
	min-height: 160px;
	padding: 13px 14px;
	resize: vertical;
}

.sg-contact-form .fluentform select.ff-el-form-control {
	padding-right: 40px;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236a7282' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-position: right 16px center;
	background-repeat: no-repeat;
	cursor: pointer;
}

.sg-contact-form .fluentform .ff-el-form-control::placeholder {
	color: #8a94a3;
	opacity: 1;
}

.sg-contact-form .fluentform .ff-el-form-control:focus {
	border-color: var(--sg-primary, #0092ec);
	outline: 0;
	box-shadow: 0 0 0 3px rgba(0, 146, 236, 0.14);
}

/* Validation messages and the error state. */
.sg-contact-form .fluentform .ff-el-is-error .ff-el-form-control {
	border-color: #e5484d;
}

.sg-contact-form .fluentform .ff-el-is-error .text-danger {
	margin-top: 6px;
	color: #e5484d;
	font-size: 13px;
	line-height: 1.4;
}

/* The note before the button: "* Required fields". */
.sg-contact-form .fluentform .ff-custom_html:has(+ .ff_submit_btn_wrapper) {
	flex: 1 1 auto;
	margin: 0;
	color: var(--sg-caption, #6a7282);
	font-size: 14px;
}

.sg-contact-form .fluentform .ff-custom_html p {
	margin: 0;
}

.sg-contact-form .fluentform .ff-custom_html .sg-req {
	color: #e5484d;
}

.sg-contact-form .fluentform .ff_submit_btn_wrapper {
	flex: 0 0 auto;
	margin: 0;
}

.sg-contact-form .fluentform .ff-btn-submit {
	height: 48px;
	padding: 0 26px;
	border: 0;
	border-radius: 6px;
	background-color: var(--sg-primary, #0092ec);
	box-shadow: 0 10px 22px -10px rgba(0, 146, 236, 0.7);
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.sg-contact-form .fluentform .ff-btn-submit:hover,
.sg-contact-form .fluentform .ff-btn-submit:focus-visible {
	background-color: var(--sg-primary-dark, #0056a1);
	opacity: 1;
}

@media (max-width: 640px) {
	.sg-contact-form .fluentform .ff-t-container {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	.sg-contact-form .fluentform .ff-custom_html:has(+ .ff_submit_btn_wrapper) {
		flex-basis: 100%;
		margin: 0 0 16px;
	}

	.sg-contact-form .fluentform .ff_submit_btn_wrapper,
	.sg-contact-form .fluentform .ff-btn-submit {
		width: 100%;
	}
}

/* FOMO notification card (Shapedplugin FOMO plugin): its grey text is 4.3:1 on
   white; the caption grey reaches 4.5:1 (accessibility). */
.sp-fomo-notifications .notification-card .purchaser-name span,
.sp-fomo-notifications .notification-card .purchaser,
.sp-fomo-notifications .notification-card .country i,
.sp-fomo-notifications .notification-card .purchase-time {
	color: var(--sg-caption, #6a7282);
}

/* Blog cards ("custom css" snippet): the author and date grey is 2.5:1 on
   white; this one reaches 4.5:1 (accessibility). `body` outranks the snippet. */
body .sp-shaped-gallery-post .wp-block-post-author-name,
body .sp-shaped-gallery-post .wp-block-post-date {
	color: #727780;
}

/* Blog cards: the snippet draws the card outline as an inset box-shadow,
   which the featured image covers. The same outline is redrawn above it. */
body .sp-shaped-gallery-post .wp-block-post > .wp-block-group {
	position: relative;
}

body .sp-shaped-gallery-post .wp-block-post > .wp-block-group::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: inherit;
	box-shadow: inset 0 0 0 1px #e8e8ed;
	pointer-events: none;
	transition: box-shadow 0.2s;
}

body .sp-shaped-gallery-post .wp-block-post > .wp-block-group:hover::after {
	box-shadow: inset 0 0 0 1px #c7d2fe;
}

/* Status line with a green dot (Kadence Advanced Text + class "sg-status-dot"), e.g. "Support team available". */
.sg-status-dot {
	display: flex;
	align-items: center;
	gap: 8px;
}

.sg-status-dot::before {
	content: "";
	flex: none;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #22c55e;
	box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.16);
}

/* Ask AI block: hover accent = the site's link blue;
   48px above the footer row on desktop. */
body .spaiv-ask-ai {
	--spaiv-accent: var(--sg-primary-dark, #0056a1);
}

@media (min-width: 1025px) {

	.kt-inside-inner-col > .spaiv-ask-ai.is-footer {
		margin-top: 48px;
	}
}
