/* Morger Chatbot Widget */

#morger-chatbot-wrapper {
    position: fixed;
    bottom: 129px;
    right: 54px;
    z-index: 2147483647;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Sparkle animations ────────────────────── */

@keyframes mcb-twinkle {
    0%, 100% { opacity: 0;    transform: scale(0.2) rotate(0deg);  }
    35%       { opacity: 1;   transform: scale(1)   rotate(25deg); }
    65%       { opacity: 0.8; transform: scale(0.9) rotate(35deg); }
}

.mcb-star {
    position: absolute;
    pointer-events: none;
    color: #fff;
    line-height: 1;
    opacity: 0;
    animation: mcb-twinkle ease-in-out infinite;
}

/* top-right — gross */
.mcb-star-1 { font-size: 13px; top: -6px;  right: -5px;  animation-duration: 2.5s; animation-delay: 0s;   }
/* bottom-left — gross */
.mcb-star-2 { font-size: 15px; bottom: -8px; left: -5px; animation-duration: 3.2s; animation-delay: 1.4s; }
/* right-mid — medium */
.mcb-star-3 { font-size: 8px;  top: 50%;   right: -8px;  animation-duration: 2.8s; animation-delay: 0.7s; }
/* top-left — tiny accent */
.mcb-star-4 { font-size: 6px;  top: -3px;  left: 2px;    animation-duration: 3.6s; animation-delay: 2.0s; }
/* left-mid — medium */
.mcb-star-7 { font-size: 9px;  top: 50%;   left: -8px;   animation-duration: 2.9s; animation-delay: 0.9s; }
/* left-top — small */
.mcb-star-8 { font-size: 7px;  top: 5px;   left: -5px;   animation-duration: 3.4s; animation-delay: 2.3s; }
/* bottom-right — extra gross */
.mcb-star-5 { font-size: 16px; bottom: -8px; right: -6px; animation-duration: 3.0s; animation-delay: 0.5s; }
/* top-right — extra gross */
.mcb-star-6 { font-size: 15px; top: -9px;  right: 6px;   animation-duration: 2.7s; animation-delay: 1.8s; }

/* ── Toggle Button ─────────────────────────── */

#morger-chatbot-toggle {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    background: #f68500;
    border: none;
    cursor: pointer;
    touch-action: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(246, 133, 0, 0.45);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    outline: none;
    overflow: visible;
}

#morger-chatbot-toggle:hover {
    background: #ff9a20;
    transform: scale(1.08);
    box-shadow: 0 6px 28px rgba(246, 133, 0, 0.5);
}

#morger-chatbot-toggle:active {
    background: #ffab44;
    transform: scale(1.04);
}

#morger-chatbot-toggle * {
    pointer-events: none;
}

#morger-chatbot-toggle svg {
    width: 34px;
    height: 34px;
    color: #fff;
}

#morger-chatbot-toggle img {
    width: 38px;
    height: 39px;
    object-fit: contain;
    display: block;
    margin-left: 4px;
    margin-bottom: 3px;
    filter: brightness(0) invert(1);
}

.morger-chatbot-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    background: #e74c3c;
    border-radius: 50%;
    border: 2px solid #fff;
}

/* ── Chat Window ───────────────────────────── */

#morger-chatbot-window {
    position: absolute;
    bottom: 90px;
    right: 0;
    width: 380px;
    height: 560px;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    animation: morger-slide-up 0.25s ease;
}

@keyframes morger-slide-down {
    from { opacity: 1; transform: translateY(0);    }
    to   { opacity: 0; transform: translateY(20px); }
}

@keyframes morger-slide-up {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Header ────────────────────────────────── */

#morger-chatbot-header {
    background: #f68500;
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.morger-chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.morger-chatbot-avatar {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.morger-chatbot-avatar img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

#morger-chatbot-header strong {
    display: block;
    font-size: 15px;
    line-height: 1.2;
}

.morger-chatbot-status {
    font-size: 13px;
    opacity: 0.85;
    display: flex;
    align-items: center;
    gap: 4px;
}

.morger-chatbot-status {
    font-style: italic;
}


#morger-chatbot-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    opacity: 0.8;
    transition: opacity 0.15s;
}

#morger-chatbot-close:hover {
    opacity: 1;
}

/* ── Messages ──────────────────────────────── */

#morger-chatbot-messages {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#morger-chatbot-messages::-webkit-scrollbar {
    width: 4px;
}

#morger-chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

#morger-chatbot-messages::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 2px;
}

#morger-chatbot-window.mcb-opening #morger-chatbot-messages {
    overflow-y: hidden;
}

.morger-chatbot-msg {
    display: flex;
    flex-direction: column;
    max-width: 88%;
}

