/* LiveChat Widget - Euroopa Saunamaraton Sauna Theme */

/* ============================================
   1. COLOR VARIABLES & BASE
   ============================================ */
#livechat-widget {
    --sauna-dark: #2C1810;
    --sauna-brown: #5C3D2E;
    --sauna-warm: #8B5E3C;
    --sauna-amber: #C17817;
    --sauna-honey: #E0A030;
    --sauna-light: #D4A574;
    --sauna-birch: #F5E6D3;
    --sauna-cream: #FFF8F0;
    --cedar-deep: #3a2419;
    --cedar-mid: #6f4a31;
    --cedar-light: #9d6e47;
    --ember-core: #ffb347;
    --livechat-cedar-tex: none;
    --livechat-birch-tex: none;
    --livechat-bark-tex: none;

    position: fixed;
    bottom: calc(var(--livechat-widget-bottom, 20px) + env(safe-area-inset-bottom));
    z-index: 2147483647;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

/* ============================================
   2. CHAT BUBBLE (CTA BUTTON)
   ============================================ */
#livechat-bubble {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        var(--livechat-cedar-tex),
        radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.2), transparent 42%),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 4px,
            rgba(0,0,0,0.08) 4px,
            rgba(0,0,0,0.08) 5px
        ),
        linear-gradient(145deg, var(--cedar-light) 0%, var(--cedar-mid) 45%, var(--cedar-deep) 100%);
    background-size: cover, auto, auto, auto;
    background-blend-mode: soft-light, normal, multiply, normal;
    border: 2px solid rgba(38, 20, 12, 0.55);
    box-shadow:
        inset 0 2px 6px rgba(255, 234, 210, 0.16),
        inset 0 -6px 10px rgba(19, 9, 5, 0.35),
        0 8px 22px rgba(44, 24, 16, 0.45),
        0 0 20px rgba(193, 120, 23, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    will-change: transform;
}

#livechat-bubble:hover {
    transform: scale(1.1);
    box-shadow:
        inset 0 2px 7px rgba(255, 234, 210, 0.22),
        inset 0 -6px 10px rgba(19, 9, 5, 0.35),
        0 10px 30px rgba(44, 24, 16, 0.52),
        0 0 28px rgba(193, 120, 23, 0.3);
}

#livechat-widget.is-open #livechat-bubble,
#livechat-widget.is-open .bubble-steam,
#livechat-widget.is-open .sauna-greeting,
#livechat-widget.is-open .cta-pour-scene {
    opacity: 0;
    pointer-events: none;
}

/* Bubble pulse glow */
#livechat-bubble::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 179, 71, 0.33), transparent 70%);
    animation: bubble-glow 3s ease-in-out infinite;
    pointer-events: none;
}

#livechat-bubble::before {
    content: '';
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    border: 2px solid rgba(28, 14, 8, 0.42);
    pointer-events: none;
}

@keyframes bubble-glow {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.08); }
}

#unread-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: 600;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    z-index: 2;
}

/* ============================================
   3. AUTO CTA POUR EFFECT
   ============================================ */
.cta-pour-scene {
    position: absolute;
    right: -8px;
    bottom: 46px;
    width: 84px;
    height: 106px;
    pointer-events: none;
    z-index: 3;
}

#livechat-widget[data-position="left"] .cta-pour-scene {
    right: auto;
    left: -8px;
    transform: scaleX(-1);
}

.cta-bucket {
    position: absolute;
    top: 0;
    right: 6px;
    width: 34px;
    height: 26px;
    border-radius: 6px 6px 9px 9px;
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.4), transparent 48%),
        linear-gradient(155deg, #c99a68 0%, #9e6b3f 100%);
    border: 1px solid rgba(76, 46, 26, 0.55);
    box-shadow:
        inset 0 1px 0 rgba(255, 241, 222, 0.35),
        0 6px 12px rgba(38, 21, 11, 0.2);
    transform-origin: 78% 16%;
    opacity: 0;
}

.cta-bucket::before {
    content: '';
    position: absolute;
    left: 4px;
    top: -8px;
    width: 24px;
    height: 12px;
    border: 2px solid rgba(126, 84, 46, 0.8);
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    opacity: 0.8;
}

.cta-water-stream {
    position: absolute;
    top: 24px;
    right: 17px;
    width: 7px;
    height: 0;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(198, 230, 255, 0.9), rgba(142, 201, 242, 0.65));
    filter: blur(0.1px);
    opacity: 0;
}

.cta-water-splash {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(190, 226, 249, 0.9);
    right: 16px;
    bottom: 22px;
    opacity: 0;
}

#livechat-widget.cta-pour-active .cta-bucket {
    animation: cta-bucket-pour 2.4s cubic-bezier(0.25, 0.6, 0.2, 1);
}

#livechat-widget.cta-pour-active .cta-water-stream {
    animation: cta-water-fall 2.4s ease-out;
}

#livechat-widget.cta-pour-active .cta-water-splash.splash-a {
    animation: cta-water-splash-a 2.4s ease-out;
}

#livechat-widget.cta-pour-active .cta-water-splash.splash-b {
    animation: cta-water-splash-b 2.4s ease-out;
}

#livechat-widget.cta-pour-active .cta-water-splash.splash-c {
    animation: cta-water-splash-c 2.4s ease-out;
}

