#appy-support-root {
    position: fixed;
    z-index: 99999;
    bottom: 20px;
    right: 109px;
    font-family: Arial, Helvetica, sans-serif;
    overflow: visible;
}

.appy-launcher {
    position: relative;
    border: none;
    padding: 0;
    cursor: pointer;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible;
    transition: transform 0.2s ease;
}

.appy-launcher:hover {
    transform: translateY(-2px);
}

.appy-launcher-widget-img,
.appy-launcher-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    overflow: visible;
}

.appy-launcher-bubble {
    position: relative;
    max-width: 160px;
    padding: 7px 12px;
    background: #ffffff;
    color: #1e293b;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
    border: 1px solid #e2ecff;
    white-space: nowrap;
}

.appy-launcher-bubble::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 22px;
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-right: 1px solid #e2ecff;
    border-bottom: 1px solid #e2ecff;
    transform: rotate(45deg);
    box-shadow: 3px 3px 6px rgba(15, 23, 42, 0.06);
}

.appy-launcher-icon {
    width: 72px;
    height: 72px;
    object-fit: contain;
    display: block;
    border-radius: 50%;
    background: transparent !important;
    border: none;
    box-shadow: none;
}

.appy-launcher-badge {
    display: none !important;
    position: absolute;
    top: 28px;
    right: 2px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 22px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.45);
    z-index: 2;
}

.appy-launcher-badge.appy-badge-visible {
    display: block !important;
}

.appy-panel {
    display: none;
    position: absolute;
    bottom: 100px;
    right: 0;
    width: 360px;
    max-width: calc(100vw - 40px);
    height: 480px;
    max-height: calc(100vh - 200px);
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
    flex-direction: column;
    overflow: hidden;
}

.appy-panel.appy-open {
    display: flex;
}

.appy-panel-header {
    background: linear-gradient(135deg, #1B4FD8 0%, #2563EB 100%);
    color: #fff;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.appy-panel-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.appy-header-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: contain;
    background: #fff;
    padding: 2px;
}

.appy-panel-title {
    font-weight: 700;
    font-size: 16px;
    line-height: 1.2;
}

.appy-panel-subtitle {
    font-size: 11px;
    opacity: 0.9;
}

.appy-panel-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

#appy-support-root .appy-whatsapp-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    text-decoration: none !important;
}

#appy-support-root .appy-whatsapp-btn:hover {
    transform: scale(1.08);
    background: transparent !important;
}

#appy-support-root .appy-whatsapp-icon {
    width: 36px !important;
    height: 36px !important;
    display: block !important;
    object-fit: contain !important;
    background: transparent !important;
    filter: none !important;
}

.appy-close-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    width: 32px;
    height: 32px;
    padding: 0;
}

.appy-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    background: #f8fafc;
}

.appy-msg {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    align-items: flex-end;
}

.appy-msg-user {
    flex-direction: row-reverse;
}

.appy-msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: contain;
    background: #eef4ff;
}

.appy-msg-bubble {
    max-width: 78%;
    padding: 10px 12px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.45;
    word-wrap: break-word;
}

.appy-msg-text {
    white-space: pre-wrap;
}

.appy-msg-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}

.appy-msg-link-btn {
    display: inline-block;
    background: #1B4FD8;
    color: #fff !important;
    text-decoration: none !important;
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
}

.appy-msg-link-btn:hover {
    background: #1640b8;
    color: #fff !important;
}

.appy-msg-assistant .appy-msg-link-btn,
.appy-msg-admin .appy-msg-link-btn {
    background: #1B4FD8;
}

.appy-msg-assistant .appy-msg-bubble {
    background: #e0edff;
    color: #1e293b;
    border-bottom-left-radius: 4px;
}

.appy-msg-admin .appy-msg-bubble {
    background: #dbeafe;
    color: #1e293b;
    border: 1px solid #93c5fd;
    border-bottom-left-radius: 4px;
}

.appy-msg-user .appy-msg-bubble {
    background: #1B4FD8;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.appy-msg-thinking .appy-msg-bubble {
    background: #e0edff;
    color: #64748b;
    font-style: italic;
}

.appy-panel-footer {
    padding: 10px 12px;
    border-top: 1px solid #e2e8f0;
    background: #fff;
    flex-shrink: 0;
}

.appy-form {
    display: flex;
    gap: 8px;
}

.appy-input {
    flex: 1;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 14px;
    outline: none;
}

.appy-input:focus {
    border-color: #2563EB;
}

.appy-send-btn {
    background: #1B4FD8;
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.appy-send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    #appy-support-root {
        right: 20px;
    }
    .appy-panel {
        width: calc(100vw - 24px);
        right: -10px;
        bottom: 95px;
    }
    .appy-launcher-bubble {
        font-size: 11px;
        max-width: 140px;
        padding: 6px 10px;
    }
    .appy-launcher-icon {
        width: 64px;
        height: 64px;
    }
}
