.innkjop-chatbot-widget {
	max-width: none;
	font-family: inherit;
	display: flex;
	flex-direction: column;
	gap: 12px;
	height: 100%;
}

.innkjop-chatbot-input-row {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 0 15px;
	flex-shrink: 0;
}

.innkjop-chatbot-widget label {
	display: block;
	margin-bottom: 0.4em;
	font-weight: 600;
}

/* Wrap injected by JS so we can render a custom scrollbar next to messages */
.chat-scroll-wrap {
	position: relative;
	flex: 1;
	min-height: 0;
	display: flex;
}

#innkjop-chatbot-messages {
	flex: 1;
	overflow-y: scroll;
	overflow-x: hidden;
	margin: 0;
	padding-top: 20px;
	padding-right: 25px;
	/* Hide native scrollbars — custom one in .chat-scrollbar handles it */
	scrollbar-width: none;
}

#innkjop-chatbot-messages::-webkit-scrollbar {
	display: none;
	width: 0;
	height: 0;
}

/* Custom scrollbar (rendered by JS in chatbot-toggle.js) */
.chat-scrollbar {
	position: absolute;
	top: 20px;
	bottom: 0;
	right: 5px;
	width: 10px;
	pointer-events: auto;
	z-index: 2;
}

.chat-scrollbar__track {
	position: relative;
	width: 100%;
	height: 100%;
	background: #F0F1F1;
	border-radius: 20px;
}

.chat-scrollbar__thumb {
	position: absolute;
	left: 0;
	right: 0;
	background: #006179;
	border-radius: 20px;
	cursor: grab;
	transition: background 0.2s ease;
	min-height: 24px;
}

.chat-scrollbar__thumb:hover {
	background: #02364B;
}

.chat-scrollbar__thumb:active {
	cursor: grabbing;
	background: #02364B;
}

.chat-scrollbar.is-hidden {
	display: none;
}

#innkjop-chatbot-messages:empty {
	display: none;
}

.innkjop-chatbot-widget textarea {
	flex: 1;
	min-width: 0;
	max-height: 46px;
	padding: 10px 17px;
	box-sizing: border-box;
	border: 1px solid #6D736F;
	border-radius: 10px;
	background: #fff;
	font-family: 'Nunito Sans', sans-serif;
	font-weight: 400;
	font-size: 12px;
	letter-spacing: 0;
	color: #001918;
	resize: none;
	overflow: hidden;
}

.innkjop-chatbot-widget textarea::placeholder {
	color: #6D736F;
	opacity: 1;
}

.innkjop-chatbot-widget textarea:focus {
	outline: none;
	border-color: #006179;
}

.innkjop-chatbot-actions {
	display: flex;
	gap: 0.5em;
	margin: 0;
	flex-shrink: 0;
}

.innkjop-chatbot-widget button {
	cursor: pointer;
	border: none;
}

#innkjop-chatbot-send {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #006179;
	color: #ACEDD9;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	font-size: 0;
}

#innkjop-chatbot-send::before {
	content: '\f054';
	font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Pro', 'FontAwesome';
	font-weight: 900;
	color: #ACEDD9;
	font-size: 12px;
	line-height: 1;
}

#innkjop-chatbot-send:hover {
	background: #02364B;
}

#innkjop-chatbot-new {
	display: none;
}

.innkjop-chatbot-widget button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

#innkjop-chatbot-messages {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 12px;
}

.innkjop-chatbot-msg {
	padding: 10px 14px;
	border-radius: 10px;
	background: #EAFAF5;
	color: #001918;
	font-family: 'Nunito Sans', sans-serif;
	font-weight: 500;
	font-size: 12px;
	line-height: 16px;
	letter-spacing: 0;
	text-align: left;
	/* Bubbles align to the bot's text-start on the left (15px window edge
	   + 28px icon + 12px gap) and 35px from the right edge. */
	margin: 0 35px 0 55px;
	box-sizing: border-box;
}

.innkjop-chatbot-msg > p,
.innkjop-chatbot-msg p {
	font-family: 'Nunito Sans', sans-serif !important;
	font-weight: 500 !important;
	font-size: 12px !important;
	line-height: 16px !important;
	letter-spacing: 0 !important;
	color: #001918 !important;
	margin: 0;
}

.innkjop-chatbot-msg-user {
	border-bottom-right-radius: 0;
}

.innkjop-chatbot-msg-assistant {
	border-top-left-radius: 0;
	position: relative;
}

.innkjop-chatbot-msg-assistant::before {
	content: '';
	position: absolute;
	top: 0;
	/* Icon at 15px from the chat window's left edge. The bubble starts at
	   55px (15 + 28 + 12 gap), so the icon offset relative to bubble is -40px. */
	left: -40px;
	width: 28px;
	height: 28px;
	background-image: var(--chatbot-bot-logo);
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
}