@keyframes cta-bucket-pour {
    0% {
        opacity: 0;
        transform: translateY(-12px) rotate(-18deg);
    }
    18% {
        opacity: 1;
        transform: translateY(0) rotate(-6deg);
    }
    38% {
        opacity: 1;
        transform: translateY(8px) rotate(30deg);
    }
    58% {
        opacity: 1;
        transform: translateY(10px) rotate(34deg);
    }
    78% {
        opacity: 1;
        transform: translateY(2px) rotate(-4deg);
    }
    100% {
        opacity: 0;
        transform: translateY(-8px) rotate(-16deg);
    }
}

@keyframes cta-water-fall {
    0%, 16% {
        opacity: 0;
        height: 0;
        transform: translateY(0);
    }
    28% {
        opacity: 0.95;
        height: 34px;
        transform: translateY(0);
    }
    45% {
        opacity: 0.95;
        height: 44px;
        transform: translateY(0);
    }
    58% {
        opacity: 0.9;
        height: 40px;
    }
    76% {
        opacity: 0.4;
        height: 20px;
    }
    100% {
        opacity: 0;
        height: 0;
        transform: translateY(6px);
    }
}

@keyframes cta-water-splash-a {
    0%, 36% {
        opacity: 0;
        transform: translate(0, 0) scale(0.5);
    }
    45% {
        opacity: 0.9;
        transform: translate(-5px, -2px) scale(1);
    }
    68% {
        opacity: 0.2;
        transform: translate(-12px, -12px) scale(0.6);
    }
    100% {
        opacity: 0;
        transform: translate(-16px, -20px) scale(0.4);
    }
}

@keyframes cta-water-splash-b {
    0%, 40% {
        opacity: 0;
        transform: translate(0, 0) scale(0.5);
    }
    48% {
        opacity: 0.9;
        transform: translate(2px, -2px) scale(1);
    }
    72% {
        opacity: 0.2;
        transform: translate(10px, -14px) scale(0.55);
    }
    100% {
        opacity: 0;
        transform: translate(14px, -22px) scale(0.4);
    }
}

@keyframes cta-water-splash-c {
    0%, 42% {
        opacity: 0;
        transform: translate(0, 0) scale(0.5);
    }
    52% {
        opacity: 0.9;
        transform: translate(0, -1px) scale(1);
    }
    70% {
        opacity: 0.25;
        transform: translate(0, -10px) scale(0.6);
    }
    100% {
        opacity: 0;
        transform: translate(0, -18px) scale(0.4);
    }
}

/* ============================================
   4. STEAM ANIMATIONS (BUBBLE)
   ============================================ */
.bubble-steam {
    position: absolute;
    bottom: 54px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

#livechat-bubble:hover ~ .bubble-steam,
#livechat-widget:hover .bubble-steam,
#livechat-widget.cta-pour-active .bubble-steam {
    opacity: 1;
}

#livechat-widget.cta-pour-active .bubble-steam {
    animation: steam-burst 2.4s ease-out;
}

.steam-p {
    position: absolute;
    bottom: 0;
    background: rgba(255, 255, 255, 0.55);
    border-radius: 50%;
    filter: blur(1px);
}

.steam-p:nth-child(1) {
    width: 7px;
    height: 7px;
    left: 25%;
    animation: steam-rise 2.2s ease-out infinite;
    animation-delay: 0s;
}

.steam-p:nth-child(2) {
    width: 5px;
    height: 5px;
    left: 50%;
    animation: steam-rise 2s ease-out infinite;
    animation-delay: 0.5s;
}

.steam-p:nth-child(3) {
    width: 8px;
    height: 8px;
    left: 70%;
    animation: steam-rise 2.4s ease-out infinite;
    animation-delay: 1s;
}

@keyframes steam-rise {
    0% {
        opacity: 0;
        transform: translateY(0) translateX(0) scale(0.4);
    }
    15% {
        opacity: 0.7;
    }
    100% {
        opacity: 0;
        transform: translateY(-40px) translateX(4px) scale(1.1);
    }
}

@keyframes steam-burst {
    0% {
        transform: translateX(-50%) translateY(6px) scale(0.82);
        opacity: 0;
    }
    28% {
        transform: translateX(-50%) translateY(0) scale(1.06);
        opacity: 1;
    }
    72% {
        transform: translateX(-50%) translateY(-4px) scale(1.12);
        opacity: 1;
    }
    100% {
        transform: translateX(-50%) translateY(-6px) scale(0.96);
        opacity: 0;
    }
}

/* ============================================
   5. GREETING CTA TOOLTIP
   ============================================ */
.sauna-greeting {
    position: absolute;
    bottom: 18px;
    right: 78px;
    background:
        var(--livechat-cedar-tex),
        radial-gradient(circle at 50% -20%, rgba(255, 190, 87, 0.2), transparent 55%),
        repeating-linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.05),
            rgba(255, 255, 255, 0.05) 6px,
            rgba(0, 0, 0, 0.05) 6px,
            rgba(0, 0, 0, 0.05) 7px
        ),
        linear-gradient(145deg, #a4764d 0%, #7a5034 52%, #5b3a27 100%);
    background-size: cover, auto, auto, auto;
    background-blend-mode: soft-light, normal, multiply, normal;
    border: 1px solid rgba(58, 34, 22, 0.6);
    border-radius: 12px;
    padding: 10px 14px;
    box-shadow:
        inset 0 1px 0 rgba(255, 228, 197, 0.2),
        inset 0 -3px 7px rgba(29, 16, 11, 0.32),
        0 7px 22px rgba(28, 15, 10, 0.36);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    cursor: pointer;
    animation: greeting-appear 0.4s ease-out;
    transform-origin: right center;
}

.sauna-greeting[data-position="left"] {
    right: auto;
    left: 78px;
    transform-origin: left center;
}

