/* SKN Transit floating chat widget — sitewide. Matches main.css tokens. */
.skn-chat {
	position: fixed;
	right: 18px;
	bottom: 18px;
	z-index: 9999;
	font-family: 'Inter', system-ui, -apple-system, sans-serif;
	color: var(--skn-text, #0F172A);
}

/* The HTML5 [hidden] attribute is implemented as `[hidden]{display:none}`
   in the user-agent stylesheet. Any author CSS with an explicit `display:`
   value (display:flex on .skn-chat__panel and .skn-chat__survey-shade)
   wins by specificity, leaving "hidden" elements visible. Force it. */
.skn-chat [hidden],
.skn-chat__panel[hidden],
.skn-chat__survey-shade[hidden] { display: none !important; }

.skn-chat__bubble {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--skn-primary, #2563EB);
	color: #fff;
	border: none;
	cursor: pointer;
	border-radius: 50%;
	width: 58px;
	height: 58px;
	padding: 0;
	box-shadow: 0 14px 28px -10px rgba(37, 99, 235, 0.55), 0 4px 10px -4px rgba(15, 23, 42, 0.25);
	transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.15s ease;
}
.skn-chat__bubble:hover {
	background: var(--skn-primary-dark, #1D4ED8);
	transform: translateY(-2px) scale(1.04);
	box-shadow: 0 18px 36px -10px rgba(37, 99, 235, 0.7), 0 6px 14px -4px rgba(15, 23, 42, 0.3);
}
.skn-chat__bubble:active { transform: translateY(0) scale(1); }
.skn-chat__bubble-icon { width: 26px; height: 26px; flex-shrink: 0; }
.skn-chat__bubble-icon--open { display: none; width: 22px; height: 22px; }
.skn-chat.is-open .skn-chat__bubble-icon--closed { display: none; }
.skn-chat.is-open .skn-chat__bubble-icon--open { display: block; }

.skn-chat__panel {
	position: absolute;
	bottom: calc(100% + 14px);
	right: 0;
	width: 360px;
	max-width: calc(100vw - 32px);
	max-height: calc(100vh - 120px);
	background: #fff;
	border-radius: 18px;
	border: 1px solid var(--skn-border, #E2E8F0);
	box-shadow: 0 30px 60px -20px rgba(15, 23, 42, 0.45), 0 12px 30px -10px rgba(15, 23, 42, 0.18);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transform-origin: bottom right;
	animation: skn-chat-pop 0.22s ease;
}
@keyframes skn-chat-pop {
	from { opacity: 0; transform: translateY(10px) scale(0.96); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

.skn-chat__header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 14px 12px;
	background: var(--skn-primary, #2563EB);
	color: #fff;
}
.skn-chat__avatar {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: rgba(255,255,255,0.18);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	flex-shrink: 0;
}
.skn-chat__avatar svg { width: 20px; height: 20px; }
.skn-chat__title-wrap { flex: 1; min-width: 0; }
.skn-chat__title { font-weight: 800; font-size: 15px; line-height: 1.2; }
.skn-chat__status {
	display: flex; align-items: center; gap: 6px;
	font-size: 11px; color: rgba(255,255,255,0.85); margin-top: 3px;
}
.skn-chat__dot {
	width: 7px; height: 7px; border-radius: 50%; background: #22c55e;
	box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
	animation: skn-chat-pulse 1.6s ease-in-out infinite;
}
@keyframes skn-chat-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.55; } }
.skn-chat__minimize,
.skn-chat__close {
	background: rgba(255,255,255,0.12); border: none; color: #fff;
	width: 28px; height: 28px; border-radius: 50%;
	cursor: pointer; display: flex; align-items: center; justify-content: center;
	transition: background 0.15s ease;
	margin-left: 6px; padding: 0;
	flex-shrink: 0;
}
.skn-chat__minimize:hover,
.skn-chat__close:hover { background: rgba(255,255,255,0.22); }
.skn-chat__minimize svg { width: 16px; height: 16px; pointer-events: none; }
.skn-chat__close svg    { width: 14px; height: 14px; pointer-events: none; }

.skn-chat__messages {
	flex: 1;
	overflow-y: auto;
	padding: 16px 14px 6px;
	background: var(--skn-bg-soft, #F8FAFC);
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-height: 240px;
	max-height: 460px;
}
.skn-chat__msg {
	max-width: 86%;
	padding: 10px 13px;
	border-radius: 14px;
	font-size: 14px;
	line-height: 1.45;
	word-wrap: break-word;
	white-space: pre-wrap;
}
.skn-chat__msg--bot {
	background: #fff;
	border: 1px solid var(--skn-border, #E2E8F0);
	color: var(--skn-text, #0F172A);
	align-self: flex-start;
	border-bottom-left-radius: 4px;
}
.skn-chat__msg--user {
	background: var(--skn-primary, #2563EB);
	color: #fff;
	align-self: flex-end;
	border-bottom-right-radius: 4px;
}
.skn-chat__msg a {
	color: var(--skn-primary, #2563EB);
	text-decoration: underline;
	text-underline-offset: 2px;
}
.skn-chat__msg--user a { color: #fff; }
.skn-chat__msg--typing {
	background: #fff;
	border: 1px solid var(--skn-border, #E2E8F0);
	color: var(--skn-muted, #64748B);
	align-self: flex-start;
	border-bottom-left-radius: 4px;
	display: inline-flex;
	gap: 4px;
}
.skn-chat__msg--typing span {
	display: inline-block; width: 7px; height: 7px; border-radius: 50%;
	background: var(--skn-muted, #64748B); opacity: 0.4;
	animation: skn-chat-bounce 1.2s infinite ease-in-out;
}
.skn-chat__msg--typing span:nth-child(2) { animation-delay: 0.15s; }
.skn-chat__msg--typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes skn-chat-bounce {
	0%, 80%, 100% { transform: scale(0.7); opacity: 0.35; }
	40% { transform: scale(1); opacity: 0.95; }
}

.skn-chat__chips {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	padding: 8px 14px 4px;
	background: var(--skn-bg-soft, #F8FAFC);
	border-top: 1px solid var(--skn-border, #E2E8F0);
}
.skn-chat__chip {
	background: #fff;
	border: 1px solid var(--skn-border, #E2E8F0);
	color: var(--skn-text, #0F172A);
	padding: 6px 12px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease;
}
.skn-chat__chip:hover {
	background: var(--skn-primary, #2563EB);
	border-color: var(--skn-primary, #2563EB);
	color: #fff;
}

.skn-chat__form {
	display: flex;
	gap: 8px;
	padding: 10px 12px 6px;
	background: var(--skn-bg-soft, #F8FAFC);
	position: relative;
}
/* Honeypot — visually hidden but still in the DOM so bots fill it. */
.skn-chat__honey {
	position: absolute !important;
	left: -9999px !important;
	top: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

/* Inline "what should we call you?" lead prompt. Appears as a bot
   message with a small form. */
.skn-chat__lead {
	background: #fff;
	border: 1px solid var(--skn-border, #E2E8F0);
	border-radius: 14px;
	border-bottom-left-radius: 4px;
	padding: 12px 13px;
	align-self: flex-start;
	max-width: 86%;
	font-size: 14px;
	line-height: 1.4;
	color: var(--skn-text, #0F172A);
}
.skn-chat__lead-prompt { margin-bottom: 8px; }
.skn-chat__lead-row { display: flex; gap: 6px; }
.skn-chat__lead-input {
	flex: 1;
	border: 1px solid var(--skn-border, #E2E8F0);
	background: #fff;
	border-radius: 8px;
	padding: 8px 12px;
	font-size: 13px;
	color: var(--skn-text, #0F172A);
	outline: none;
	min-width: 0;
}
.skn-chat__lead-input:focus {
	border-color: var(--skn-primary, #2563EB);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.skn-chat__lead-save,
.skn-chat__lead-skip {
	border: none;
	border-radius: 8px;
	padding: 8px 12px;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
}
.skn-chat__lead-save {
	background: var(--skn-primary, #2563EB);
	color: #fff;
}
.skn-chat__lead-save:hover { background: var(--skn-primary-dark, #1D4ED8); }
.skn-chat__lead-skip {
	background: transparent;
	color: var(--skn-muted, #64748B);
}
.skn-chat__lead-skip:hover { color: var(--skn-text, #0F172A); }
.skn-chat__input {
	flex: 1;
	border: 1px solid var(--skn-border, #E2E8F0);
	background: #fff;
	border-radius: 999px;
	padding: 10px 14px;
	font-size: 14px;
	color: var(--skn-text, #0F172A);
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.skn-chat__input:focus {
	border-color: var(--skn-primary, #2563EB);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.skn-chat__send {
	background: var(--skn-primary, #2563EB);
	border: none;
	color: #fff;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	flex-shrink: 0;
	transition: background 0.15s ease;
}
.skn-chat__send:hover { background: var(--skn-primary-dark, #1D4ED8); }
.skn-chat__send:disabled { opacity: 0.55; cursor: not-allowed; }
.skn-chat__send svg { width: 16px; height: 16px; }
.skn-chat__footer-note {
	font-size: 10px;
	color: var(--skn-muted, #64748B);
	text-align: center;
	padding: 0 14px 10px;
	background: var(--skn-bg-soft, #F8FAFC);
}

/* ---------- card list (ferry / cruise / flight) ---------- */
.skn-chat__cards {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 4px;
	align-self: stretch;
}
.skn-chat__card {
	background: #fff;
	border: 1px solid var(--skn-border, #E2E8F0);
	border-radius: 12px;
	padding: 11px 13px;
	display: flex;
	gap: 12px;
	align-items: flex-start;
}
.skn-chat__card-icon {
	width: 32px; height: 32px;
	border-radius: 50%;
	background: rgba(37,99,235,.12);
	color: var(--skn-primary, #2563EB);
	display: flex; align-items: center; justify-content: center;
	flex-shrink: 0;
}
.skn-chat__card-icon svg { width: 17px; height: 17px; }
.skn-chat__card-body { flex: 1; min-width: 0; }
.skn-chat__card-title {
	font-weight: 800;
	font-size: 14px;
	color: var(--skn-text, #0F172A);
	line-height: 1.25;
}
.skn-chat__card-subtitle {
	font-size: 12px;
	color: var(--skn-muted, #64748B);
	margin-top: 2px;
	font-weight: 600;
}
.skn-chat__card-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 10px;
	margin-top: 6px;
	font-size: 12px;
	color: var(--skn-text, #0F172A);
}
.skn-chat__card-meta-left  { font-weight: 700; }
.skn-chat__card-meta-right { color: var(--skn-muted, #64748B); }
.skn-chat__cards-more {
	align-self: flex-start;
	background: var(--skn-primary, #2563EB);
	color: #fff;
	text-decoration: none;
	padding: 8px 14px;
	border-radius: 999px;
	font-weight: 700;
	font-size: 12px;
	margin-top: 2px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.skn-chat__cards-more:hover { background: var(--skn-primary-dark, #1D4ED8); color: #fff; }

/* ---------- survey overlay ---------- */
.skn-chat__survey-shade {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10;
	padding: 18px;
	animation: skn-chat-fade .18s ease;
}
@keyframes skn-chat-fade {
	from { opacity: 0; } to { opacity: 1; }
}
.skn-chat__survey-card {
	background: #fff;
	border-radius: 16px;
	padding: 20px;
	width: 100%;
	max-width: 320px;
	box-shadow: 0 20px 40px -10px rgba(15,23,42,.4);
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.skn-chat__survey-title {
	font-weight: 800;
	font-size: 16px;
	color: var(--skn-text, #0F172A);
	text-align: center;
}
.skn-chat__survey-stars {
	display: flex;
	justify-content: center;
	gap: 4px;
}
.skn-chat__star {
	background: transparent;
	border: none;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	color: #D1D5DB;
	padding: 2px 4px;
	transition: color 0.12s ease, transform 0.12s ease;
}
.skn-chat__star:hover,
.skn-chat__star.is-on { color: #F59E0B; transform: scale(1.08); }
.skn-chat__survey-text {
	border: 1px solid var(--skn-border, #E2E8F0);
	border-radius: 10px;
	padding: 10px 12px;
	font-size: 13px;
	font-family: inherit;
	color: var(--skn-text, #0F172A);
	resize: vertical;
	outline: none;
}
.skn-chat__survey-text:focus {
	border-color: var(--skn-primary, #2563EB);
	box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.skn-chat__survey-actions {
	display: flex;
	gap: 8px;
	margin-top: 2px;
}
.skn-chat__survey-send,
.skn-chat__survey-close {
	flex: 1;
	border: none;
	border-radius: 10px;
	padding: 11px 14px;
	font-weight: 700;
	font-size: 13px;
	cursor: pointer;
}
.skn-chat__survey-send {
	background: var(--skn-primary, #2563EB);
	color: #fff;
}
.skn-chat__survey-send:hover { background: var(--skn-primary-dark, #1D4ED8); }
.skn-chat__survey-close {
	background: var(--skn-bg-soft, #F8FAFC);
	color: var(--skn-text, #0F172A);
	border: 1px solid var(--skn-border, #E2E8F0);
}
.skn-chat__survey-close:hover { background: #EEF2F7; }

@media (max-width: 560px) {
	.skn-chat { right: 12px; bottom: 12px; }
	.skn-chat__panel {
		width: calc(100vw - 24px);
		right: 0;
		max-height: calc(100vh - 90px);
	}
	.skn-chat__bubble { width: 54px; height: 54px; }
}
