#eucken-assistant {
    --ea-primary: #15354a;
    --ea-accent: #245a78;
    --ea-border: #e0e6eb;
    --ea-background: #f5f7f9;

    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9990;
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #253746;
}

#eucken-assistant * {
    box-sizing: border-box;
}

#eucken-assistant [hidden] {
    display: none !important;
}

#eucken-assistant button {
    cursor: pointer;
    font-family: inherit;
}

#ea-launcher {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 0;
    border-radius: 28px;
    background: var(--ea-primary);
    color: white;
    padding: 12px 19px;
    font-size: 13px;
    font-weight: 600;
    margin-left: auto;
    box-shadow: 0 4px 16px #0002;
    transition: background .2s;
}

#ea-launcher:hover {
    background: var(--ea-accent);
}

#ea-panel {
    display: flex;
    flex-direction: column;
    width: 355px;
    max-width: calc(100vw - 40px);
    height: 490px;
    max-height: calc(100dvh - 100px);
    margin-bottom: 12px;
    background: white;
    border: 1px solid var(--ea-border);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 32px #0002;
}

.ea-header {
    background: var(--ea-primary);
    color: white;
    padding: 15px 17px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ea-heading strong {
    display: block;
    font-size: 16px;
}

.ea-heading small {
    display: block;
    font-size: 11px;
    opacity: .8;
}

#ea-close {
    border: 0;
    background: transparent;
    color: white;
    font-size: 25px;
    padding: 0 8px;
}

.ea-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 1px solid var(--ea-border);
    font-size: 11px;
}

#ea-language {
    background: white;
    border: 1px solid var(--ea-border);
    border-radius: 5px;
    padding: 4px;
    color: var(--ea-primary);
}

#ea-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 15px;
    background: var(--ea-background);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ea-message {
    max-width: 90%;
    padding: 10px 13px;
    border-radius: 11px;
    font-size: 13px;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.ea-bot {
    background: white;
    border: 1px solid var(--ea-border);
    align-self: flex-start;
}

.ea-user {
    background: var(--ea-primary);
    color: white;
    align-self: flex-end;
}

#ea-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px;
    border-top: 1px solid var(--ea-border);
}

.ea-suggestion {
    background: white;
    color: var(--ea-primary);
    border: 1px solid var(--ea-border);
    border-radius: 15px;
    padding: 6px 10px;
    font-size: 11px;
}

.ea-suggestion:hover {
    background: #edf3f7;
}

#ea-form {
    display: flex;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid var(--ea-border);
}

#ea-input {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--ea-border);
    border-radius: 9px;
    padding: 10px;
    font-size: 13px;
    color: #253746;
    background: white;
}

#ea-send {
    background: var(--ea-primary);
    color: white;
    border: 0;
    border-radius: 9px;
    padding: 8px 13px;
    font-size: 18px;
}

#ea-send:disabled {
    opacity: .5;
    cursor: wait;
}

.ea-footer {
    padding: 7px;
    text-align: center;
    font-size: 9px;
    color: #657481;
}

#eucken-assistant button:focus-visible,
#eucken-assistant input:focus-visible,
#eucken-assistant select:focus-visible {
    outline: 2px solid #3983b5;
    outline-offset: 2px;
}

@media (max-width: 480px) {
    #eucken-assistant {
        right: 12px;
        bottom: 12px;
    }

    #ea-panel {
        width: calc(100vw - 24px);
        max-width: calc(100vw - 24px);
        max-height: calc(100dvh - 90px);
    }

    #ea-launcher {
        padding: 11px 15px;
        font-size: 12px;
    }

    #ea-input {
        font-size: 16px;
    }
}


/* EUCKEN BRAND AND RESPONSIVE V1 */

#eucken-assistant .ea-header {
    gap: 10px;
    padding: 12px 14px;
}

#eucken-assistant .ea-brand-logo {
    display: block;
    width: 68px;
    height: 36px;
    object-fit: contain;
    flex-shrink: 0;
}

#eucken-assistant .ea-heading {
    flex: 1;
    min-width: 0;
}

#eucken-assistant .ea-heading strong {
    font-size: 15px;
}

#eucken-assistant #ea-panel {
    width: 355px;
    height: 460px;
    max-height: min(65vh, calc(100vh - 100px));
    max-height: min(65dvh, calc(100dvh - 100px));
}