/* Arrow pointing to bubble */
.sauna-greeting::after {
    content: '';
    position: absolute;
    right: -7px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: #7a5034;
    border-right: 1px solid rgba(58, 34, 22, 0.6);
    border-top: 1px solid rgba(58, 34, 22, 0.6);
}

.sauna-greeting[data-position="left"]::after {
    right: auto;
    left: -7px;
    border-right: none;
    border-top: none;
    border-left: 1px solid var(--sauna-birch);
    border-bottom: 1px solid var(--sauna-birch);
}

.greeting-text {
    font-size: 14px;
    font-weight: 600;
    color: #fff6ea;
    text-shadow: 0 1px 2px rgba(22, 11, 7, 0.45);
}

.steam-man {
    width: 24px;
    height: 24px;
    border-radius: 5px 5px 7px 7px;
    flex-shrink: 0;
    background:
        radial-gradient(circle at 50% 118%, rgba(255, 178, 79, 0.55), transparent 58%),
        repeating-linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.07),
            rgba(255, 255, 255, 0.07) 2px,
            rgba(0, 0, 0, 0.13) 2px,
            rgba(0, 0, 0, 0.13) 4px
        ),
        linear-gradient(180deg, #3c434a 0%, #252b31 100%);
    border: 1px solid rgba(15, 20, 26, 0.7);
    position: relative;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        0 2px 4px rgba(15, 20, 26, 0.3);
}

