/**
 * GEOCIKLO — Geoklito Floating Intelligent Advisor Styles
 * Premium, consultive, brand-aligned floating interface.
 */

:root {
	--gk-primary: #035877;
	--gk-teal: #06605C;
	--gk-green: #3FAE6A;
	--gk-dark: #073F4D;
	--gk-bg-light: #f8fafc;
	--gk-border: #e2e8f0;
	--gk-text-main: #0f172a;
	--gk-text-muted: #64748b;
}

.geoklito-root {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 99998;
	font-family: 'Inter Tight', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	-webkit-font-smoothing: antialiased;
}

/* Floating Tooltip */
.geoklito-tooltip {
	position: absolute;
	right: 76px;
	top: 50%;
	transform: translateY(-50%);
	background: #FFFFFF;
	color: #073F4D;
	border: 1px solid #E2E8F0;
	padding: 8px 16px;
	border-radius: 9999px;
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
	box-shadow: 0 4px 14px rgba(7, 63, 77, 0.08);
	pointer-events: none;
	opacity: 1;
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.geoklito-tooltip::after {
	display: none;
}

.geoklito-root:hover .geoklito-tooltip {
	transform: translateY(calc(-50% - 2px));
}

/* Floating Trigger Button */
.geoklito-trigger {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: #ffffff;
	border: 2.5px solid var(--gk-green);
	box-shadow: 0 10px 30px rgba(3, 88, 119, 0.24);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	padding: 0;
	transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
	outline: none;
}

.geoklito-trigger:hover,
.geoklito-trigger:focus-visible {
	transform: scale(1.06);
	box-shadow: 0 14px 36px rgba(3, 88, 119, 0.34);
}

.geoklito-trigger-img {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
}

.geoklito-status-dot {
	position: absolute;
	top: 1px;
	right: 1px;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--gk-green);
	border: 2.5px solid #ffffff;
	box-shadow: 0 0 0 1px rgba(0,0,0,0.06);
}