#eucken-assistant #ea-launcher {
    padding: 10px 16px;
}

#eucken-assistant #ea-suggestions {
    max-height: 100px;
    overflow-y: auto;
}

#eucken-assistant .ea-header,
#eucken-assistant .ea-toolbar,
#eucken-assistant #ea-form,
#eucken-assistant .ea-footer {
    flex-shrink: 0;
}

@media (max-width: 480px) {
    #eucken-assistant {
        right: 10px;
        bottom: max(10px, env(safe-area-inset-bottom));
    }

    #eucken-assistant #ea-panel {
        width: min(355px, calc(100vw - 20px));
        max-height: calc(100dvh - 85px);
    }

    #eucken-assistant .ea-brand-logo {
        width: 58px;
        height: 30px;
    }

    #eucken-assistant #ea-suggestions {
        max-height: 85px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #eucken-assistant * {
        transition: none !important;
        animation: none !important;
    }
}

/* EUCKEN_CONVERSATIONAL_STYLES */

#ea-messages {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

#eucken-assistant .ea-login-link {
    display: block;
    background: #15354a;
    color: #ffffff;
    padding: 10px 14px;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    margin: 8px 0;
}

#eucken-assistant .ea-login-link:hover {
    background: #244c65;
}



/* EUCKEN_WHATSAPP_SPACING */

#eucken-assistant {
    bottom: 95px !important;
    right: 20px !important;
}

#eucken-assistant #ea-panel {
    max-height: min(65vh, calc(100vh - 165px));
    max-height: min(65dvh, calc(100dvh - 165px));
}

@media (max-width: 480px) {

    #eucken-assistant {
        bottom: calc(90px + env(safe-area-inset-bottom, 0px)) !important;
        right: 18px !important;
    }

    #eucken-assistant #ea-panel {
        max-height: calc(100dvh - 160px);
    }
}


/* EUCKEN SIMPLE MENU */

#eucken-assistant #ea-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 145px;
    overflow-y: auto;
    flex-shrink: 0;
}

#eucken-assistant .ea-suggestion {
    font-size: 11.5px;
    line-height: 1.3;
    padding: 7px 10px;
    border-radius: 8px;
    cursor: pointer;
}

#eucken-assistant .ea-login-link {
    display: inline-block;
    align-self: flex-start;
    margin: 4px 0 8px;
    padding: 7px 12px;
    border: 1px solid #15354a;
    border-radius: 8px;
    color: #15354a;
    text-decoration: none;
    font-size: 12px;
}

@media (max-width: 480px) {
    #eucken-assistant #ea-suggestions {
        max-height: 115px;
    }
}


/* EUCKEN COMPACT CONVERSATION */

#eucken-assistant #ea-messages {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    font-size: 13px;
    line-height: 1.5;
}

#eucken-assistant #ea-suggestions {
    flex: 0 0 auto !important;
    max-height: 100px !important;
    padding: 5px 8px !important;
    gap: 4px !important;
    overflow-y: auto !important;
}

#eucken-assistant #ea-suggestions[hidden] {
    display: none !important;
}

#eucken-assistant .ea-suggestion {
    font-size: 11px !important;
    line-height: 1.2 !important;
    padding: 5px 7px !important;
    min-height: 0 !important;
    margin: 0 !important;
}

#eucken-assistant #ea-menu-toggle {
    display: block;
    flex: 0 0 auto;
    width: 100%;
    background: #ffffff !important;
    color: #15354a !important;
    border: 0 !important;
    border-top: 1px solid #e1e7ec !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-size: 11px !important;
    font-weight: 600;
    line-height: 1.4;
    padding: 6px 8px !important;
    cursor: pointer;
    text-align: center;
}

#eucken-assistant #ea-menu-toggle:hover {
    background: #edf3f6 !important;
}

#eucken-assistant a.ea-login-link,
#eucken-assistant a.ea-login-link:link,
#eucken-assistant a.ea-login-link:visited,
#eucken-assistant a.ea-login-link:active {
    background: #15354a !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border: 1px solid #15354a !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    opacity: 1 !important;
}

#eucken-assistant a.ea-login-link:hover,
#eucken-assistant a.ea-login-link:focus-visible {
    background: #24536b !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

@media (max-width: 480px) {
    #eucken-assistant #ea-suggestions {
        max-height: 85px !important;
    }
}