.steam-man::before {
    content: '';
    position: absolute;
    left: 1px;
    right: 1px;
    top: -6px;
    height: 9px;
    border-radius: 7px;
    background:
        radial-gradient(circle at 8% 58%, #8d939a 0%, #7a8087 42%, transparent 46%),
        radial-gradient(circle at 30% 42%, #8f949b 0%, #787e85 42%, transparent 47%),
        radial-gradient(circle at 52% 60%, #9298a0 0%, #7c8288 42%, transparent 47%),
        radial-gradient(circle at 74% 40%, #899098 0%, #737a81 40%, transparent 47%),
        radial-gradient(circle at 93% 60%, #8e949c 0%, #767d84 40%, transparent 47%);
    box-shadow: 0 1px 2px rgba(17, 22, 28, 0.38);
}

.steam-man-image {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    box-shadow: inset 0 -1px 2px rgba(44, 24, 16, 0.25);
    background:
        radial-gradient(circle at 35% 30%, #f7d9b3 0%, #e8ba84 45%, #c78d4e 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.steam-man-image::before {
    content: none;
}

.steam-man::after {
    content: '';
    position: absolute;
    left: -4px;
    top: -18px;
    width: 32px;
    height: 20px;
    background:
        radial-gradient(circle at 18% 78%, rgba(255, 255, 255, 0.75) 0%, transparent 24%),
        radial-gradient(circle at 45% 66%, rgba(255, 255, 255, 0.68) 0%, transparent 25%),
        radial-gradient(circle at 74% 74%, rgba(255, 255, 255, 0.7) 0%, transparent 24%);
    filter: blur(0.9px);
    animation: heater-steam-rise 1.95s ease-out infinite;
}

.steam-man-image::after {
    content: none;
}

@keyframes heater-steam-rise {
    0% {
        opacity: 0;
        transform: translateY(5px) scale(0.72);
    }
    30%, 55% {
        opacity: 0.9;
    }
    100% {
        opacity: 0;
        transform: translateY(-11px) scale(1.18);
    }
}

.greeting-close {
    background: none;
    border: none;
    color: var(--sauna-light);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0 0 0 4px;
    transition: color 0.2s;
}

.greeting-close:hover {
    color: var(--sauna-brown);
}

@keyframes greeting-appear {
    0% {
        opacity: 0;
        transform: translateX(10px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.sauna-greeting.hiding {
    animation: greeting-hide 0.3s ease-in forwards;
}

@keyframes greeting-hide {
    to {
        opacity: 0;
        transform: translateX(10px) scale(0.9);
    }
}

/* ============================================
   5. CHAT WINDOW
   ============================================ */
#livechat-window {
    position: absolute;
    bottom: 84px;
    right: 0;
    width: 380px;
    height: 580px;
    background:
        var(--livechat-cedar-tex),
        repeating-linear-gradient(
            180deg,
            rgba(74, 49, 34, 0.22),
            rgba(74, 49, 34, 0.22) 6px,
            rgba(255, 255, 255, 0.03) 6px,
            rgba(255, 255, 255, 0.03) 7px
        ),
        linear-gradient(145deg, #7d5438 0%, #5f3e2b 50%, #4a301f 100%);
    background-size: cover, auto, auto;
    background-blend-mode: soft-light, multiply, normal;
    border: 2px solid rgba(49, 29, 18, 0.72);
    border-radius: 18px;
    box-shadow:
        inset 0 2px 0 rgba(255, 226, 189, 0.16),
        inset 0 -8px 16px rgba(20, 10, 6, 0.46),
        0 18px 52px rgba(20, 10, 6, 0.48),
        0 0 0 1px rgba(170, 126, 83, 0.22);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

#livechat-window::before {
    content: '';
    position: absolute;
    top: -18px;
    left: 18px;
    right: 18px;
    height: 24px;
    border-radius: 8px 8px 0 0;
    background:
        var(--livechat-cedar-tex),
        repeating-linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.06),
            rgba(0, 0, 0, 0.06) 8px,
            rgba(255, 255, 255, 0.03) 8px,
            rgba(255, 255, 255, 0.03) 9px
        ),
        linear-gradient(180deg, #916540 0%, #6b452d 100%);
    background-size: cover, auto, auto;
    background-blend-mode: soft-light, multiply, normal;
    border: 2px solid rgba(49, 29, 18, 0.72);
    border-bottom: none;
    box-shadow: 0 -5px 12px rgba(20, 10, 6, 0.35);
    pointer-events: none;
}

#livechat-window::after {
    content: '';
    position: absolute;
    inset: 10px;
    border-radius: 11px;
    border: 1px solid rgba(255, 231, 205, 0.12);
    pointer-events: none;
}

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

/* ============================================
   6. HEADER (SAUNA THEMED)
   ============================================ */
#livechat-header {
    padding: 20px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    min-height: 92px;
    position: relative;
    overflow: hidden;
    background:
        var(--livechat-cedar-tex),
        radial-gradient(circle at 50% 105%, rgba(255, 176, 67, 0.42), transparent 58%),
        repeating-linear-gradient(
            90deg,
            rgba(255, 230, 199, 0.05),
            rgba(255, 230, 199, 0.05) 11px,
            rgba(0, 0, 0, 0.1) 11px,
            rgba(0, 0, 0, 0.1) 13px
        ),
        linear-gradient(165deg, #6f4a31 0%, #4a2f1f 100%);
    background-size: cover, auto, auto, auto;
    background-blend-mode: soft-light, screen, multiply, normal;
    border-bottom: 1px solid rgba(33, 19, 12, 0.5);
}

/* Warm inner glow at bottom of header */
#livechat-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 48px;
    background: linear-gradient(to top, rgba(255, 179, 71, 0.33), transparent);
    pointer-events: none;
}

/* Header steam wisps */
.header-steam {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.steam-wisp {
    position: absolute;
    bottom: 12px;
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    filter: blur(3px);
}

.steam-wisp:nth-child(1) {
    left: 15%;
    animation: wisp-float 4s ease-in-out infinite;
    animation-delay: 0s;
}

.steam-wisp:nth-child(2) {
    left: 55%;
    animation: wisp-float 3.5s ease-in-out infinite;
    animation-delay: 1.5s;
}

.steam-wisp:nth-child(3) {
    left: 80%;
    animation: wisp-float 4.5s ease-in-out infinite;
    animation-delay: 3s;
}

@keyframes wisp-float {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0.5);
    }
    20% {
        opacity: 0.5;
    }
    100% {
        opacity: 0;
        transform: translateY(-76px) translateX(9px) scale(1.7);
    }
}

.header-content {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.header-avatars {
    display: flex;
}

.avatar-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.2), transparent 45%),
        linear-gradient(145deg, #a27148 0%, #6f4a31 100%);
    border: 2px solid rgba(255, 228, 195, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.header-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: relative;
    z-index: 1;
}

.header-title {
    font-size: 15px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.header-status {
    font-size: 12px;
    opacity: 0.85;
}

#livechat-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    position: relative;
    z-index: 1;
}

#livechat-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ============================================
   7. BODY
   ============================================ */
#livechat-body {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at 0% 100%, rgba(255, 182, 72, 0.12), transparent 45%),
        linear-gradient(160deg, #f6e8d8 0%, #f0e1ce 100%);
    min-height: 0;
}

/* ============================================
   8. PRE-CHAT FORM
   ============================================ */
#livechat-prechat {
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: transparent;
    flex: 1;
}

.prechat-welcome {
    font-size: 15px;
    color: #3a2419;
    background:
        var(--livechat-birch-tex),
        repeating-linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.02),
            rgba(0, 0, 0, 0.02) 5px,
            rgba(255, 255, 255, 0.12) 5px,
            rgba(255, 255, 255, 0.12) 6px
        ),
        linear-gradient(145deg, #f7eadb 0%, #f1dfc8 100%);
    background-size: cover, auto, auto;
    background-blend-mode: soft-light, multiply, normal;
    padding: 15px;
    border-radius: 18px 16px 12px 14px;
    border-left: 4px solid #b07234;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        0 3px 9px rgba(73, 47, 31, 0.13);
}

.prechat-input {
    padding: 14px 16px;
    border: 1px solid var(--sauna-birch);
    border-radius: 10px;
    font-size: 14px;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    color: var(--sauna-dark);
}

.prechat-input-wrap {
    position: relative;
    width: 100%;
}

.prechat-input-wrap::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c88742, #9f6532);
    opacity: 0.75;
    pointer-events: none;
}

.prechat-input-name::after {
    content: 'saunakylaline';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(76, 46, 29, 0.55);
    pointer-events: none;
}

.prechat-input-wrap .prechat-input {
    padding-left: 30px;
}

.prechat-input:focus {
    border-color: var(--sauna-amber);
    box-shadow: 0 0 0 3px rgba(193, 120, 23, 0.1);
}

.prechat-input::placeholder {
    color: var(--sauna-light);
}

#start-chat-btn {
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
    background: linear-gradient(135deg, var(--sauna-amber), var(--sauna-warm));
    box-shadow: 0 2px 8px rgba(193, 120, 23, 0.3);
}

#start-chat-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(193, 120, 23, 0.35);
}

#start-chat-btn:disabled {
    opacity: 0.75;
    cursor: wait;
    transform: none;
    box-shadow: none;
}

.prechat-feedback {
    font-size: 13px;
    line-height: 1.35;
    color: #9f1239;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-radius: 10px;
    padding: 9px 12px;
}

/* ============================================
   9. CHAT AREA
   ============================================ */