/* Chat Panel Modal */
.geoklito-panel {
	position: fixed;
	bottom: 100px;
	right: 24px;
	width: 400px;
	max-width: calc(100vw - 32px);
	height: 620px;
	max-height: calc(100vh - 120px);
	background: #ffffff;
	border-radius: 20px;
	box-shadow: 0 24px 60px rgba(7, 63, 77, 0.28), 0 0 0 1px rgba(6, 96, 92, 0.12);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	z-index: 99999;
	animation: gkFadeInUp 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes gkFadeInUp {
	from {
		opacity: 0;
		transform: translateY(14px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

/* Header */
.geoklito-panel-header {
	background: linear-gradient(135deg, var(--gk-dark) 0%, var(--gk-primary) 100%);
	color: #ffffff;
	padding: 14px 18px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.geoklito-header-info {
	display: flex;
	align-items: center;
	gap: 12px;
}

.geoklito-header-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, 0.5);
	background: #ffffff;
	object-fit: cover;
}

.geoklito-header-title {
	display: block;
	font-weight: 700;
	font-size: 16px;
	line-height: 1.2;
	letter-spacing: -0.01em;
}

.geoklito-header-subtitle {
	display: block;
	font-size: 12px;
	opacity: 0.85;
	line-height: 1.2;
}

.geoklito-header-actions {
	display: flex;
	align-items: center;
	gap: 10px;
}

.geoklito-live-badge {
	font-size: 11px;
	font-weight: 600;
	background: rgba(63, 174, 106, 0.22);
	color: #a7f3d0;
	padding: 4px 10px;
	border-radius: 12px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.geoklito-live-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--gk-green);
	display: inline-block;
	box-shadow: 0 0 6px var(--gk-green);
}

.geoklito-close-btn {
	background: transparent;
	border: none;
	color: #ffffff;
	font-size: 18px;
	cursor: pointer;
	opacity: 0.8;
	padding: 4px;
	line-height: 1;
	transition: opacity 0.2s;
}

.geoklito-close-btn:hover {
	opacity: 1;
}

/* Messages Container */
.geoklito-messages-container {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 14px;
	background: var(--gk-bg-light);
}

.geoklito-msg {
	display: flex;
	flex-direction: column;
	max-width: 86%;
	animation: gkMsgFade 0.2s ease;
}

@keyframes gkMsgFade {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: translateY(0); }
}

.geoklito-msg--user {
	align-self: flex-end;
}

.geoklito-msg--user .geoklito-msg-bubble {
	background: linear-gradient(135deg, var(--gk-primary) 0%, var(--gk-teal) 100%);
	color: #ffffff;
	border-radius: 16px 16px 2px 16px;
	padding: 11px 15px;
	font-size: 14px;
	line-height: 1.45;
	box-shadow: 0 3px 10px rgba(3, 88, 119, 0.16);
}

.geoklito-msg--advisor {
	align-self: flex-start;
}

.geoklito-msg--advisor .geoklito-msg-bubble {
	background: #ffffff;
	color: var(--gk-text-main);
	border: 1px solid var(--gk-border);
	border-radius: 16px 16px 16px 2px;
	padding: 13px 16px;
	font-size: 14px;
	line-height: 1.5;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Action CTA Buttons */
.geoklito-cta-container {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 12px;
}

.geoklito-cta-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 9px 14px;
	border-radius: 10px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.2s ease;
	text-align: center;
}

.geoklito-cta-btn--primary {
	background: var(--gk-green);
	color: #ffffff !important;
	box-shadow: 0 3px 10px rgba(63, 174, 106, 0.28);
}

.geoklito-cta-btn--primary:hover {
	background: #349659;
	transform: translateY(-1px);
}

.geoklito-cta-btn--secondary {
	background: #ffffff;
	color: var(--gk-primary) !important;
	border: 1.5px solid var(--gk-primary);
}

.geoklito-cta-btn--secondary:hover {
	background: #f0f7f9;
}

/* Chips Container */
.geoklito-chips-container {
	padding: 8px 14px;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	background: #ffffff;
	border-top: 1px solid #f1f5f9;
}

.geoklito-chip {
	background: #f1f5f9;
	border: 1px solid var(--gk-border);
	border-radius: 14px;
	padding: 6px 11px;
	font-size: 12px;
	font-weight: 500;
	color: var(--gk-text-main);
	cursor: pointer;
	transition: all 0.2s ease;
	line-height: 1.2;
}

.geoklito-chip:hover {
	background: #e2e8f0;
	border-color: #cbd5e1;
	transform: translateY(-1px);
}

.geoklito-trust-note {
	margin: 0;
	padding: 6px 14px 0;
	background: #ffffff;
	font-size: 11px;
	line-height: 1.4;
	color: var(--gk-text-muted, #94a3b8);
	text-align: center;
}

/* Composer Form */
.geoklito-composer-form {
	padding: 10px 14px;
	display: flex;
	align-items: center;
	gap: 8px;
	background: #ffffff;
	border-top: 1px solid var(--gk-border);
}

.geoklito-composer-input {
	flex: 1;
	border: 1.5px solid #cbd5e1;
	border-radius: 24px;
	padding: 9px 15px;
	font-size: 14px;
	outline: none;
	color: var(--gk-text-main);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.geoklito-composer-input:focus {
	border-color: var(--gk-primary);
	box-shadow: 0 0 0 3px rgba(3, 88, 119, 0.12);
}

.geoklito-send-btn {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--gk-primary) 0%, var(--gk-green) 100%);
	border: none;
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: transform 0.2s ease, opacity 0.2s ease;
	padding: 0;
	flex-shrink: 0;
}

.geoklito-send-btn:hover:not(:disabled) {
	transform: scale(1.05);
}

.geoklito-send-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Loading Dots */
.geoklito-typing-indicator {
	display: inline-flex;
	gap: 4px;
	padding: 4px 0;
}

.geoklito-typing-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--gk-teal);
	animation: gkDotBounce 1.2s infinite ease-in-out;
}

.geoklito-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.geoklito-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes gkDotBounce {
	0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
	40% { transform: scale(1.1); opacity: 1; }
}

/* Responsive Mobile Layout */
@media (max-width: 480px) {
	.geoklito-root {
		bottom: 16px;
		right: 16px;
	}

	.geoklito-trigger {
		width: 58px;
		height: 58px;
	}

	.geoklito-trigger-img {
		width: 46px;
		height: 46px;
	}

	.geoklito-panel {
		bottom: 0 !important;
		right: 0 !important;
		left: 0 !important;
		width: 100% !important;
		max-width: 100% !important;
		height: 82dvh !important;
		max-height: 82dvh !important;
		border-radius: 20px 20px 0 0 !important;
	}

	.geoklito-tooltip {
		display: none;
	}
}
