/* Live chat: royal blue launcher with glow, refined window */
#fob-live-chat .fob-chat-button {
    width: 62px;
    height: 62px;
    background: linear-gradient(135deg, #4f78ea 0%, #4169e1 55%, #3457c9 100%);
    box-shadow: 0 10px 26px rgba(65, 105, 225, .40);
    animation: amilmaChatGlow 2.8s ease-in-out infinite;
}

#fob-live-chat .fob-chat-button:hover {
    background: linear-gradient(135deg, #5d84ef 0%, #4169e1 55%, #3457c9 100%);
    animation-play-state: paused;
}

#fob-live-chat .fob-chat-button svg {
    width: 26px;
    height: 26px;
}

@keyframes amilmaChatGlow {
    0%, 100% {
        box-shadow: 0 10px 26px rgba(65, 105, 225, .40), 0 0 0 0 rgba(65, 105, 225, .35);
    }
    50% {
        box-shadow: 0 14px 34px rgba(65, 105, 225, .58), 0 0 0 10px rgba(65, 105, 225, 0);
    }
}

#fob-live-chat .fob-chat-window {
    width: 392px;
    height: 580px;
    border: 1px solid rgba(15, 23, 42, .06);
    border-radius: 22px;
    box-shadow: 0 28px 70px rgba(15, 23, 42, .22), 0 4px 12px rgba(15, 23, 42, .08);
    font-family: Manrope, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

#fob-live-chat .fob-chat-header {
    padding: 18px 20px;
    background: linear-gradient(135deg, #4f78ea 0%, #4169e1 55%, #3457c9 100%);
}

#fob-live-chat .fob-chat-avatar {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, .16);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .22);
}

#fob-live-chat .fob-chat-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -.01em;
}

#fob-live-chat .fob-chat-status {
    font-size: 12px;
    font-weight: 500;
    opacity: .92;
}

#fob-live-chat .fob-chat-status::before {
    box-shadow: 0 0 0 3px rgba(34, 197, 94, .25);
}

#fob-live-chat .fob-chat-close {
    background: rgba(255, 255, 255, .14);
}

#fob-live-chat .fob-chat-close:hover {
    background: rgba(255, 255, 255, .24);
}

#fob-live-chat .fob-chat-start {
    background: linear-gradient(180deg, #f5f8ff 0%, #ffffff 100%);
}

#fob-live-chat .fob-chat-start-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 18px;
    border-radius: 20px;
    background: rgba(65, 105, 225, .10);
    color: #4169e1;
    display: flex;
    align-items: center;
    justify-content: center;
}

#fob-live-chat .fob-chat-start-icon svg {
    opacity: 1;
}

#fob-live-chat .fob-chat-start-text {
    color: #0f172a;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
}

#fob-live-chat .fob-input {
    padding: 12px 14px;
    border-color: #dfe5f1;
    border-radius: 12px;
    background: #fff;
}

#fob-live-chat .fob-input:focus {
    border-color: #4169e1;
    box-shadow: 0 0 0 4px rgba(65, 105, 225, .15);
}

#fob-live-chat .fob-btn-primary {
    padding: 13px 20px;
    border-radius: 12px;
    font-weight: 600;
    background: linear-gradient(135deg, #4f78ea 0%, #4169e1 55%, #3457c9 100%);
    box-shadow: 0 10px 22px rgba(65, 105, 225, .30);
}

#fob-live-chat .fob-btn-primary:hover:not(:disabled) {
    box-shadow: 0 14px 28px rgba(65, 105, 225, .38);
}

#fob-live-chat .fob-chat-body {
    background: #f5f7fc;
}

#fob-live-chat .fob-chat-messages {
    padding: 18px 16px;
    gap: 14px;
}

#fob-live-chat .fob-msg-visitor .fob-msg-content {
    background: linear-gradient(135deg, #4f78ea 0%, #4169e1 55%, #3457c9 100%);
    box-shadow: 0 6px 16px rgba(65, 105, 225, .22);
}

#fob-live-chat .fob-msg-admin .fob-msg-content {
    background: #fff;
    color: #0f172a;
    border: 1px solid #e6ebf5;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .05);
}

#fob-live-chat .fob-msg-sender {
    font-weight: 600;
}

#fob-live-chat .fob-chat-footer {
    padding: 14px;
    background: #fff;
    border-top: 1px solid #eef2f8;
}

#fob-live-chat .fob-chat-send-form .fob-input {
    padding: 11px 18px;
    border-color: transparent;
    border-radius: 999px;
    background: #f5f7fc;
}

#fob-live-chat .fob-chat-send-form .fob-input:focus {
    border-color: #4169e1;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(65, 105, 225, .14);
}

#fob-live-chat .fob-btn-send {
    background: linear-gradient(135deg, #4f78ea 0%, #4169e1 55%, #3457c9 100%);
    box-shadow: 0 6px 14px rgba(65, 105, 225, .35);
}

/* Back to top: sits above the chat launcher and steps aside while chat is open */
#scrollUp {
    right: 22px !important;
    bottom: 96px !important;
    transition: opacity .2s ease, visibility .2s ease, background-color .2s ease;
}

body:has(#fob-live-chat .fob-chat-window[data-status="open"]) #scrollUp {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none;
}

/* Footer logo: keep the natural proportions of the wordmark */
.amf-footer--corporate .amf-brand img {
    width: 190px;
    max-width: 100%;
    height: auto;
}

@media (max-width: 480px) {
    #fob-live-chat .fob-chat-button {
        width: 56px;
        height: 56px;
    }

    #fob-live-chat .fob-chat-window {
        left: 12px !important;
        right: 12px !important;
        width: auto !important;
        max-width: none !important;
    }
}

/* Mobile: keep launcher, window and back-to-top above the bottom command bar (10px offset, 70px tall) */
@media (max-width: 991.98px) {
    /* Off-canvas cart drawer must not widen the page on small screens */
    html,
    body {
        overflow-x: hidden;
        overflow-x: clip;
    }

    #fob-live-chat .fob-chat-button {
        bottom: 92px;
    }

    #fob-live-chat .fob-chat-window {
        bottom: 160px !important;
        height: calc(100vh - 200px);
        max-height: calc(100vh - 200px);
    }

    #scrollUp {
        right: 20px !important;
        bottom: 160px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    #fob-live-chat .fob-chat-button {
        animation: none;
    }
}