.innkjop-chatbot-msg-assistant ul,
.innkjop-chatbot-msg-assistant li {
	font-family: 'Nunito Sans', sans-serif;
	font-weight: 500;
	font-size: 12px !important;
	line-height: 16px !important;
	letter-spacing: 0;
	color: #001918;
}

.innkjop-chatbot-msg__time {
	display: block;
	margin-top: 20px;
	font-family: 'Nunito Sans', sans-serif;
	font-weight: 500;
	font-size: 10px;
	line-height: 1;
	letter-spacing: 0;
	color: #001918;
	text-align: right;
	text-box: cap alphabetic;
}

.innkjop-chatbot-msg--final .innkjop-chatbot-msg__time {
	color: #FBFCFC !important;
	align-self: stretch;
}

.innkjop-chatbot-msg-assistant ul {
	margin: 0.5em 0;
	padding-left: 1.5em;
}

.innkjop-chatbot-msg-assistant li {
	margin-bottom: 0.3em;
}

.innkjop-chatbot-msg-assistant p {
	margin: 0.5em 0;
}

.innkjop-chatbot-error {
	background: #f8d7da !important;
	color: #721c24 !important;
	border-color: #f5c6cb !important;
}

.innkjop-chatbot-loading {
	background: #F0F4F4 !important;
	color: #02364B !important;
	border: none !important;
	padding: 10px 14px !important;
	align-self: flex-end;
	width: max-content;
	border-top-left-radius: 0;
}

.innkjop-chatbot-loading::before {
	display: none !important;
}

.innkjop-chatbot-typing {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	line-height: 1;
}

.innkjop-chatbot-typing > span {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #006179;
	display: inline-block;
	animation: innkjop-chatbot-typing 1.3s infinite ease-in-out;
}

.innkjop-chatbot-typing > span:nth-child(2) {
	animation-delay: 0.18s;
}

.innkjop-chatbot-typing > span:nth-child(3) {
	animation-delay: 0.36s;
}

@keyframes innkjop-chatbot-typing {
	0%, 60%, 100% {
		opacity: 0.3;
		transform: translateY(0);
	}
	30% {
		opacity: 1;
		transform: translateY(-3px);
	}
}

/* ---------- Floating Chatbot (theme-injected wrapper) ---------- */
.chatbot-fab {
    position: fixed;
    bottom: 81px;
    right: 101px;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    border: 2.44px solid #006179;
    background: #FBFCFC;
    cursor: pointer;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(2, 54, 75, 0.3);
    padding: 0;
    transition: background 0.2s ease, transform 0.2s ease;
}

.chatbot-fab__icon {
    display: block;
    width: 24px;
    height: 24px;
    background-color: #006179;
    -webkit-mask-image: var(--chatbot-fab-icon);
    mask-image: var(--chatbot-fab-icon);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.chatbot-fab:hover {
    transform: scale(1.05);
}

.chatbot-fab.is-active {
    background: #EAFAF5;
}

/* ---------- Teaser bubble (above the FAB) ---------- */
.chatbot-teaser {
    position: fixed;
    bottom: 160px;
    right: 101px;
    max-width: 320px;
    background: #FBFCFC;
    border: none;
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow: 0 6px 18px rgba(2, 54, 75, 0.22);
    z-index: 9997;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

.chatbot-teaser.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Tail: narrower at top, tapered with rounded tip, pointing down toward FAB */
.chatbot-teaser::after {
    content: '';
    position: absolute;
    bottom: -16px;
    right: 24px;
    width: 16px;
    height: 18px;
    background: #FBFCFC;
    clip-path: path('M 0 0 L 16 0 L 11 14 Q 8 19 5 14 Z');
    /* Soft shadow only on the lower edge — drop-shadow follows the clip-path
       so it traces the rounded tip without bleeding into the bubble seam. */
    filter: drop-shadow(0 3px 2px rgba(2, 54, 75, 0.18));
}

.chatbot-teaser__icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: block;
    object-fit: contain;
}

.chatbot-teaser__text {
    flex: 1;
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 500;
    font-size: 13px;
    line-height: 1.4;
    color: #001918;
}

.chatbot-teaser__close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: #006179;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 0;
    transition: background 0.2s ease;
}

.chatbot-teaser__close i {
    color: #006179;
}

.chatbot-teaser__close:hover {
    background: rgba(0, 97, 121, 0.1);
}

@media (max-width: 480px) {
    .chatbot-teaser {
        bottom: 82px;
        right: 16px;
        max-width: calc(100vw - 32px);
    }
}

.chatbot-panel {
    position: fixed;
    /* 81px (FAB bottom) + 55px (FAB height) + 22px (gap) = 158px */
    bottom: 158px;
    right: 101px;
    width: 294px;
    max-width: calc(100vw - 200px);
    height: 568px;
    max-height: calc(100vh - 180px);
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 12px 40px rgba(2, 54, 75, 0.3);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s ease;
}

