#estensia-chat-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    overflow: hidden;
    z-index: 99999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    background: #fff;
    padding: 0;
}

#estensia-chat-button img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

#estensia-chat-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 360px;
    max-width: calc(100vw - 24px);
    height: 560px;
    max-height: calc(100dvh - 110px);
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    z-index: 99999;
    font-family: inherit, sans-serif;
}

#estensia-chat-window.is-open {
    display: flex;
}

#estensia-header {
    background: #f8f3ef;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

#estensia-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

#estensia-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

#estensia-name {
    font-weight: 700;
    font-size: 16px;
}

#estensia-role {
    font-size: 12px;
    color: #777;
}

.estensia-control {
    cursor: pointer;
    font-size: 20px;
    color: #666;
    border: none;
    background: transparent;
    padding: 0 4px;
    line-height: 1;
}

#estensia-welcome {
    padding: 12px 15px;
    background: #fff8f6;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

#estensia-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.estensia-quick-btn {
    border: none;
    border-radius: 20px;
    padding: 7px 12px;
    cursor: pointer;
    background: #d4af37;
    color: #fff;
    font-size: 13px;
}

#estensia-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #fafafa;
}

.estensia-user,
.estensia-bot {
    margin-bottom: 12px;
}

.estensia-user {
    text-align: right;
}

.estensia-user span,
.estensia-bot span {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 15px;
    max-width: 90%;
    text-align: left;
    white-space: pre-wrap;
    word-break: break-word;
}

.estensia-user span {
    background: #d4af37;
    color: #fff;
}

.estensia-bot span {
    background: #fff;
    border: 1px solid #eee;
    color: #222;
}

.estensia-product-link {
    display: inline-block;
    margin-top: 8px;
    margin-right: 8px;
    color: #9a7b1a;
    font-weight: 700;
    text-decoration: underline;
}

#estensia-privacy {
    font-size: 11px;
    color: #777;
    padding: 6px 15px;
    background: #fff;
    border-top: 1px solid #f0f0f0;
}

#estensia-input-area {
    display: flex;
    border-top: 1px solid #eee;
    background: #fff;
}

#estensia-input {
    flex: 1;
    border: none;
    padding: 14px;
    outline: none;
    font-size: 14px;
    min-width: 0;
}

#estensia-send {
    border: none;
    background: #d4af37;
    color: #fff;
    width: 56px;
    cursor: pointer;
    font-size: 16px;
}

.estensia-footer-social {
    text-align: center;
    padding: 10px 15px 14px;
}

.estensia-footer-social a {
    color: inherit;
    text-decoration: underline;
    font-weight: 600;
}

@media (max-width: 600px) {
    #estensia-chat-button {
        bottom: 16px;
        right: 16px;
        width: 56px;
        height: 56px;
    }

    #estensia-chat-window {
        right: 8px;
        left: 8px;
        bottom: 80px;
        width: auto;
        height: calc(100dvh - 96px);
        max-height: calc(100dvh - 96px);
        border-radius: 16px;
    }
}
