/* LIVE CHAT WIDGET — bottom-right. When the cookie consent modal is also
   visible, js/chat-widget.js pushes this widget's `bottom` up above it
   (see syncChatPosition) so they never overlap. */

.chat-widget {
	position: fixed;
	bottom: 60px;
	right: 104px;
	z-index: 950;
	font-family: 'GoodTimesRg', 'Arial', sans-serif;
	transition: bottom 0.25s ease;
}
/* Liquid-metal button — same visual language as the language selector
   widget, but with its own CSS variable namespace (--chat-border-*
   instead of --border-*) so the two widgets' shine animations never
   fight over the same custom properties. See chat-widget.js for the
   rAF loop that drives --chat-border-offset-x/y, and language-selector.js
   for the equivalent (separately-named) loop on the other widget. */
:root {
    --chat-border-offset-x: 0px;
    --chat-border-offset-y: 0px;
}

.chat-widget {
	--chat-border-width: 2px;
	--chat-border-radius: 50%;
	--chat-border-glow: 6px;
	--chat-border-glow-offset: -4px;
	--chat-border-image: url(https://i-repair.ro/images/flag/liqmetal.jpg);
	--chat-image-size: 800%;
	filter: drop-shadow(0px 3px 10px var(--dst--primary-color2));
	--dst--primary-color2: #01afe9;
}
.chat-toggle-btn {
    position: relative;
    width: 60px;
    height: 60px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-shiny-border {
    position: relative;
    padding: var(--chat-border-width);
    border-radius: var(--chat-border-radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.chat-shiny-border .chat-shine {
    position: absolute;
    inset: 0;
    border-radius: var(--chat-border-radius);
    background-image: var(--chat-border-image);
    background-position: calc(50% + var(--chat-border-offset-x)) calc(50% + var(--chat-border-offset-y));
    background-size: var(--chat-image-size);
    pointer-events: none;
}

.chat-shiny-border .chat-shine-glow {
    filter: blur(var(--chat-border-glow));
    margin: var(--chat-border-glow-offset);
}

.chat-shine-content {
    position: relative;
    z-index: 1;
    border-radius: var(--chat-border-radius);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
}

.chat-circle-mask {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 88%;
    height: 88%;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #1E3075, #10193f);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    flex-shrink: 0;
    transition: box-shadow 0.3s ease;
}

.chat-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52%;
    height: 52%;
    position: relative;
}

.chat-icon-wrapper svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: #00EBC4;
    transition: filter 0.3s ease;
}

.chat-toggle-btn:hover .chat-icon-wrapper svg {
    filter: drop-shadow(0 0 12px rgba(0, 235, 196, 0.55));
}

.chat-toggle-btn:hover .chat-circle-mask {
    box-shadow: inset 0 0 26px rgba(0, 235, 196, 0.25), inset 0 0 20px rgba(0, 0, 0, 0.8);
}

/* Click ripple — spawned/removed by chat-widget.js on each click */
.chat-click-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(0, 235, 196, 0.35);
    pointer-events: none;
    z-index: 10;
}

.chat-unread-badge {
    display: none;
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 4px;
    border-radius: 10px;
    background: #00EBC4;
    color: #1E3075;
    font-size: 11px;
    font-weight: 700;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

/* Base/closed state only — width, height, opacity, visibility, and
   transform are all driven directly by GSAP in chat-widget.js, not CSS
   transitions, so there's exactly one thing controlling the animation. */

.chat-panel {
	position: absolute;
	bottom: 74px;
	right: -89px;
	width: 460px;
	max-width: calc(100vw - 40px);
	height: 400px;
	max-height: 70vh;
	background: linear-gradient(160deg, #10193f 0%, #17235c 100%);
	border-radius: 14px;
	box-shadow: 0 16px 45px rgba(0, 0, 0, 0.4);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	opacity: 0;
	visibility: hidden;
	transform: translateY(12px) scale(0.97);
	transform-origin: bottom right;
	color: #fff;
	--mask-url: url('https://i-repair.ro/assets/chat-body.svg');
	-webkit-mask-image: var(--mask-url);
	mask-image: var(--mask-url);
	-webkit-mask-size: cover;
	mask-size: cover;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
}
.chat-panel-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 30px 7px 4px 14px;
	background: rgba(0, 0, 0, 0.18);
	font-weight: 600;
	font-size: 13px;
	flex-shrink: 0;
	text-transform: uppercase;
}

.highlight-icon {
	width: 43px;
	height: 32px;
	position: relative;
}
.chat-close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
    padding: 2px 4px;
}

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

.chat-messages {
	flex: 1;
	overflow-y: auto;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	background-image: url('https://i-repair.ro/assets/bg-chat.avif');
	background-size: 100%;
	background-position: center bottom;
	background-repeat: no-repeat;
	background-position-y: 80%;
}

.chat-messages::-webkit-scrollbar { width: 5px; }
.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 10px;
}

/* Each message row — admin rows include an avatar, visitor rows don't
   (right-aligned bubble already reads clearly as "you"). */
.chat-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    max-width: 100%;
}

.chat-row-visitor { justify-content: flex-end; }
.chat-row-admin { justify-content: flex-start; }

.chat-avatar {
	width: 80px;
	height: 80px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
	position: relative;
	top: -14%;
}

.chat-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #00EBC4;
    color: #1E3075;
    font-size: 11px;
    font-weight: 700;
}

.chat-message {
    max-width: 78%;
    padding: 9px 12px;
    border-radius: 12px;
    font-size: 13.5px;
    line-height: 1.45;
}

.chat-message p {
	margin: 0;
	text-transform: math-auto;
        font-family: 'Good Timing', sans-serif;
	font-weight: 600;
}


.chat-message-admin {
    background: rgba(255, 255, 255, 0.1);
    border-bottom-left-radius: 4px;
}

.chat-message-visitor {
    background: #00EBC4;
    color: #1E3075;
    border-bottom-right-radius: 4px;
}

.chat-form {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.chat-form input {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 9px 12px;
    color: #fff;
    font-size: 13.5px;
}

.chat-form input::placeholder { color: rgba(255, 255, 255, 0.5); }
.chat-form input:focus { outline: none; border-color: #00EBC4; }

.chat-form button {
    background: #00EBC4;
    color: #1E3075;
    border: none;
    border-radius: 8px;
    width: 38px;
    height: 38px;
    font-size: 16px;
    cursor: pointer;
    flex-shrink: 0;
}

.chat-form button:hover { background: #00d4b0; }


@media (max-width: 600px) {
.chat-widget {
	right: 84px;
	bottom: 30px;
}
.chat-panel {
	width: calc(100vw - 28px);
	right: -108%;
}
}