#livechat-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--sauna-cream);
}

#livechat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
}

/* ============================================
   10. MESSAGES
   ============================================ */
.message {
    display: flex;
    gap: 10px;
    max-width: 85%;
    animation: fadeIn 0.2s ease;
}

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

.message-visitor {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-host {
    align-self: flex-start;
}

.message-system {
    align-self: center;
    max-width: 90%;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--sauna-birch);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.message-bubble {
    padding: 13px 17px;
    border-radius: 23px 26px 20px 28px;
    position: relative;
    max-width: 100%;
    border: 1px solid rgba(82, 52, 33, 0.25);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.34),
        0 6px 12px rgba(67, 43, 28, 0.18);
    overflow: hidden;
}

/* Visitor messages: warm amber (like heated sauna stones) */
.message-visitor .message-bubble {
    background:
        var(--livechat-birch-tex),
        radial-gradient(circle at 30% 25%, rgba(255, 245, 230, 0.3), transparent 35%),
        repeating-linear-gradient(
            45deg,
            rgba(0, 0, 0, 0.04),
            rgba(0, 0, 0, 0.04) 5px,
            rgba(255, 255, 255, 0.05) 5px,
            rgba(255, 255, 255, 0.05) 7px
        ),
        linear-gradient(135deg, #e7c198 0%, #d6aa79 52%, #c38f59 100%);
    background-size: cover, auto, auto, auto;
    background-blend-mode: soft-light, normal, multiply, normal;
    color: #2f1a10;
    border-bottom-right-radius: 12px;
}

/* Host messages: light birch wood */
.message-host .message-bubble {
    background:
        var(--livechat-birch-tex),
        radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.4), transparent 36%),
        repeating-linear-gradient(
            135deg,
            rgba(120, 89, 63, 0.06),
            rgba(120, 89, 63, 0.06) 4px,
            rgba(255, 255, 255, 0.09) 4px,
            rgba(255, 255, 255, 0.09) 6px
        ),
        linear-gradient(145deg, #f6ead9 0%, #ebd8c0 100%);
    background-size: cover, auto, auto, auto;
    background-blend-mode: soft-light, normal, multiply, normal;
    color: #3a2419;
    border-bottom-left-radius: 12px;
}

.message-host .message-bubble::after,
.message-visitor .message-bubble::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: inherit;
    border: 1px solid rgba(96, 63, 41, 0.12);
    background: var(--livechat-bark-tex);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    mix-blend-mode: multiply;
    opacity: 0.25;
    pointer-events: none;
}

.message-has-image .message-bubble::after {
    display: none;
}

.message-system .message-bubble {
    background: #fef3c7;
    color: #92400e;
    font-size: 13px;
    text-align: center;
}

.sender-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--sauna-warm);
    margin-bottom: 4px;
}

.message-content {
    word-wrap: break-word;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.message-image-wrap {
    max-width: 220px;
}

.message-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    border: 1px solid rgba(96, 63, 41, 0.2);
}

.message-caption {
    margin-top: 8px;
}

.message-time {
    font-size: 10px;
    opacity: 0.7;
    margin-top: 6px;
    text-align: right;
}

.message-visitor .message-time {
    color: rgba(255, 255, 255, 0.75);
}

/* ============================================
   11. TYPING INDICATOR
   ============================================ */
#livechat-typing {
    padding: 10px 20px;
    font-size: 13px;
    color: var(--sauna-warm);
    display: flex;
    align-items: center;
    gap: 8px;
}

.typing-dots {
    display: flex;
    gap: 3px;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background: var(--sauna-light);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0.8); }
    40% { transform: scale(1.2); }
}

/* ============================================
   12. CLOSED VIEW
   ============================================ */
#livechat-closed {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--sauna-cream);
    padding: 20px;
    border-top: 1px solid var(--sauna-birch);
}

.closed-message {
    text-align: center;
}

.closed-message p {
    margin: 0 0 15px;
    color: var(--sauna-warm);
}

#new-chat-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    background: linear-gradient(135deg, var(--sauna-amber), var(--sauna-warm));
}

#new-chat-btn:hover {
    opacity: 0.92;
}

/* ============================================
   13. INPUT AREA
   ============================================ */
#livechat-input {
    padding: 15px;
    border-top: 1px solid rgba(95, 58, 35, 0.22);
    background: linear-gradient(180deg, #efdfcb 0%, #ead8c0 100%);
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 6;
}

.livechat-quick-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.message-inline-actions {
    align-self: flex-start;
    max-width: 100%;
}

.inline-quick-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-left: 42px;
}

