.veda-ai-widget {
    bottom: 30px;
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    position: fixed;
    right: 30px;
    z-index: 2147480000;
}

.floating-contact-widget.veda-ai-widget {
    bottom: 30px;
    margin-bottom: 0;
    right: 30px;
    z-index: 2147480000;
}

.veda-ai-widget * {
    box-sizing: border-box;
}

.veda-ai-widget .contact-options {
    display: none !important;
}

.veda-ai-launcher {
    background: transparent;
    border: 0;
    cursor: pointer;
    display: block;
    padding: 0;
}

.veda-ai-panel {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    bottom: 150px;
    box-shadow: 0 24px 70px rgba(7, 47, 77, 0.28);
    display: flex;
    flex-direction: column;
    height: min(680px, calc(100vh - 190px));
    min-height: 520px;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    position: absolute;
    right: 0;
    transform: translateY(18px) scale(0.96);
    transform-origin: bottom right;
    transition: opacity 180ms ease, transform 180ms ease;
    width: 400px;
}

.veda-ai-widget.is-open .veda-ai-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.veda-ai-header {
    align-items: center;
    background: linear-gradient(135deg, #083f63 0%, #126a90 55%, #00a884 100%);
    color: #ffffff;
    display: flex;
    flex: 0 0 auto;
    gap: 12px;
    padding: 15px;
}

.veda-ai-logo {
    align-items: center;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 12px;
    display: flex;
    height: 42px;
    justify-content: center;
    overflow: hidden;
    width: 42px;
}

.veda-ai-logo img {
    display: block;
    height: 34px;
    object-fit: contain;
    width: 34px;
}

.veda-ai-title {
    flex: 1;
    min-width: 0;
}

.veda-ai-title strong,
.veda-ai-title span {
    display: block;
    letter-spacing: 0;
}

.veda-ai-title strong {
    font-size: 17px;
    line-height: 1.2;
}

.veda-ai-title span {
    color: rgba(255, 255, 255, 0.78);
    font-size: 12px;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.veda-ai-header-actions {
    display: flex;
    gap: 6px;
    position: relative;
}

.veda-ai-close,
.veda-ai-menu-button,
.veda-ai-send {
    align-items: center;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    height: 40px;
    justify-content: center;
    width: 40px;
}

.veda-ai-close,
.veda-ai-menu-button {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-size: 17px;
}

.veda-ai-menu {
    background: #ffffff;
    border: 1px solid #e5edf3;
    border-radius: 12px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.2);
    min-width: 174px;
    padding: 6px;
    position: absolute;
    right: 0;
    top: 46px;
    z-index: 3;
}

.veda-ai-menu button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 9px;
    color: #172033;
    cursor: pointer;
    display: flex;
    font-size: 14px;
    gap: 10px;
    padding: 10px;
    text-align: left;
    width: 100%;
}

.veda-ai-menu button:hover {
    background: #f2f7f8;
}

.veda-ai-body {
    background: #f6f8fb;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    overflow-y: auto;
    padding: 16px 16px 22px;
}

.veda-ai-message {
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    max-width: 88%;
    padding: 12px 13px;
    word-break: break-word;
}

.veda-ai-message p {
    margin: 0 0 8px;
}

.veda-ai-message p:last-child {
    margin-bottom: 0;
}

.veda-ai-message.bot {
    align-self: flex-start;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.07);
    color: #18212f;
}

.veda-ai-message.user {
    align-self: flex-end;
    background: #083f63;
    color: #ffffff;
}

.veda-ai-section-title {
    color: #0b5f7d;
    font-weight: 900;
    margin: 10px 0 5px;
}

.veda-ai-section-title:first-child {
    margin-top: 0;
}

.veda-ai-list {
    margin: 6px 0 8px;
    padding-left: 20px;
}

.veda-ai-list li {
    margin: 4px 0;
}

.veda-ai-message a {
    color: #087f72;
    font-weight: 800;
    text-decoration: none;
}

.veda-ai-message a:hover {
    text-decoration: underline;
}

.veda-ai-footer {
    background: #ffffff;
    border-top: 1px solid #e6ebf0;
    flex: 0 0 auto;
    padding: 10px 12px 12px;
}

.veda-ai-chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin-bottom: 10px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
}