.morger-chatbot-msg.user {
    align-self: flex-end;
    align-items: flex-end;
}

.morger-chatbot-msg.bot {
    align-self: flex-start;
    align-items: flex-start;
}

.morger-chatbot-bubble {
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
}

.morger-chatbot-msg.user .morger-chatbot-bubble {
    background: #f68500;
    color: #fff;
    border-bottom-right-radius: 4px;
    text-shadow: 0 1px 1px rgba(0,0,0,0.15);
}

.morger-chatbot-msg.bot .morger-chatbot-bubble {
    background: #f0f4f8;
    color: #222;
    border-bottom-left-radius: 4px;
}

.mcb-arrow {
    font-size: 1.7em;
    font-weight: 700;
    color: #f68500;
    margin: 0 2px;
    line-height: 0;
}

.morger-chatbot-bubble a {
    color: #f68500;
    text-decoration: underline;
}

.morger-chatbot-msg.user .morger-chatbot-bubble a {
    color: #fff3e0;
}

/* Typing indicator — lives inside #morger-chatbot-messages */
#morger-chatbot-typing {
    padding: 0;
}

.morger-chatbot-typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 14px !important;
}

.morger-chatbot-typing-indicator span {
    display: inline-block;
    width: 5px;
    height: 5px;
    background: #bbb;
    border-radius: 50%;
    animation: morger-bounce 1.2s infinite;
}

.morger-chatbot-typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.morger-chatbot-typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes morger-bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30%           { transform: translateY(-6px); }
}

/* ── Input Area ────────────────────────────── */

#mcb-char-counter {
    display: none;
    font-size: 11px;
    color: #aaa;
    text-align: right;
    padding: 2px 14px 0;
}

#mcb-char-counter.mcb-cc-warn {
    color: #e74c3c;
    font-weight: 700;
}

#morger-chatbot-input-area {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid #eee;
    flex-shrink: 0;
}

#morger-chatbot-input {
    flex: 1;
    border: 1px solid #f68500;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 14px;
    resize: none;
    outline: none;
    font-family: inherit;
    line-height: 1.5;
    max-height: 100px;
    overflow-y: auto;
    transition: border-color 0.15s;
    vertical-align: middle;
    display: block;
}

#morger-chatbot-input::placeholder {
    font-size: 12.5px;
    color: #bbb;
}

#morger-chatbot-input:hover,
#morger-chatbot-input:focus,
#morger-chatbot-input:active,
#morger-chatbot-input:focus-visible {
    border-color: #f68500 !important;
    outline: none !important;
    box-shadow: none !important;
}

#morger-chatbot-send {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    background: #f68500;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.1s;
}

#morger-chatbot-send:hover {
    background: #ff9a20;
    transform: scale(1.08);
}

#morger-chatbot-send:active {
    background: #ffab44;
    transform: scale(1.04);
}

#morger-chatbot-send svg {
    width: 18px;
    height: 18px;
    color: #fff;
}

#morger-chatbot-send:disabled,
#morger-chatbot-send:disabled:hover,
#morger-chatbot-send:disabled:active {
    background: #e0e0e0;
    transform: none;
    cursor: default;
}
#morger-chatbot-send:disabled svg {
    color: #b0b0b0;
}

#morger-chatbot-input:disabled,
#morger-chatbot-input:disabled:hover,
#morger-chatbot-input:disabled:focus {
    background: #f5f5f5;
    color: #9a9a9a;
    cursor: default;
    border-color: #d0d0d0 !important;
}

/* ── Footer Actions ────────────────────────── */

#morger-chatbot-footer {
    display: flex;
    gap: 6px;
    padding: 8px 12px 12px;
    border-top: 1px solid #f0f0f0;
    flex-shrink: 0;
}

#morger-chatbot-footer button {
    flex: 1;
    font-size: 12.5px;
    font-weight: 700;
    padding: 8px 10px;
    border-radius: 7px;
    border: 1.5px solid;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
    line-height: 1.3;
    outline: none;
    box-shadow: none;
}
#morger-chatbot-footer button:hover,
#morger-chatbot-footer button:focus,
#morger-chatbot-footer button:active {
    outline: none !important;
    box-shadow: none !important;
}

#morger-chatbot-escalate {
    border-color: #f68500;
    background: #ffe5bc;
    color: #f68500;
}

#morger-chatbot-escalate:hover {
    background: #ffd9a0;
    outline: none;
}

#morger-chatbot-escalate:disabled,
#morger-chatbot-escalate:disabled:hover {
    background: #f0f0f0;
    border-color: #cfcfcf;
    color: #9a9a9a;
    cursor: default;
}