.chatbot-panel.is-open {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

.chatbot-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 15px;
    background: #006179;
    color: #FBFCFC;
    flex-shrink: 0;
}

.chatbot-panel__brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.chatbot-panel__logo {
    width: 28px;
    height: 28px;
    display: block;
    flex-shrink: 0;
}

.chatbot-panel__title {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 11px;
    line-height: 1.2;
    letter-spacing: 0;
    color: #FBFCFC;
}

.chatbot-panel__controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chatbot-panel__close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #FBFCFC;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    font-size: 16px;
    line-height: 1;
}

.chatbot-panel__close i {
    color: #FBFCFC;
    font-size: 12px;
}

.chatbot-panel__close:hover {
    background: rgba(255, 255, 255, 0.15);
}

.chatbot-panel__body {
    padding: 0 0 12px 0;
    overflow-y: auto;
    flex: 1;
}

.chatbot-panel__body .innkjop-chatbot-widget {
    max-width: none;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chatbot-panel__body #innkjop-chatbot-messages {
    max-height: none;
    flex: 1;
    margin-bottom: 12px;
}

.chatbot-panel__body #innkjop-chatbot-new {
    display: none;
}

/* Final assistant bubble (offer / contact / fail) — emphasized styling */
.innkjop-chatbot-msg.innkjop-chatbot-msg--final {
    background: #006179 !important;
    color: #FBFCFC !important;
    border: none !important;
    padding: 20px 22px;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

.innkjop-chatbot-msg.innkjop-chatbot-msg--final p,
.innkjop-chatbot-msg.innkjop-chatbot-msg--final ul,
.innkjop-chatbot-msg.innkjop-chatbot-msg--final li {
    color: #FBFCFC !important;
}

/* Rating bubble — visually a continuation of the final bubble */
.innkjop-chatbot-msg.innkjop-chatbot-msg--rating {
    align-items: stretch;
    text-align: left;
    gap: 14px;
    /* Establish container so star icons can size relative to bubble width */
    container-type: inline-size;
}

.innkjop-chatbot-msg--rating::before {
    display: none !important;
}

.innkjop-chatbot-msg__rating-prompt {
    color: #FBFCFC;
    width: 100%;
}

.innkjop-chatbot-msg__rating-prompt p,
.innkjop-chatbot-msg__rating-prompt ul,
.innkjop-chatbot-msg__rating-prompt li {
    margin: 0;
    color: #FBFCFC !important;
}

.innkjop-chatbot-msg__rating-stars {
    display: flex;
    width: 100%;
    gap: 5px;
}

.innkjop-chatbot-msg__rating-star {
    flex: 1 1 0;
    min-width: 0;
    background: transparent;
    border: 0;
    padding: 4px 0;
    margin: 0;
    cursor: pointer;
    color: #FBFCFC;
    /* Scale icon with bubble width: ~16% of container inline-size per star,
       so the row of 5 stars + 4×5px gaps fills the bubble nicely. */
    font-size: clamp(20px, 16cqi, 40px);
    line-height: 1;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.innkjop-chatbot-msg__rating-star i {
    color: inherit;
    transition: color 0.12s ease;
}

.innkjop-chatbot-msg__rating-star:focus-visible {
    outline: 2px solid #ACEDD9;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Hover/focus preview — stars 1..N (set via JS) cascade to mint */
.innkjop-chatbot-msg__rating-star.is-hovered {
    color: #ACEDD9;
}

/* Locked-in selection after click */
.innkjop-chatbot-msg__rating-star.is-selected {
    color: #ACEDD9;
}

/* Rating stars never dim — the selected/unselected distinction is by color only.
   Override the generic .innkjop-chatbot-widget button:disabled { opacity: 0.6 } rule. */
.innkjop-chatbot-msg__rating-star:disabled,
.innkjop-chatbot-msg__rating-star.is-dimmed {
    opacity: 1;
}

.innkjop-chatbot-msg__rating-star:disabled {
    cursor: default;
}

.innkjop-chatbot-msg__icon {
    display: block;
    width: 46px;
    height: 46px;
    margin: 0 auto;
    background-color: #ACEDD9;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
    flex-shrink: 0;
    align-self: center;
}

@media (max-width: 480px) {
    .chatbot-fab {
        bottom: 16px;
        right: 16px;
        width: 54px;
        height: 54px;
    }

    .chatbot-panel {
        /* 16px FAB bottom + 54px FAB height + 22px gap */
        bottom: 92px;
        right: 16px;
        left: 16px;
        width: auto;
        max-width: 100%;
        max-height: calc(100vh - 110px);
        border-radius: 18px;
    }
}