.veda-ai-chip {
    background: #eef7f5;
    border: 1px solid #c8e8df;
    border-radius: 999px;
    color: #0d6657;
    cursor: pointer;
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 800;
    padding: 8px 10px;
}

.veda-ai-contact-cards,
.veda-ai-product-cards {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.veda-ai-contact-cards a,
.veda-ai-product-card {
    align-items: center;
    border-radius: 12px;
    display: flex;
    font-weight: 800;
    gap: 10px;
    padding: 10px 12px;
    text-decoration: none;
}

.veda-ai-contact-cards .whatsapp {
    background: #e8fbef;
    color: #107a42;
}

.veda-ai-contact-cards .phone {
    background: #eaf4ff;
    color: #155fa0;
}

.veda-ai-contact-cards .email {
    background: #f4edff;
    color: #6b3ba7;
}

.veda-ai-product-heading {
    color: #0b5f7d;
    font-size: 13px;
    font-weight: 900;
}

.veda-ai-product-card {
    align-items: flex-start;
    background: #f2fbf8;
    border: 1px solid #c9ebe1;
    color: #15372f;
    flex-direction: row;
    gap: 10px;
}

.veda-ai-product-card img {
    background: #fff;
    border: 1px solid #dbe8e4;
    border-radius: 10px;
    flex: 0 0 auto;
    height: 54px;
    object-fit: contain;
    width: 54px;
}

.veda-ai-product-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.veda-ai-product-card span {
    color: #526174;
    font-size: 12px;
    font-weight: 600;
}

.veda-ai-match-badge {
    align-self: flex-start;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    padding: 4px 8px;
}

.veda-ai-match-badge.exact {
    background: #dcfce7;
    color: #166534;
}

.veda-ai-match-badge.related {
    background: #fff7ed;
    color: #9a3412;
}

.veda-ai-related-warning {
    color: #9a3412;
    font-size: 11px;
    font-weight: 800;
}

.veda-ai-product-card em {
    color: #087f72;
    font-size: 12px;
    font-style: normal;
    font-weight: 900;
}

.veda-ai-product-card b {
    align-self: flex-start;
    background: #00a884;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    margin-top: 4px;
    padding: 6px 10px;
}

.veda-ai-search-card {
    background: #eef6ff;
    border-color: #cfe4ff;
}

.veda-ai-typing {
    align-items: center;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.07);
    border-radius: 16px;
    display: inline-flex;
    gap: 5px;
    padding: 12px 14px;
    width: max-content;
}

.veda-ai-typing span {
    animation: vedaAiTyping 1s infinite ease-in-out;
    background: #00a884;
    border-radius: 50%;
    height: 7px;
    width: 7px;
}

.veda-ai-typing span:nth-child(2) {
    animation-delay: 120ms;
}

.veda-ai-typing span:nth-child(3) {
    animation-delay: 240ms;
}

.veda-ai-typing small {
    color: #526174;
    font-size: 12px;
    margin-left: 5px;
}

.veda-ai-form {
    align-items: center;
    background: #f3f6f9;
    border: 1px solid #dce4eb;
    border-radius: 14px;
    display: flex;
    gap: 8px;
    padding: 6px;
}

.veda-ai-input {
    background: transparent;
    border: 0;
    color: #152033;
    flex: 1;
    font-size: 14px;
    min-width: 0;
    outline: 0;
    padding: 9px 8px;
}

.veda-ai-send {
    background: #00a884;
    color: #ffffff;
    flex: 0 0 auto;
    font-size: 16px;
}

.veda-ai-send:disabled {
    cursor: not-allowed;
    opacity: 0.58;
}

@keyframes vedaAiTyping {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.45; }
    40% { transform: translateY(-4px); opacity: 1; }
}

@media (max-width: 768px) {
    .veda-ai-widget,
    .floating-contact-widget.veda-ai-widget {
        bottom: 14px;
        margin-bottom: 0;
        right: 10px;
    }

    .veda-ai-panel {
        border-radius: 20px 20px 14px 14px;
        bottom: 108px;
        height: calc(100vh - 128px);
        min-height: 0;
        right: -2px;
        width: min(94vw, 420px);
    }

    .veda-ai-header {
        padding: 13px;
    }

    .veda-ai-message {
        max-width: 92%;
    }
}
