/*
Theme Name: Basework
Theme URI: http://basework.studio
Author: Basework Studio
Author URI: http://basework.studio
Version: 1.3
License: GNU General Public License
License URI: https://www.gnu.org/licenses/gpl.html
Text Domain: basework
Requires at least: 6.2
Requires PHP: 8.0
*/

/*
 * Screen-reader-only text.
 */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/*
 * Offsets the scroll stop so a section opened by anchor (e.g. /services/#consulting)
 * doesn't hide its heading under the fixed header. `id` is only printed when the
 * editor sets `custom_id` in the Advance tab. Match the values to the header height.
 */
section[id] {
	scroll-margin-top: 140px;
}

@media (max-width: 991px) {
	section[id] {
		scroll-margin-top: 100px;
	}
}

/*
 * GF's anchor (`#gf_{id}`): when a non-AJAX form reloads with a validation
 * error, the browser jumps here — without an offset the first field and its
 * error stay under the fixed header.
 */
.gform_anchor {
	scroll-margin-top: 140px;
}

@media (max-width: 991px) {
	.gform_anchor {
		scroll-margin-top: 110px;
	}
}

/*
 * Ask AI: links, Turnstile and privacy note in the chat, plus the cards the
 * assistant adds (project cards, lead form). main.css loads after this file,
 * so every rule is scoped under .ask-ai to win over the comp-18 form styles.
 */
.ask-ai .ask-ai-message a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.ask-ai .ask-ai-turnstile:not(:empty) {
	margin: 8px 12px 12px;
}

.ask-ai .ask-ai-notice {
	margin: 0;
	padding: 0 20px 14px;
	color: rgba(255, 255, 255, 0.5);
	font-size: 12px;
	line-height: 1.4;
}

.ask-ai .ask-ai-notice a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.ask-ai .ask-ai-reset {
	margin-left: 4px;
	padding: 0;
	color: rgba(255, 255, 255, 0.75);
	font: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
	background: none;
	border: 0;
	cursor: pointer;
}

.ask-ai .ask-ai-reset:hover {
	color: #fff;
}

.ask-ai .ask-ai-divider-note {
	align-self: center;
	margin: 0;
	color: rgba(255, 255, 255, 0.4);
	font-size: 12px;
	line-height: 1.4;
}

.ask-ai .ask-ai-messages:has(.ask-ai-card) {
	max-height: min(470px, calc(100vh - 220px));
	max-height: min(470px, calc(100svh - 220px));
}

.ask-ai .ask-ai-suggestions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ask-ai .ask-ai-suggestion {
	padding: 7px 14px;
	color: #85ccff;
	font-size: 13px;
	line-height: 1.4;
	background: transparent;
	border: 1px solid rgba(133, 204, 255, 0.35);
	border-radius: 999px;
	transition: background-color 0.3s ease, border-color 0.3s ease;
}

.ask-ai .ask-ai-suggestion:hover {
	background-color: rgba(133, 204, 255, 0.1);
	border-color: #85ccff;
}

.ask-ai .ask-ai-card {
	width: 100%;
	max-width: 100%;
	padding: 12px;
}

.ask-ai .ask-ai-card p {
	margin: 0;
}

.ask-ai .ask-ai-projects-list {
	display: flex;
	gap: 10px;
	margin: 0;
	padding: 0 0 4px;
	overflow-x: auto;
	list-style: none;
	scroll-snap-type: x mandatory;
	scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
	scrollbar-width: thin;
}

.ask-ai .ask-ai-projects-list > li {
	flex: 0 0 78%;
	scroll-snap-align: start;
}

.ask-ai .ask-ai-projects-list > li:only-child {
	flex-basis: 100%;
}

.ask-ai .ask-ai-card .ask-ai-project {
	display: flex;
	flex-direction: column;
	height: 100%;
	padding-bottom: 12px;
	overflow: hidden;
	color: inherit;
	text-decoration: none;
	background-color: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 10px;
	transition: border-color 0.3s ease;
}

.ask-ai .ask-ai-card .ask-ai-project:hover {
	border-color: rgba(255, 255, 255, 0.2);
}

.ask-ai .ask-ai-project-media {
	display: block;
	aspect-ratio: 16 / 10;
	background-color: rgba(255, 255, 255, 0.05);
}

.ask-ai .ask-ai-project-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ask-ai .ask-ai-project-title {
	display: block;
	padding: 10px 12px 0;
	color: #fff;
	font-size: 14px;
	line-height: 1.4;
}

.ask-ai .ask-ai-project-tags {
	display: block;
	padding: 2px 12px 0;
	color: rgba(255, 255, 255, 0.5);
	font-size: 12px;
	line-height: 1.4;
}

.ask-ai .ask-ai-start {
	margin-top: 12px;
	padding: 14px;
	background-color: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 10px;
}

.ask-ai .ask-ai-card .ask-ai-start-title {
	color: #fff;
	font-size: 14px;
	line-height: 1.4;
}

.ask-ai .ask-ai-card .ask-ai-start-text {
	margin: 2px 0 12px;
	color: rgba(255, 255, 255, 0.55);
	font-size: 13px;
	line-height: 1.4;
}

