/* =========================================================
   WOERTHER - Assistant produit V1
   Fichier indépendant pour ne pas perturber le thème legacy.
   ========================================================= */

#wo-assistant-root,
#wo-assistant-root * {
    box-sizing: border-box;
}

#wo-assistant-root {
    position: fixed;
    right: 22px;
    bottom: 86px;
    z-index: 2147482000;
    font-family: Arial, Helvetica, sans-serif;
    color: #222;
}

.wo-assistant-launcher {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 8px 16px 8px 9px;
    border: 0;
    border-radius: 28px;
    background: #f5a400;
    color: #111;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0,0,0,.22);
}

.wo-assistant-launcher:hover,
.wo-assistant-launcher:focus {
    background: #ffb21a;
    outline: none;
}

.wo-assistant-launcher-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 50%;
    background: #242424;
    color: #fff;
    font-size: 18px;
    font-weight: 800;
}

.wo-assistant-launcher-close {
    display: none;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    font-size: 27px;
    font-weight: 400;
    line-height: 1;
}

#wo-assistant-root.is-open .wo-assistant-launcher-icon,
#wo-assistant-root.is-open .wo-assistant-launcher-label {
    display: none;
}

#wo-assistant-root.is-open .wo-assistant-launcher {
    min-width: 54px;
    padding: 8px;
}

#wo-assistant-root.is-open .wo-assistant-launcher-close {
    display: flex;
}

.wo-assistant-panel {
    display: none;
    position: absolute;
    right: 0;
    bottom: 66px;
    width: 410px;
    height: 610px;
    max-height: calc(100vh - 115px);
    overflow: hidden;
    border: 1px solid #ddd;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 55px rgba(0,0,0,.25);
}

#wo-assistant-root.is-open .wo-assistant-panel {
    display: flex;
    flex-direction: column;
}

.wo-assistant-header {
    display: flex;
    align-items: center;
    min-height: 72px;
    padding: 12px 14px;
    background: #252525;
    color: #fff;
}

.wo-assistant-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    margin-right: 10px;
    border-radius: 50%;
    background: #f5a400;
    color: #111;
    font-size: 19px;
    font-weight: 900;
}

.wo-assistant-heading {
    min-width: 0;
    flex: 1;
}

.wo-assistant-heading strong {
    display: block;
    margin-bottom: 3px;
    font-size: 16px;
    line-height: 1.15;
}

.wo-assistant-heading span {
    display: block;
    color: #d7d7d7;
    font-size: 11px;
    line-height: 1.25;
}

.wo-assistant-reset,
.wo-assistant-close {
    width: 34px;
    height: 34px;
    margin-left: 5px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    font-size: 18px;
    line-height: 34px;
    text-align: center;
    cursor: pointer;
}

.wo-assistant-reset:hover,
.wo-assistant-close:hover {
    background: rgba(255,255,255,.11);
}

.wo-assistant-messages {
    flex: 1;
    overflow-y: auto;
    padding: 18px 15px 10px;
    background: #f7f7f7;
    -webkit-overflow-scrolling: touch;
}

.wo-assistant-row {
    display: flex;
    width: 100%;
    margin: 0 0 12px;
}

.wo-assistant-row.is-user {
    justify-content: flex-end;
}

.wo-assistant-bubble {
    max-width: 85%;
    padding: 11px 13px;
    border-radius: 15px;
    background: #fff;
    border: 1px solid #e3e3e3;
    color: #2b2b2b;
    font-size: 14px;
    line-height: 1.45;
    box-shadow: 0 2px 7px rgba(0,0,0,.04);
    white-space: pre-wrap;
}

.wo-assistant-row.is-user .wo-assistant-bubble {
    border-color: #f5a400;
    background: #f5a400;
    color: #111;
    border-bottom-right-radius: 5px;
}

.wo-assistant-row.is-bot .wo-assistant-bubble {
    border-bottom-left-radius: 5px;
}

