/* TIS Floating Reviews — frontend widget */

.tisfr-root {
	--tisfr-bg: #111827;
	--tisfr-fg: #f0a500;
	--tisfr-accent: #f0a500;
	--tisfr-x: 20px;
	--tisfr-y: 20px;
	--tisfr-my: 16px;
	position: fixed;
	bottom: var(--tisfr-y);
	z-index: 99990;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.5;
	direction: ltr;
}
.tisfr-root *, .tisfr-root *::before, .tisfr-root *::after { box-sizing: border-box; }

/* ---------------------------------------------------------------- */
/* Launcher button                                                   */
/* ---------------------------------------------------------------- */
.tisfr-button {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: var(--tisfr-bg);
	color: #fff;
	border: 0;
	border-radius: 999px;
	padding: 11px 20px 11px 15px;
	cursor: pointer;
	box-shadow: 0 6px 22px rgba(0, 0, 0, .28);
	font-family: inherit;
	font-size: 14px;
	line-height: 1.3;
	transition: transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .18s ease;
	-webkit-tap-highlight-color: transparent;
}
.tisfr-button:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(0,0,0,.34); }
.tisfr-button:active { transform: translateY(-1px); }
.tisfr-button:focus-visible { outline: 3px solid var(--tisfr-accent); outline-offset: 3px; }

.tisfr-button-icon { display: inline-flex; color: var(--tisfr-fg); flex-shrink: 0; }
.tisfr-button-text { display: flex; flex-direction: column; align-items: flex-start; }
.tisfr-button-label { font-weight: 700; letter-spacing: .2px; }
.tisfr-button-rating { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--tisfr-fg); font-weight: 700; margin-top: 1px; }
.tisfr-mini-stars { font-size: 10px; letter-spacing: .5px; }

.tisfr-style-circle .tisfr-button { padding: 15px; }

.tisfr-count {
	position: absolute;
	top: -6px;
	right: -4px;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--tisfr-accent);
	color: #111827;
	font-size: 11px;
	font-weight: 800;
	line-height: 22px;
	text-align: center;
	box-shadow: 0 2px 6px rgba(0,0,0,.25);
}

/* Attention pulse */
.tisfr-pulse .tisfr-button::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: 999px;
	border: 2px solid var(--tisfr-accent);
	animation: tisfrPulse 2.6s ease-out infinite;
	pointer-events: none;
}
@keyframes tisfrPulse {
	0%   { opacity: .75; transform: scale(1); }
	70%  { opacity: 0;   transform: scale(1.28); }
	100% { opacity: 0;   transform: scale(1.28); }
}
.tisfr-root.is-open .tisfr-button::after { display: none; }

