.eco-support-assistant {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1048;
    font-family: inherit;
}

.eco-support-assistant[hidden] {
    display: none !important;
}

.eco-support-launcher {
    border: 0;
    border-radius: 8px;
    background: #f50073;
    color: #fff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
    padding: 0.78rem 1rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.eco-support-icon {
    display: block;
    width: 1em;
    height: 1em;
    fill: currentColor;
    flex: 0 0 auto;
}

.eco-support-launcher:hover,
.eco-support-launcher:focus {
    background: #d90066;
    color: #fff;
}

.eco-support-panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 12px);
    width: min(390px, calc(100vw - 24px));
    max-height: min(650px, calc(100vh - 120px));
    background: #fff;
    color: #1f2937;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
    overflow: hidden;
    display: none;
}

.eco-support-assistant.is-open .eco-support-panel {
    display: flex;
    flex-direction: column;
}

.eco-support-header {
    background: #f50073;
    color: #fff;
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.eco-support-title {
    font-weight: 900;
    margin: 0;
    font-size: 1rem;
}

.eco-support-close {
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-radius: 8px;
    width: 34px;
    height: 34px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.eco-support-messages {
    padding: 1rem;
    overflow-y: auto;
    flex: 1 1 auto;
    background: #f8fafc;
}

.eco-support-contact {
    padding: 1rem;
    background: #fff;
}

.eco-support-contact[hidden],
.eco-support-chat[hidden] {
    display: none !important;
}

.eco-support-contact-copy {
    margin: 0 0 0.8rem;
    color: #667085;
    font-size: 0.86rem;
    line-height: 1.4;
}

.eco-support-contact-fields {
    display: grid;
    gap: 0.55rem;
}

.eco-support-contact-fields input {
    border: 1px solid rgba(0, 0, 0, 0.16);
    border-radius: 8px;
    padding: 0.62rem 0.72rem;
    font-size: 0.9rem;
}

.eco-support-contact-save {
    width: 100%;
    margin-top: 0.7rem;
    border: 0;
    border-radius: 8px;
    background: #f50073;
    color: #fff;
    padding: 0.68rem 0.8rem;
    font-weight: 800;
}

.eco-support-contact-error {
    min-height: 1rem;
    margin-top: 0.45rem;
    color: #b42318;
    font-size: 0.78rem;
    font-weight: 700;
}

.eco-support-chat {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.eco-support-message {
    margin-bottom: 0.8rem;
    display: flex;
}

.eco-support-message.user {
    justify-content: flex-end;
}

.eco-support-bubble {
    max-width: 86%;
    border-radius: 8px;
    padding: 0.72rem 0.85rem;
    font-size: 0.9rem;
    line-height: 1.45;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    white-space: pre-wrap;
}

.eco-support-message.user .eco-support-bubble {
    background: #f50073;
    color: #fff;
    border-color: #f50073;
}

.eco-support-message.assistant .eco-support-bubble {
    color: #253041;
}

.eco-support-answer-link {
    color: #f50073;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.eco-support-form {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding: 0.75rem;
    background: #fff;
}

.eco-support-input-row {
    display: flex;
    gap: 0.5rem;
}

.eco-support-input {
    flex: 1 1 auto;
    min-width: 0;
    border: 1px solid rgba(0, 0, 0, 0.16);
    border-radius: 8px;
    padding: 0.68rem 0.75rem;
    resize: none;
    max-height: 120px;
    font-size: 0.9rem;
}

.eco-support-send {
    border: 0;
    border-radius: 8px;
    background: #f50073;
    color: #fff;
    width: 44px;
    flex: 0 0 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.eco-support-send:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.eco-support-footer {
    display: flex;
    justify-content: space-between;
    gap: 0.7rem;
    align-items: center;
    margin-top: 0.55rem;
    color: #667085;
    font-size: 0.72rem;
}

.eco-support-footer a {
    color: #f50073;
    font-weight: 800;
    text-decoration: none;
}

[data-theme="dark"] .eco-support-panel,
[data-theme="dark"] .eco-support-form,
[data-theme="dark"] .eco-support-bubble,
[data-theme="dark"] .eco-support-contact {
    background: #1f2937;
    color: #f8fafc;
    border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .eco-support-messages {
    background: #111827;
}

[data-theme="dark"] .eco-support-input {
    background: #111827;
    color: #f8fafc;
    border-color: rgba(255, 255, 255, 0.18);
}

[data-theme="dark"] .eco-support-contact-fields input {
    background: #111827;
    color: #f8fafc;
    border-color: rgba(255, 255, 255, 0.18);
}

@media (max-width: 640px) {
    .eco-support-assistant {
        right: 10px;
        bottom: 10px;
    }

    .eco-support-panel {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: 74px;
        width: auto;
        max-height: calc(100vh - 96px);
    }

    .eco-support-launcher {
        padding: 0.7rem 0.85rem;
    }
}