.wo-assistant-quick-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 3px 0 14px;
}

.wo-assistant-quick {
    display: inline-block;
    padding: 8px 11px;
    border: 1px solid #d5a037;
    border-radius: 16px;
    background: #fff;
    color: #292929;
    font-size: 12px;
    line-height: 1.2;
    cursor: pointer;
}

.wo-assistant-quick:hover {
    background: #fff3d6;
}

.wo-assistant-products {
    margin: 0 0 14px;
}

.wo-assistant-product {
    display: flex;
    align-items: center;
    min-height: 96px;
    margin: 0 0 8px;
    padding: 9px;
    border: 1px solid #ddd;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

.wo-assistant-product-image {
    width: 76px;
    height: 76px;
    flex: 0 0 76px;
    margin-right: 10px;
    overflow: hidden;
    border-radius: 8px;
    background: #f2f2f2;
    text-align: center;
}

.wo-assistant-product-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.wo-assistant-product-body {
    min-width: 0;
    flex: 1;
}

.wo-assistant-product-name {
    display: block;
    margin-bottom: 7px;
    color: #222;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.28;
}

.wo-assistant-product-link {
    display: inline-block;
    padding: 7px 10px;
    border-radius: 6px;
    background: #252525;
    color: #fff !important;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.1;
    text-decoration: none !important;
}

.wo-assistant-product-link:hover {
    background: #f5a400;
    color: #111 !important;
}

.wo-assistant-typing {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    min-width: 54px;
}

.wo-assistant-typing i {
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #888;
    animation: woAssistantDot 1.15s infinite ease-in-out;
}

.wo-assistant-typing i:nth-child(2) { animation-delay: .15s; }
.wo-assistant-typing i:nth-child(3) { animation-delay: .3s; }

@keyframes woAssistantDot {
    0%, 60%, 100% { transform: translateY(0); opacity: .45; }
    30% { transform: translateY(-4px); opacity: 1; }
}

.wo-assistant-composer {
    padding: 10px 11px 7px;
    border-top: 1px solid #ddd;
    background: #fff;
}

.wo-assistant-form {
    display: flex;
    align-items: flex-end;
    gap: 7px;
}

.wo-assistant-input {
    display: block;
    width: 100%;
    min-height: 42px;
    max-height: 95px;
    padding: 11px 12px;
    resize: none;
    overflow-y: auto;
    border: 1px solid #bbb;
    border-radius: 12px;
    background: #fff;
    color: #222;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    line-height: 18px;
    outline: none;
}

.wo-assistant-input:focus {
    border-color: #f5a400;
    box-shadow: 0 0 0 2px rgba(245,164,0,.14);
}

.wo-assistant-send {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border: 0;
    border-radius: 50%;
    background: #f5a400;
    color: #111;
    font-size: 19px;
    font-weight: 900;
    line-height: 42px;
    text-align: center;
    cursor: pointer;
}

.wo-assistant-send:disabled {
    opacity: .55;
    cursor: default;
}

.wo-assistant-legal {
    margin: 6px 4px 0;
    color: #8b8b8b;
    font-size: 9px;
    line-height: 1.3;
    text-align: center;
}

@media (max-width: 600px) {
    #wo-assistant-root {
        right: 10px;
        bottom: 68px;
    }

    .wo-assistant-launcher {
        min-height: 50px;
        padding: 6px 12px 6px 7px;
        font-size: 12px;
    }

    .wo-assistant-launcher-icon,
    .wo-assistant-launcher-close {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }

    .wo-assistant-panel {
        position: fixed;
        left: 7px;
        right: 7px;
        bottom: 125px;
        width: auto;
        height: 69vh;
        min-height: 430px;
        max-height: calc(100vh - 145px);
        border-radius: 15px;
    }

    .wo-assistant-header {
        min-height: 64px;
    }

    .wo-assistant-bubble {
        max-width: 90%;
        font-size: 13px;
    }
}