.ask-ai .ask-ai-card .ask-ai-meeting-title {
	color: #fff;
	font-size: 14px;
	line-height: 1.4;
}

.ask-ai .ask-ai-card .ask-ai-meeting-text,
.ask-ai .ask-ai-card .ask-ai-meeting-address {
	margin-top: 2px;
	color: rgba(255, 255, 255, 0.55);
	font-size: 13px;
	line-height: 1.45;
}

.ask-ai .ask-ai-card .ask-ai-meeting-address {
	margin-top: 8px;
}

.ask-ai .ask-ai-meeting-button {
	margin-top: 12px;
}

.ask-ai .ask-ai-lead-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.ask-ai .ask-ai-card .ask-ai-lead-intro {
	color: rgba(255, 255, 255, 0.9);
	font-size: 14px;
	line-height: 1.55;
}

.ask-ai .ask-ai-lead .comp-18-fields {
	gap: 10px;
}

.ask-ai .ask-ai-lead .comp-18-field {
	flex: none;
	flex-direction: column-reverse;
	gap: 5px;
}

.ask-ai .ask-ai-lead .comp-18-label,
.ask-ai .ask-ai-lead .comp-18-input:not(:placeholder-shown) ~ .comp-18-label,
.ask-ai .ask-ai-lead .comp-18-legend {
	position: static;
	float: none;
	margin: 0;
	padding: 0;
	color: rgba(255, 255, 255, 0.6);
	font-size: 12px;
	line-height: 1.3;
	opacity: 1;
	pointer-events: auto;
}

.ask-ai .ask-ai-lead .comp-18-legend {
	margin-bottom: 6px;
}

.ask-ai .ask-ai-lead .comp-18-input {
	height: 38px;
	padding: 0 12px;
	color: rgba(255, 255, 255, 0.9);
	font-size: 13px;
	background-color: rgba(255, 255, 255, 0.03);
	border-color: rgba(255, 255, 255, 0.1);
	border-radius: 8px;
}

.ask-ai .ask-ai-lead .comp-18-input::placeholder {
	color: rgba(255, 255, 255, 0.35);
}

.ask-ai .ask-ai-lead .comp-18-input:hover {
	border-color: rgba(255, 255, 255, 0.2);
}

.ask-ai .ask-ai-lead .comp-18-input:focus {
	background-color: rgba(255, 255, 255, 0.05);
	border-color: #85ccff;
}

.ask-ai .ask-ai-lead .comp-18-textarea {
	height: auto;
	min-height: 76px;
	padding: 9px 12px;
	line-height: 1.5;
}

.ask-ai .ask-ai-lead .comp-18-chips {
	flex-wrap: nowrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ask-ai .ask-ai-lead .comp-18-chips > li {
	flex: 1 1 0;
}

.ask-ai .ask-ai-lead .comp-18-chip-label {
	padding: 7px 4px;
	color: rgba(255, 255, 255, 0.7);
	font-size: 12px;
	line-height: 1.3;
	text-align: center;
	background-color: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 8px;
}

.ask-ai .ask-ai-lead .comp-18-chip:hover .comp-18-chip-label {
	background-color: rgba(255, 255, 255, 0.06);
}

.ask-ai .ask-ai-lead .comp-18-chip input:checked + .comp-18-chip-label {
	color: #85ccff;
	background-color: rgba(133, 204, 255, 0.12);
	border-color: #85ccff;
}

.ask-ai .ask-ai-lead .ask-ai-lead-submit {
	width: 100%;
}

.ask-ai .ask-ai-card .ask-ai-lead-error {
	color: #ff8a8a;
	font-size: 12px;
	line-height: 1.4;
}

.ask-ai .ask-ai-card .ask-ai-lead-privacy {
	color: rgba(255, 255, 255, 0.4);
	font-size: 11px;
	line-height: 1.4;
	text-align: center;
}

.ask-ai .ask-ai-card .ask-ai-lead-sent {
	color: rgba(255, 255, 255, 0.9);
	font-size: 14px;
	line-height: 1.55;
}

/* Booking calendar opened from the chat's meeting card. */
.bw-meeting-open {
	overflow: hidden;
}

.bw-meeting {
	position: fixed;
	z-index: 100;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background-color: rgba(0, 0, 0, 0.6);
	animation: bw-meeting-in 0.3s ease both;
}

.bw-meeting-box {
	position: relative;
	width: min(960px, 100%);
	height: min(760px, 100%);
	overflow: hidden;
	background-color: #fff;
	border-radius: 12px;
	box-shadow: 0 28px 70px -24px rgba(0, 0, 0, 0.6);
}

.bw-meeting-frame {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

.bw-meeting-close {
	position: absolute;
	top: 10px;
	right: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	color: #1d1d1d;
	background-color: #fff;
	border: 1px solid rgba(29, 29, 29, 0.1);
	border-radius: 8px;
	cursor: pointer;
}

@media (max-width: 767px) {
	.bw-meeting {
		padding: 0;
	}

	.bw-meeting-box {
		width: 100%;
		height: 100%;
		border-radius: 0;
	}
}

@keyframes bw-meeting-in {
	from {
		opacity: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bw-meeting {
		animation: none;
	}
}
