:root {
    --medusa-launcher-wine: #4f0001;
    --medusa-launcher-wine-deep: #180106;
    --medusa-launcher-sand: #f5e9d8;
    --medusa-launcher-sand-muted: #d9c3a6;
    --medusa-launcher-gold: #c9a96e;
}

.medusa-chatbot-launcher,
.medusa-chatbot-launcher * {
    box-sizing: border-box;
}

.medusa-chatbot-launcher {
    position: fixed;
    right: clamp(18px, 2.2vw, 34px);
    bottom: clamp(18px, 2.4vw, 34px);
    z-index: 9997;
    display: flex;
    align-items: flex-end;
    gap: 14px;
    font-family: "Montserrat", Arial, sans-serif;
    pointer-events: none;
}

.medusa-chatbot-launcher__button,
.medusa-chatbot-launcher__teaser {
    pointer-events: auto;
}

.medusa-chatbot-launcher__button {
    position: relative;
    width: 70px;
    height: 70px;
    flex: 0 0 70px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(201, 169, 110, 0.7);
    border-radius: 22px;
    background:
        radial-gradient(circle at 28% 22%, rgba(255,255,255,.12), transparent 36%),
        linear-gradient(145deg, #720817 0%, var(--medusa-launcher-wine) 45%, var(--medusa-launcher-wine-deep) 100%);
    color: var(--medusa-launcher-sand);
    box-shadow:
        0 20px 44px rgba(18, 1, 7, .42),
        0 6px 16px rgba(18, 1, 7, .28),
        inset 0 1px 0 rgba(255,255,255,.1);
    text-decoration: none;
    isolation: isolate;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.medusa-chatbot-launcher__button::before {
    content: "";
    position: absolute;
    inset: -7px;
    z-index: -1;
    border: 1px solid rgba(201, 169, 110, .16);
    border-radius: 27px;
    opacity: .85;
    transform: scale(.96);
    animation: medusa-launcher-ring 3.2s ease-out infinite;
}

.medusa-chatbot-launcher__button:hover,
.medusa-chatbot-launcher__button:focus-visible {
    transform: translateY(-5px);
    border-color: rgba(245, 233, 216, .92);
    box-shadow:
        0 24px 52px rgba(18, 1, 7, .5),
        0 8px 20px rgba(79, 0, 1, .36),
        inset 0 1px 0 rgba(255,255,255,.14);
    outline: none;
}

.medusa-chatbot-launcher__icon {
    width: 43px;
    height: 43px;
    display: block;
    transition: transform .25s ease;
}

.medusa-chatbot-launcher__button:hover .medusa-chatbot-launcher__icon,
.medusa-chatbot-launcher__button:focus-visible .medusa-chatbot-launcher__icon {
    transform: scale(1.05);
}

.medusa-chatbot-launcher__icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.medusa-chatbot-launcher__label {
    position: absolute;
    left: 50%;
    bottom: 6px;
    transform: translateX(-50%);
    font-size: 8px;
    line-height: 1;
    font-weight: 600;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: rgba(245, 233, 216, .82);
}

.medusa-chatbot-launcher__status {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 16px;
    height: 16px;
    border: 3px solid #290007;
    border-radius: 50%;
    background: var(--medusa-launcher-gold);
    box-shadow: 0 0 0 4px rgba(201, 169, 110, .13);
}

.medusa-chatbot-launcher__teaser {
    position: relative;
    width: min(330px, calc(100vw - 116px));
    padding: 20px 46px 20px 22px;
    border: 1px solid rgba(201, 169, 110, .28);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(79, 0, 1, .98), rgba(24, 1, 6, .99));
    color: var(--medusa-launcher-sand);
    box-shadow: 0 20px 46px rgba(18, 1, 7, .38);
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px) scale(.97);
    transform-origin: right bottom;
    transition: opacity .28s ease, transform .28s ease, visibility .28s ease;
}

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

.medusa-chatbot-launcher__teaser::after {
    content: "";
    position: absolute;
    right: -8px;
    bottom: 24px;
    width: 15px;
    height: 15px;
    border-top: 1px solid rgba(201, 169, 110, .28);
    border-right: 1px solid rgba(201, 169, 110, .28);
    background: #210108;
    transform: rotate(45deg);
}

.medusa-chatbot-launcher__eyebrow {
    display: block;
    margin-bottom: 8px;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--medusa-launcher-gold);
}

.medusa-chatbot-launcher__teaser strong {
    display: block;
    margin: 0 0 7px;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 19px;
    line-height: 1.25;
    font-weight: 500;
    color: var(--medusa-launcher-sand);
}

.medusa-chatbot-launcher__teaser p {
    margin: 0 0 13px;
    font-size: 11px;
    line-height: 1.65;
    font-weight: 300;
    color: rgba(245, 233, 216, .66);
}

.medusa-chatbot-launcher__teaser a {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 13px;
    border: 1px solid rgba(201, 169, 110, .42);
    border-radius: 999px;
    color: var(--medusa-launcher-sand);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.medusa-chatbot-launcher__teaser a:hover,
.medusa-chatbot-launcher__teaser a:focus-visible {
    background: var(--medusa-launcher-sand);
    border-color: var(--medusa-launcher-sand);
    color: var(--medusa-launcher-wine-deep);
    outline: none;
}

.medusa-chatbot-launcher__dismiss {
    position: absolute;
    top: 11px;
    right: 11px;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(245, 233, 216, .06);
    color: rgba(245, 233, 216, .62);
    cursor: pointer;
}

.medusa-chatbot-launcher__dismiss:hover,
.medusa-chatbot-launcher__dismiss:focus-visible {
    background: rgba(245, 233, 216, .12);
    color: var(--medusa-launcher-sand);
    outline: none;
}

.medusa-chatbot-launcher__dismiss svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

@keyframes medusa-launcher-ring {
    0% { opacity: .65; transform: scale(.94); }
    70%, 100% { opacity: 0; transform: scale(1.17); }
}

@media (max-width: 640px) {
    .medusa-chatbot-launcher {
        right: 16px;
        bottom: calc(16px + env(safe-area-inset-bottom));
        gap: 10px;
    }

    .medusa-chatbot-launcher__button {
        width: 62px;
        height: 62px;
        flex-basis: 62px;
        border-radius: 19px;
    }

    .medusa-chatbot-launcher__button::before {
        border-radius: 23px;
    }

    .medusa-chatbot-launcher__icon {
        width: 38px;
        height: 38px;
    }

    .medusa-chatbot-launcher__teaser {
        position: fixed;
        right: 16px;
        bottom: calc(92px + env(safe-area-inset-bottom));
        width: calc(100vw - 32px);
        max-width: 350px;
    }

    .medusa-chatbot-launcher__teaser::after {
        right: 23px;
        bottom: -8px;
        border-top: 0;
        border-right: 1px solid rgba(201, 169, 110, .28);
        border-bottom: 1px solid rgba(201, 169, 110, .28);
    }
}

@media (prefers-reduced-motion: reduce) {
    .medusa-chatbot-launcher__button,
    .medusa-chatbot-launcher__icon,
    .medusa-chatbot-launcher__teaser {
        transition: none;
    }

    .medusa-chatbot-launcher__button::before {
        animation: none;
    }
}

@media print {
    .medusa-chatbot-launcher {
        display: none !important;
    }
}