/* ---------------------------------------------------------------- */
/* Panel                                                             */
/* ---------------------------------------------------------------- */
.tisfr-panel {
	position: absolute;
	bottom: calc(100% + 14px);
	width: 370px;
	max-width: calc(100vw - 32px);
	max-height: min(560px, calc(100vh - 130px));
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 18px 50px rgba(0, 0, 0, .26);
	overflow: hidden;
	opacity: 0;
	transform: translateY(14px) scale(.96);
	transition: opacity .2s ease, transform .22s cubic-bezier(.34,1.4,.64,1);
	pointer-events: none;
}
.tisfr-panel[hidden] { display: none; }
.tisfr-root.is-open .tisfr-panel { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

.tisfr-panel-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 12px;
	padding: 18px 18px 14px;
	background: var(--tisfr-bg);
	color: #fff;
}
.tisfr-panel-title { margin: 0; font-size: 16px; font-weight: 700; color: #fff; line-height: 1.3; }
.tisfr-panel-sub { margin: 4px 0 0; font-size: 12.5px; color: #cbd5e1; line-height: 1.45; }
.tisfr-close {
	background: rgba(255,255,255,.12);
	border: 0;
	color: #fff;
	width: 30px; height: 30px;
	border-radius: 50%;
	display: inline-flex; align-items: center; justify-content: center;
	cursor: pointer;
	flex-shrink: 0;
	transition: background .15s ease;
}
.tisfr-close:hover { background: rgba(255,255,255,.24); }
.tisfr-close:focus-visible { outline: 2px solid var(--tisfr-accent); outline-offset: 2px; }

/* Summary strip */
.tisfr-summary {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 18px;
	background: #f9fafb;
	border-bottom: 1px solid #e5e7eb;
}
.tisfr-avg { font-size: 30px; font-weight: 800; color: #111827; line-height: 1; }
.tisfr-summary-right { display: flex; flex-direction: column; gap: 2px; }
.tisfr-summary-count { font-size: 12px; color: #6b7280; }

/* Stars */
.tisfr-stars { color: #d1d5db; letter-spacing: 1.5px; font-size: 14px; line-height: 1; }
.tisfr-stars .is-on { color: var(--tisfr-accent); }

/* List */
.tisfr-list {
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 6px 18px;
	flex: 1 1 auto;
	scrollbar-width: thin;
}
.tisfr-list::-webkit-scrollbar { width: 7px; }
.tisfr-list::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }
.tisfr-list:focus-visible { outline: 2px solid var(--tisfr-accent); outline-offset: -2px; }

.tisfr-review { padding: 15px 0; border-bottom: 1px solid #f3f4f6; }
.tisfr-review:last-child { border-bottom: 0; }
.tisfr-review-head { display: flex; gap: 11px; align-items: center; margin-bottom: 7px; }

.tisfr-avatar {
	width: 38px; height: 38px;
	border-radius: 50%;
	background: var(--tisfr-bg);
	color: var(--tisfr-accent);
	display: flex; align-items: center; justify-content: center;
	font-weight: 800; font-size: 15px;
	flex-shrink: 0;
	overflow: hidden;
}
.tisfr-avatar img { width: 100%; height: 100%; object-fit: cover; }

.tisfr-review-who { min-width: 0; }
.tisfr-review-who strong { display: block; font-size: 14px; color: #111827; font-weight: 700; }
.tisfr-review-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 11px; color: #6b7280; margin-top: 1px; }
.tisfr-verified { display: inline-flex; align-items: center; gap: 3px; color: #059669; font-weight: 700; }
.tisfr-jobtype { background: #f3f4f6; border-radius: 4px; padding: 1px 6px; color: #374151; font-weight: 600; }

.tisfr-review-title { margin: 6px 0 3px; font-size: 14px; font-weight: 700; color: #111827; line-height: 1.35; }
.tisfr-review-text { margin: 5px 0 0; font-size: 13.5px; color: #374151; line-height: 1.6; }

/* Actions */
.tisfr-actions {
	display: flex;
	gap: 9px;
	padding: 14px 18px;
	background: #f9fafb;
	border-top: 1px solid #e5e7eb;
}
.tisfr-btn {
	flex: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	padding: 11px 14px;
	border-radius: 9px;
	font-size: 13.5px;
	font-weight: 700;
	text-decoration: none;
	text-align: center;
	transition: filter .14s ease, transform .14s ease;
	border: 1px solid transparent;
}
.tisfr-btn:hover { filter: brightness(.94); transform: translateY(-1px); }
.tisfr-btn-primary { background: var(--tisfr-accent); color: #111827; }
.tisfr-btn-primary:hover { color: #111827; }
.tisfr-btn-wa { background: #25d366; color: #fff; flex: 0 0 auto; padding-inline: 16px; }
.tisfr-btn-wa:hover { color: #fff; }

/* Mobile */
@media (max-width: 480px) {
	.tisfr-root { bottom: var(--tisfr-my); }
	.tisfr-panel {
		width: calc(100vw - 24px);
		max-height: min(74vh, calc(100vh - 110px));
	}
	.tisfr-root.tisfr-bottom-left .tisfr-panel,
	.tisfr-root.tisfr-bottom-right .tisfr-panel { left: 0; right: auto; }
	.tisfr-button-label { font-size: 13px; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
	.tisfr-button, .tisfr-panel, .tisfr-btn { transition: none; }
	.tisfr-pulse .tisfr-button::after { animation: none; }
}

/* Screen reader helper (in case the theme lacks it) */
.tisfr-root .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;
}