.quick-action-btn {
    flex: 0 0 auto;
    border: 1px solid rgba(124, 80, 45, 0.35);
    border-radius: 999px;
    padding: 9px 14px 9px 10px;
    font-size: 13px;
    font-weight: 600;
    color: #3f2414;
    background:
        radial-gradient(circle at 30% 0%, rgba(255, 255, 255, 0.45), transparent 55%),
        linear-gradient(180deg, #fff8ea 0%, #f5e2c9 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        inset 0 -1px 0 rgba(126, 83, 49, 0.2),
        0 4px 12px rgba(78, 46, 23, 0.16);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.01em;
}

.quick-action-btn:hover {
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.75),
        inset 0 -1px 0 rgba(126, 83, 49, 0.2),
        0 7px 16px rgba(78, 46, 23, 0.2);
    background:
        radial-gradient(circle at 30% 0%, rgba(255, 255, 255, 0.5), transparent 55%),
        linear-gradient(180deg, #fff8ee 0%, #f4ddbf 100%);
    color: #2f1a10;
}

.quick-action-btn:active {
    transform: translateY(0);
    box-shadow:
        inset 0 2px 4px rgba(124, 80, 45, 0.18),
        0 2px 8px rgba(78, 46, 23, 0.14);
}

.quick-action-ico {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6d4226;
    background: linear-gradient(180deg, #fff6e5 0%, #edd4b2 100%);
    border: 1px solid rgba(124, 80, 45, 0.26);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.quick-action-label {
    white-space: nowrap;
}

.input-container {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    background: linear-gradient(180deg, #fffdf9 0%, #f8efe2 100%);
    border: 1px solid rgba(113, 78, 52, 0.26);
    border-radius: 12px;
    padding: 8px 12px;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.2s;
    touch-action: manipulation;
    cursor: text;
    -webkit-tap-highlight-color: transparent;
}

.input-container:focus-within {
    border-color: var(--sauna-amber);
}

#livechat-text {
    flex: 1;
    border: none;
    background: transparent;
    resize: none;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.5;
    padding: 6px 0;
    max-height: 100px;
    outline: none;
    min-width: 0;
    color: var(--sauna-dark);
    -webkit-appearance: none;
    appearance: none;
    pointer-events: auto;
    user-select: text;
    -webkit-user-select: text;
}

#livechat-text::placeholder {
    color: var(--sauna-light);
}

#livechat-attach {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--sauna-warm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
}

#livechat-attach:hover {
    background: rgba(193, 120, 23, 0.12);
    color: var(--sauna-dark);
}

#livechat-camera {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--sauna-warm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
}

#livechat-camera:hover {
    background: rgba(193, 120, 23, 0.12);
    color: var(--sauna-dark);
}

#livechat-send {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s, transform 0.2s;
    flex-shrink: 0;
    background:
        radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.24), transparent 42%),
        linear-gradient(135deg, #c88742, #9f6532);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        0 3px 9px rgba(63, 37, 23, 0.28);
}

#livechat-send:hover {
    opacity: 0.92;
    transform: scale(1.05);
}

/* ============================================
   14. SCROLLBAR
   ============================================ */
#livechat-messages::-webkit-scrollbar,
#livechat-body::-webkit-scrollbar {
    width: 6px;
}

#livechat-messages::-webkit-scrollbar-track,
#livechat-body::-webkit-scrollbar-track {
    background: transparent;
}

#livechat-messages::-webkit-scrollbar-thumb,
#livechat-body::-webkit-scrollbar-thumb {
    background: var(--sauna-light);
    border-radius: 3px;
}

/* ============================================
   15. MODERN PRO REFRESH
   ============================================ */
#livechat-widget {
    --modern-bg: #f4f7fb;
    --modern-surface: #ffffff;
    --modern-border: #e4eaf2;
    --modern-text: #182230;
    --modern-subtle: #64748b;
    --modern-accent: #d08a45;
    --modern-accent-2: #b8702f;
    font-family: "Inter", "Avenir Next", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
}

#livechat-window {
    background: var(--modern-surface);
    border: 1px solid var(--modern-border);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
}

#livechat-window::before,
#livechat-window::after {
    display: none;
}

#livechat-header {
    min-height: 78px;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.24);
    background:
        linear-gradient(125deg, rgba(255, 186, 108, 0.28), transparent 45%),
        linear-gradient(135deg, #273345 0%, #1e2a3b 52%, #182230 100%);
}

#livechat-header::after {
    height: 36px;
    background: linear-gradient(to top, rgba(255, 179, 71, 0.28), transparent);
}

.header-title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.header-status {
    color: rgba(241, 245, 249, 0.86);
    font-size: 12px;
}

.avatar-circle {
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

#livechat-body,
#livechat-chat {
    background: var(--modern-bg);
}

#livechat-prechat {
    gap: 12px;
    padding: 22px 18px 18px;
}

.prechat-welcome {
    color: var(--modern-text);
    background: #ffffff;
    border: 1px solid var(--modern-border);
    border-left: 4px solid var(--modern-accent);
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.prechat-input-wrap::before {
    width: 7px;
    height: 7px;
    background: linear-gradient(135deg, var(--modern-accent), var(--modern-accent-2));
    opacity: 0.95;
}

.prechat-input-name::after {
    content: '';
}

.prechat-input {
    background: #fff;
    border: 1px solid var(--modern-border);
    border-radius: 12px;
    color: var(--modern-text);
    font-size: 15px;
}

.prechat-input::placeholder {
    color: #8b97a7;
}

.prechat-input:focus {
    border-color: #9db4d4;
    box-shadow: 0 0 0 3px rgba(99, 143, 196, 0.16);
}

#start-chat-btn,
#new-chat-btn {
    background: linear-gradient(135deg, var(--modern-accent), var(--modern-accent-2));
    box-shadow: 0 8px 16px rgba(176, 112, 47, 0.3);
    border-radius: 12px;
}

#livechat-messages {
    padding: 18px 16px;
    gap: 10px;
}

.message {
    max-width: 88%;
}

.message-bubble {
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
}

.message-host .message-bubble {
    color: var(--modern-text);
    background: #ffffff;
    border-bottom-left-radius: 8px;
}

.message-visitor .message-bubble {
    color: #fff;
    background: linear-gradient(135deg, #d18a44 0%, #ba6f2f 100%);
    border-bottom-right-radius: 8px;
    border-color: rgba(186, 111, 47, 0.45);
}

.message-host .message-bubble::after,
.message-visitor .message-bubble::after {
    display: none;
}

.message-visitor .message-time {
    color: rgba(255, 255, 255, 0.85);
}

#livechat-input {
    padding: 10px 12px 12px;
    border-top: none;
    background: transparent;
}

