/* ==========================================================================
   Toolkit feedback - the strip under a tool and its dialog

   From "Mindship_Compress_PDF_Feedback_Updated.html", with every selector
   scoped to .tkfb so it can sit under any tool, in the account or on the
   public pages, without reaching either's styles. It defines its own colours
   rather than borrowing a page's variables, because the pages it sits on
   do not share any.
   ========================================================================== */

/* The variables are on both: the dialog is moved to <body>, out from under .tkfb. */
.tkfb,
.tkfb-backdrop {
	--fb-navy: #0b2d5b;
	--fb-teal: #07857d;
	--fb-line: #cfe0e9;
}

.tk-feedback-holder { grid-column: 1 / -1; }

.tkfb {
	margin: 16px 0 0;
	font-family: inherit;
	font-size: 14px;
	line-height: 1.5;
	color: #173554;
}

.tkfb *,
.tkfb *::before,
.tkfb *::after { box-sizing: border-box; }

.tkfb svg { display: block; flex: none; }

.tkfb button { font: inherit; cursor: pointer; }

.tkfb-strip {
	border: 1px solid var(--fb-line);
	background: linear-gradient(115deg, #fff 0%, #f6fbfc 100%);
	border-radius: 15px;
	box-shadow: 0 8px 26px rgba(15, 47, 83, .055);
	padding: 18px 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
}

.tkfb-lead { display: flex; align-items: center; gap: 13px; min-width: 0; }

.tkfb-icon {
	width: 44px;
	height: 44px;
	flex: none;
	display: grid;
	place-items: center;
	border-radius: 12px;
	background: #e2f5f1;
	color: #067d77;
}

.tkfb-icon svg { height: 23px; width: 23px; }

.tkfb-strip h2 { margin: 0 0 5px; color: var(--fb-navy); font-size: 16px; line-height: 1.3; letter-spacing: -.15px; }

.tkfb-strip p { margin: 0; color: #5a748a; font-size: 12px; line-height: 1.5; max-width: 650px; }

.tkfb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	min-height: 42px;
	padding: 10px 16px;
	border: 1px solid #cbdfe7;
	border-radius: 10px;
	background: #fff;
	color: #1c4a63;
	font-weight: 750;
	font-size: 13px;
	line-height: 1.2;
	text-decoration: none;
}

.tkfb-btn:hover { background: #f1f8fa; border-color: #a9cbd6; }

.tkfb-btn svg { height: 17px; width: 17px; }

.tkfb-btn--cta,
.tkfb-btn--primary {
	border-color: var(--fb-teal);
	background: var(--fb-teal);
	color: #fff;
}

.tkfb-btn--cta:hover,
.tkfb-btn--primary:hover { background: #066f69; border-color: #066f69; }

.tkfb-btn--cta { flex: none; min-height: 44px; }

.tkfb-btn:disabled { opacity: .55; cursor: not-allowed; }

.tkfb button:focus-visible,
.tkfb-backdrop button:focus-visible,
.tkfb-backdrop input:focus-visible,
.tkfb-backdrop textarea:focus-visible { outline: 3px solid #70c6d8; outline-offset: 2px; }

/* The dialog. Moved to <body> by the script so a transformed ancestor cannot trap it. */
.tkfb-backdrop {
	position: fixed;
	inset: 0;
	z-index: 100010;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 18px;
	background: rgba(8, 28, 52, .6);
	font-family: inherit;
	font-size: 14px;
	line-height: 1.5;
	color: #173554;
}

.tkfb-backdrop *,
.tkfb-backdrop *::before,
.tkfb-backdrop *::after { box-sizing: border-box; }

.tkfb-backdrop.is-open { display: flex; }

.tkfb-backdrop svg { display: block; flex: none; }

.tkfb-backdrop button { font: inherit; cursor: pointer; }

.tkfb-dialog {
	width: min(525px, 100%);
	max-height: min(94vh, 740px);
	overflow-y: auto;
	background: #fff;
	border-radius: 17px;
	box-shadow: 0 22px 80px rgba(10, 36, 63, .27);
	border: 1px solid #d6e4ea;
}

.tkfb-head {
	padding: 21px 24px 17px;
	border-bottom: 1px solid #e5eef2;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
}

.tkfb-eyebrow { font-size: 10px; text-transform: uppercase; letter-spacing: .85px; font-weight: 850; color: #07857d; margin: 0 0 5px; }

.tkfb-head h2 { font-size: 21px; line-height: 1.2; letter-spacing: -.35px; color: var(--fb-navy); margin: 0 0 6px; }

.tkfb-head p { font-size: 12px; color: #5f7789; line-height: 1.48; margin: 0; }

.tkfb-close {
	width: 32px;
	height: 32px;
	display: grid;
	place-items: center;
	border: 0;
	border-radius: 9px;
	background: #f0f5f8;
	color: #38637b;
	flex: none;
	font-size: 23px;
	line-height: 1;
}

.tkfb-close:hover { background: #e2eff2; }

.tkfb-body { padding: 20px 24px 23px; }

.tkfb-context {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	align-items: center;
	border-radius: 9px;
	padding: 10px 12px;
	margin-bottom: 17px;
	background: #f3f8fa;
	color: #5f7789;
	font-size: 11px;
}

.tkfb-context b { color: #0b2d5b; }

.tkfb-kinds { border: 0; margin: 0; padding: 0; min-width: 0; }

.tkfb-label { font-size: 12px; font-weight: 800; color: #2e536d; display: block; margin: 0 0 8px; padding: 0; }

.tkfb-radios { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-bottom: 17px; }

.tkfb-choice {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 63px;
	align-items: center;
	justify-content: center;
	text-align: center;
	gap: 5px;
	border: 1px solid #d7e5ec;
	border-radius: 10px;
	cursor: pointer;
	font-size: 11px;
	font-weight: 750;
	line-height: 1.25;
	color: #4d6b80;
	background: #fff;
	padding: 7px;
}

.tkfb-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }

.tkfb-choice svg { height: 16px; width: 16px; }

.tkfb-choice:has(input:checked) { border-color: #07857d; color: #08786e; background: #effaf7; box-shadow: inset 0 0 0 1px #07857d; }

.tkfb-choice:focus-within { outline: 3px solid #70c6d8; outline-offset: 2px; }

.tkfb-field { margin-bottom: 16px; }

.tkfb-field textarea,
.tkfb-field input {
	display: block;
	width: 100%;
	margin: 0;
	font-family: inherit;
	font-size: 13px;
	color: #0b2d5b;
	border: 1px solid #cbdfe7;
	border-radius: 10px;
	background: #fff;
	box-shadow: none;
	padding: 11px 12px;
}

.tkfb-field textarea:focus,
.tkfb-field input:focus { border-color: #07857d; box-shadow: 0 0 0 3px rgba(7, 133, 125, .11); }

.tkfb-field textarea { resize: vertical; min-height: 120px; line-height: 1.5; }

.tkfb-field input { min-height: 44px; }

.tkfb-counter { font-size: 10px; color: #6f8595; margin-top: 5px; text-align: right; }

.tkfb-optional { color: #6f8595; font-weight: 450; }

.tkfb-note { font-size: 11px; color: #5f7789; line-height: 1.5; margin: 2px 0 16px; }

.tkfb-actions { display: flex; justify-content: flex-end; align-items: center; gap: 9px; margin-top: 11px; }

.tkfb-error { min-height: 16px; color: #9b3a1a; font-size: 12px; margin: 7px 0 0; }

.tkfb-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.tkfb-done[hidden] { display: none; }

.tkfb-ready { background: #eff9f6; border: 1px solid #bbe0d7; border-radius: 12px; padding: 17px; margin: 0 0 16px; }

.tkfb-ready b { display: block; font-size: 15px; color: #176b61; margin-bottom: 5px; }

.tkfb-ready p { color: #3f6e66; font-size: 12px; line-height: 1.5; margin: 0; }

@media (max-width: 680px) {
	.tkfb-strip { align-items: stretch; flex-direction: column; gap: 13px; padding: 15px; }
	.tkfb-btn--cta { width: 100%; }
	.tkfb-icon { height: 39px; width: 39px; }
	.tkfb-strip h2 { font-size: 15px; }
	.tkfb-body { padding: 17px; }
	.tkfb-head { padding: 18px 17px; }
	.tkfb-head h2 { font-size: 19px; }
	/* 16px stops iOS Safari zooming the page when the box takes focus. */
	.tkfb-field textarea,
	.tkfb-field input { font-size: 16px; }
}

@media (max-width: 375px) {
	.tkfb-radios { gap: 5px; }
	.tkfb-choice { font-size: 10px; padding: 5px; min-height: 66px; }
	.tkfb-choice svg { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.tkfb * { transition: none !important; }
}
