#vivatorg-feedback-fab {
    position: fixed; right: 24px; bottom: 24px; z-index: 99998;
    width: 60px; height: 60px; padding: 0; border: 0; border-radius: 50%;
    background: #f28a25; color: #fff; box-shadow: 0 5px 20px #0003;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
}
#vivatorg-feedback-fab svg { width: 26px !important; height: 26px !important; }
.viva-chat-badge {
    position: absolute; right: 0; bottom: 66px; width: max-content;
    border-radius: 12px; padding: 5px 10px; background: #17657e; color: #fff; font-size: 12px;
}
#vivatorg-feedback-greeting {
    position: fixed; right: 100px; bottom: 24px; z-index: 99998;
    width: 330px; max-width: calc(100vw - 116px); background: white;
    border: 1px solid #f0d0b0; border-radius: 16px; box-shadow: 0 6px 24px #0002;
}
#vivatorg-feedback-greeting-open {
    width: 100%; padding: 18px 34px 18px 20px; border: 0; border-radius: 16px;
    background: transparent; color: #303030; text-align: left; cursor: pointer; font: inherit;
}
#vivatorg-feedback-greeting-open strong { display: block; margin-bottom: 5px; }
#vivatorg-feedback-greeting-open span { display: block; font-size: 14px; line-height: 1.5; }
#vivatorg-feedback-greeting-close {
    position: absolute; top: 4px; right: 4px; padding: 0; width: 30px; height: 30px;
    border: 0; background: transparent; color: #666; font-size: 24px; cursor: pointer;
}
#vivatorg-feedback-overlay {
    position: fixed; inset: 0; z-index: 99999; background: #16273526;
    display: flex; align-items: flex-end; justify-content: flex-end; padding: 24px;
}
#vivatorg-feedback-overlay[hidden], #vivatorg-feedback-greeting[hidden],
.viva-chat [hidden], .viva-chat-badge[hidden] { display: none !important; }
.viva-chat { color: #243543; font-family: inherit; font-size: 14px; line-height: 1.5; }
.viva-chat *, #vivatorg-feedback-overlay { box-sizing: border-box; }
#vivatorg-feedback-modal {
    display: flex; flex-direction: column; width: 390px; max-width: 100%;
    height: 630px; max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px);
    background: #fff; border-radius: 20px; box-shadow: 0 16px 60px #142b3a40; overflow: hidden;
}
.viva-chat-header { display: flex; gap: 12px; align-items: center; padding: 18px 20px; background: #17657e; color: #fff; flex-shrink: 0; }
.viva-chat-avatar { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: #ffffff26; font-size: 24px; font-weight: 700; }
#viva-chat-title { margin: 0; color: #fff; font-size: 17px; line-height: 1.4; }
.viva-chat-header p { margin: 2px 0 0; color: #deedf1; font-size: 12px; }
#vivatorg-feedback-close { margin-left: auto; padding: 0; width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; color: #fff; font-size: 28px; cursor: pointer; }
#vivatorg-feedback-close:hover { background: #ffffff26; }
.viva-chat-intro { padding: 14px 20px; background: #f7fafb; border-bottom: 1px solid #e8eef0; flex-shrink: 0; }
.viva-chat-log { overflow-y: auto; overscroll-behavior: contain; min-height: 60px; flex: 1; padding: 18px; background: #f5f7f8; }
[data-viva-chat-admin] .viva-chat-log { min-height: 180px; max-height: 420px; margin-bottom: 14px; }
.viva-chat-message { width: fit-content; max-width: 88%; padding: 10px 13px; margin: 0 0 12px; border: 1px solid #e2e8eb; border-radius: 13px 13px 13px 3px; background: #fff; overflow-wrap: anywhere; }
.viva-chat-message--own { margin-left: auto; background: #e7f1f5; border-color: #d2e5ec; border-radius: 13px 13px 3px 13px; }
.viva-chat-message p { margin: 3px 0 5px; white-space: pre-wrap; }
.viva-chat-message strong, .viva-chat-message time { display: block; font-size: 11px; color: #526875; }
.viva-chat-status { margin: 0; padding: 7px 18px; font-size: 12px; color: #526875; flex-shrink: 0; }
.viva-chat-composer { margin: 0 !important; padding: 10px 18px 12px; border-top: 1px solid #e8eef0; flex-shrink: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.viva-chat-contacts { margin: 0 0 10px; padding: 0; border: 0; min-width: 0; }
.viva-chat-contacts legend { margin-bottom: 6px; padding: 0; font-size: 12px; font-weight: 600; }
.viva-chat-contacts input { display: block; width: 100%; height: 38px; margin: 0 0 7px; padding: 7px 10px; border: 1px solid #ccd9df; border-radius: 8px; background: #fff; color: #243543; font: inherit; font-size: 16px; }
.viva-chat-contacts input:focus { outline: 2px solid #17657e; outline-offset: 1px; }
.viva-chat-composer label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 600; }
.viva-chat .viva-chat-input { display: block; width: 100%; min-height: 64px; max-height: 120px; margin: 0; padding: 10px 12px; border: 1px solid #ccd9df; border-radius: 10px; background: #fff; color: #243543; font: inherit; font-size: 16px; resize: vertical; }
.viva-chat-input:focus { outline: 2px solid #17657e; outline-offset: 1px; }
.viva-chat-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 9px; }
.viva-chat-actions > span { font-size: 10px; color: #657984; line-height: 1.5; }
.viva-chat .viva-chat-send { border: 0; border-radius: 9px; padding: 10px 16px; background: #17657e; color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.viva-chat-send:disabled { opacity: .6; cursor: wait; }
.viva-chat-error { margin: 8px 0; color: #ac2525; font-size: 13px; }
.viva-chat-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 18px; background: #f7fafb; font-size: 10px; color: #657984; flex-shrink: 0; }
.viva-chat-reset { padding: 0; border: 0; background: transparent; color: #17657e; text-decoration: underline; font: inherit; cursor: pointer; white-space: nowrap; }
.viva-chat button:focus-visible, #vivatorg-feedback-fab:focus-visible, #vivatorg-feedback-greeting button:focus-visible { outline: 2px solid #f28a25; outline-offset: 2px; }
@media (max-width: 480px) {
    #vivatorg-feedback-fab { right: 16px; bottom: 16px; width: 54px; height: 54px; }
    #vivatorg-feedback-greeting { right: 16px; bottom: 82px; max-width: calc(100vw - 32px); }
    #vivatorg-feedback-overlay { padding: 8px; }
    #vivatorg-feedback-modal { width: 100%; height: 650px; max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); border-radius: 15px; }
    .viva-chat-header { padding: 12px 16px; }
    .viva-chat-intro { padding: 10px 16px; font-size: 13px; }
    .viva-chat-footer { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
}
@media (max-height: 480px) {
    .viva-chat-intro, .viva-chat-actions > span, .viva-chat-avatar { display: none; }
    .viva-chat-header, .viva-chat-composer { padding: 8px 14px; }
    .viva-chat .viva-chat-input { min-height: 44px; height: 44px; }
}