.input-container {
    background: #ffffff;
    border: 1px solid var(--modern-border);
    border-radius: 22px;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.1);
    padding: 8px 10px;
    align-items: center;
}

.input-container:focus-within {
    border-color: #93b1d7;
    box-shadow:
        0 6px 14px rgba(15, 23, 42, 0.1),
        0 0 0 3px rgba(99, 143, 196, 0.18);
}

#livechat-text {
    font-size: 15px;
    line-height: 1.4;
    color: #17202d;
    padding: 4px 0;
}

#livechat-text::placeholder {
    color: #90a0b4;
}

#livechat-camera,
#livechat-attach {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid #e6ecf5;
    background: #f7f9fc;
    color: #4b5565;
}

#livechat-camera:hover,
#livechat-attach:hover {
    background: #eef2f8;
    color: #1f2937;
}

#livechat-send {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(140deg, #d08a45, #b56f31);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.24),
        0 4px 10px rgba(181, 111, 49, 0.32);
}

.inline-quick-actions {
    gap: 10px;
    padding-left: 42px;
}

.quick-action-btn {
    border-color: #e1d6c8;
    color: #2a2320;
}

/* ============================================
   16. MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    #livechat-window {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100dvh;
        border-radius: 0;
        animation: none;
    }

    #livechat-input {
        position: fixed;
        left: 8px;
        right: 8px;
        bottom: calc(env(safe-area-inset-bottom) + 8px);
        z-index: 20;
        padding: 0;
        background: transparent;
    }

    #livechat-body {
        padding-bottom: 118px;
    }

    #livechat-text {
        font-size: 16px;
    }

    .inline-quick-actions {
        padding-left: 0;
        gap: 6px;
    }

    .quick-action-btn {
        padding: 8px 11px 8px 8px;
        font-size: 12px;
    }

    .quick-action-ico {
        width: 22px;
        height: 22px;
    }

    .sauna-greeting {
        display: none !important;
    }
}

/* ============================================
   17. PREMIUM MODERN POLISH
   ============================================ */
#livechat-widget {
    --modern-ink: #172230;
    --modern-muted: #5b687a;
    --modern-line: #d8e1ec;
    --modern-card: #ffffff;
    --modern-shell-top: #f6f8fc;
    --modern-shell-bottom: #edf3fa;
    --premium-amber-1: #e0a05c;
    --premium-amber-2: #b56f31;
}

#livechat-window {
    border-radius: 24px;
    border: 1px solid #d4deeb;
    background:
        radial-gradient(circle at 10% -20%, rgba(255, 208, 150, 0.35), transparent 45%),
        linear-gradient(180deg, var(--modern-shell-top) 0%, var(--modern-shell-bottom) 100%);
    box-shadow:
        0 24px 55px rgba(15, 23, 42, 0.22),
        0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

#livechat-header {
    min-height: 84px;
    padding: 17px 18px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    background:
        linear-gradient(125deg, rgba(255, 186, 108, 0.3), transparent 48%),
        linear-gradient(135deg, #263446 0%, #1c2838 50%, #172230 100%);
}

#livechat-close {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

#livechat-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

#livechat-body,
#livechat-chat {
    background: transparent;
}

#livechat-messages {
    padding: 18px 16px 14px;
    gap: 11px;
}

.prechat-welcome {
    border-radius: 14px;
    border: 1px solid var(--modern-line);
    border-left: 4px solid var(--premium-amber-1);
    background: var(--modern-card);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.prechat-input-wrap {
    position: relative;
    width: 100%;
}

.prechat-input-wrap::before {
    left: 12px;
    width: 18px;
    height: 18px;
    border-radius: 6px;
    background:
        radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.45), transparent 55%),
        linear-gradient(135deg, var(--premium-amber-1), var(--premium-amber-2));
    box-shadow: 0 3px 8px rgba(181, 111, 49, 0.28);
}

.prechat-input-wrap .prechat-input {
    padding-left: 46px;
}

.prechat-input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    min-height: 54px;
    border-radius: 12px;
    border: 1px solid var(--modern-line);
    background: #fff;
    color: var(--modern-ink);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.25;
    padding-top: 14px;
    padding-bottom: 14px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.prechat-input::placeholder {
    color: #8b97a7;
}

.prechat-input:focus {
    border-color: #98b2d6;
    box-shadow:
        0 0 0 3px rgba(109, 147, 198, 0.2),
        0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

#start-chat-btn,
#new-chat-btn {
    border-radius: 12px;
    background: linear-gradient(135deg, var(--premium-amber-1), var(--premium-amber-2));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.28),
        0 10px 18px rgba(181, 111, 49, 0.3);
}

.message-bubble {
    border-radius: 18px;
    border: 1px solid rgba(23, 34, 48, 0.08);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
    padding: 11px 14px;
}

.message-host .message-bubble {
    background: #ffffff;
    color: var(--modern-ink);
    border-bottom-left-radius: 8px;
}

.message-visitor .message-bubble {
    background: linear-gradient(140deg, #e1a35f 0%, #bd7436 100%);
    color: #fff;
    border-bottom-right-radius: 8px;
    border-color: rgba(189, 116, 54, 0.55);
}

.sender-name {
    color: #886143;
}

#livechat-input {
    padding: 9px 12px 14px;
    background: transparent;
}