#morger-chatbot-end {
    border-color: #f68500;
    background: #fff;
    color: #f68500;
}

#morger-chatbot-end:hover {
    background: #fff8f0;
    outline: none;
}

.mcb-variants-note {
    font-size: 11.5px;
    color: #999;
    font-style: italic;
    white-space: nowrap;
}

/* ── Cart button ───────────────────────────── */

.mcb-cart-wrap {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    vertical-align: middle;
}

.mcb-cart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: 1.5px solid #f68500;
    background: #fff;
    color: #f68500;
    cursor: pointer;
    padding: 0;
    transition: background 0.15s, color 0.15s, transform 0.15s;
    flex-shrink: 0;
    vertical-align: middle;
}

.mcb-cart-btn svg {
    width: 13px;
    height: 13px;
    display: block;
    margin-left: -1.5px;
}

.mcb-cart-btn:hover,
.mcb-cart-btn:active {
    background: #f68500;
    color: #fff;
    transform: scale(1.1);
    transform-origin: center center;
}

.mcb-cart-btn-full {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    border: 1.5px solid #f68500;
    background: #fff8f0;
    color: #f68500;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    transition: background 0.15s, color 0.15s;
    margin-top: 6px;
}

.mcb-cart-btn-full svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.mcb-cart-btn-full:hover {
    background: #f68500;
    color: #fff;
}

.mcb-cart-btn-full.mcb-cart-success {
    background: #27ae60;
    border-color: #27ae60;
    color: #fff;
    cursor: default;
}

.mcb-cart-btn.mcb-cart-loading,
.mcb-cart-btn-full.mcb-cart-loading {
    opacity: 0.8;
    cursor: default;
    pointer-events: none;
}

.mcb-spinner {
    animation: mcb-spin 0.75s linear infinite;
}

.mcb-cart-btn.mcb-cart-success {
    background: #27ae60;
    border-color: #27ae60;
    color: #fff;
    cursor: default;
    transform: scale(1.1);
}

@keyframes mcb-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ── Timestamps ────────────────────────────── */

.morger-chatbot-ts {
    font-size: 10px;
    color: #bbb;
    margin-top: 3px;
    padding: 0 4px;
    display: block;
}

/* ── Privacy notice ────────────────────────── */

.morger-chatbot-notice {
    font-size: 10.5px;
    color: #bbb;
    text-align: center;
    padding: 4px 8px 2px;
    line-height: 1.4;
}

.morger-chatbot-notice--input {
    border-top: 1px solid #f0f0f0;
    padding: 6px 12px 4px;
    text-align: left;
}

/* ── Confirmation messages ─────────────────── */

.morger-chatbot-confirm {
    font-size: 12px;
    color: #27ae60;
    text-align: center;
    padding: 4px;
}

/* ── Contact form ──────────────────────────── */

.mcb-contact-form {
    background: #f8f4ef;
    border: 1px solid #f0d9bc;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 4px;
}

.mcb-contact-form input {
    color: #222 !important;
}

.mcb-contact-form input::placeholder {
    color: #aaa !important;
}

.mcb-contact-form input:hover,
.mcb-contact-form input:focus,
.mcb-contact-form input:active,
.mcb-contact-form input:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    border-color: #dce3eb !important;
}

/* ── Responsive ────────────────────────────── */

@media (max-width: 440px) {
    #morger-chatbot-window {
        width: calc(100vw - 20px);
        right: -12px;
        bottom: 94px;
        height: calc(100svh - 160px);
        max-height: 520px;
    }
    #morger-chatbot-wrapper {
        bottom: 16px;
        right: 16px;
    }
}

@media (max-width: 440px) and (max-height: 680px) {
    #morger-chatbot-window {
        height: calc(100svh - 120px);
        max-height: 420px;
    }
}

/* ── Intro-Animation ───────────────────────── */

#mcb-intro-overlay {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: rgba(6, 2, 20, 0.93);
}

#mcb-intro-text {
    text-align: center;
    padding: 0 28px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

#mcb-intro-text.mcb-in {
    opacity: 1;
    transform: translateY(0);
}

.mcb-intro-badge {
    font-size: clamp(13px, 1.5vw, 24px);
    letter-spacing: 3px;
    color: #f5c07a;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.mcb-intro-headline {
    font-size: clamp(32px, 5.5vw, 80px);
    font-weight: 700;
    color: #fff;
    line-height: 1.35;
}


@media (max-width: 440px) {
    .mcb-intro-headline {
        font-size: clamp(26px, 7.5vw, 40px);
    }
    #mcb-intro-btn {
        padding: 13px 26px;
        font-size: 15px;
    }
}