.input-container {
    min-height: 50px;
    border-radius: 20px;
    border: 1px solid #d4deea;
    background: #fff;
    box-shadow:
        0 10px 20px rgba(15, 23, 42, 0.1),
        0 1px 0 rgba(255, 255, 255, 0.85) inset;
    padding: 8px 10px 8px 8px;
    align-items: center;
}

.input-container:focus-within {
    border-color: #92afd4;
    box-shadow:
        0 10px 20px rgba(15, 23, 42, 0.1),
        0 0 0 3px rgba(96, 140, 194, 0.2);
}

#livechat-text {
    color: var(--modern-ink);
    font-size: 15px;
    line-height: 1.34;
    padding: 7px 2px 7px 0;
}

#livechat-text::placeholder {
    color: #8c9caf;
}

#livechat-camera,
#livechat-attach {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 10px;
    color: #58687b;
    background: transparent;
}

#livechat-camera:hover,
#livechat-attach:hover {
    color: #1d2733;
    background: #eef3f9;
}

#livechat-send {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(138deg, #df9e57 0%, #b97033 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 6px 12px rgba(181, 111, 49, 0.32);
}

.inline-quick-actions {
    gap: 10px;
    padding-left: 42px;
    margin-top: 3px;
}

.quick-action-btn {
    border-radius: 14px;
    border: 1px solid rgba(185, 131, 80, 0.32);
    background:
        radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.75), transparent 55%),
        linear-gradient(145deg, #fff8ed 0%, #f4e2c8 100%);
    color: #2e261f;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.88),
        0 8px 14px rgba(120, 80, 46, 0.16);
    padding: 8px 12px 8px 8px;
}

.quick-action-btn:hover {
    transform: translateY(-1px);
    background:
        radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.82), transparent 55%),
        linear-gradient(145deg, #fffaf1 0%, #f2ddbf 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 10px 16px rgba(120, 80, 46, 0.2);
}

.quick-action-ico {
    width: 26px;
    height: 26px;
    border-radius: 9px;
    border: 1px solid rgba(187, 135, 82, 0.35);
    background: linear-gradient(155deg, #fdf3e1 0%, #edd2ad 100%);
    color: #7b5230;
}

.quick-action-label {
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

@media (max-width: 768px) {
    #livechat-window {
        border-radius: 0;
    }

    #livechat-header {
        padding-top: max(15px, env(safe-area-inset-top));
    }

    #livechat-input {
        left: 10px;
        right: 10px;
        bottom: calc(env(safe-area-inset-bottom) + 14px + var(--livechat-mobile-offset, 0px));
        padding: 0;
        z-index: 24;
    }

    #livechat-body {
        padding-bottom: calc(var(--livechat-composer-height, 124px) + var(--livechat-mobile-offset, 0px));
    }

    .input-container {
        min-height: 52px;
        padding: 8px 9px;
    }

    .prechat-input-wrap::before {
        left: 14px;
        width: 20px;
        height: 20px;
    }

    .prechat-input-wrap .prechat-input {
        padding-left: 50px;
    }

    .prechat-input {
        min-height: 58px;
        font-size: 16px;
    }

    #livechat-text {
        font-size: 16px;
        line-height: 1.3;
        padding-top: 8px;
        padding-bottom: 7px;
    }

    .inline-quick-actions {
        padding-left: 6px;
        padding-right: 6px;
        gap: 8px;
    }

    .quick-action-btn {
        min-height: 40px;
        padding: 8px 10px 8px 8px;
    }
}

/* ============================================
   18. CAMERA/ATTACH VISIBILITY SAFETY
   ============================================ */
#livechat-widget #livechat-camera,
#livechat-widget #livechat-attach {
    background-color: #eef3f9 !important;
    color: #1f2d3d !important;
    border: 1px solid #d8e2ef !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 18px 18px !important;
    min-width: 34px !important;
    min-height: 34px !important;
}

#livechat-widget #livechat-camera {
    background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCAyNCAyNCc+PHBhdGggZmlsbD0nYmxhY2snIGQ9J005IDNsLTEuODMgMkg0Yy0xLjEgMC0yIC45LTIgMnYxMWMwIDEuMS45IDIgMiAyaDE2YzEuMSAwIDItLjkgMi0yVjdjMC0xLjEtLjktMi0yLTJoLTMuMTdMMTUgM0g5em0zIDE1YTUgNSAwIDEgMSAwLTEwIDUgNSAwIDAgMSAwIDEwem0wLTIuMmEyLjggMi44IDAgMSAwIDAtNS42IDIuOCAyLjggMCAwIDAgMCA1LjZ6Jy8+PC9zdmc+") !important;
}

#livechat-widget #livechat-attach {
    background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCAyNCAyNCc+PHBhdGggZmlsbD0nYmxhY2snIGQ9J00xNi41IDYuNXYxMGE0LjUgNC41IDAgMCAxLTkgMFY2YTMgMyAwIDAgMSA2IDB2OWExLjUgMS41IDAgMCAxLTMgMFY3aC0ydjhhMy41IDMuNSAwIDEgMCA3IDBWNmE1IDUgMCAwIDAtMTAgMHYxMC41YTYgNiAwIDAgMCAxMiAwdi0xMGgtMnonLz48L3N2Zz4=") !important;
}

#livechat-widget #livechat-camera svg,
#livechat-widget #livechat-attach svg {
    display: none !important;
}

#livechat-widget #livechat-camera:hover,
#livechat-widget #livechat-attach:hover {
    background-color: #e5ecf6 !important;
    color: #152131 !important;
}
