/* Yess.Chatbot standalone only.
   The main Yess layout deliberately uses overflow:hidden for the application
   shell. Unlike the integrated host, this standalone has no scrolling yess-main
   container, so scrolling must be restored at the document level. */
html:has(body.yess-chatbot-standalone) {
    overflow-x: hidden;
    overflow-y: auto;
}

body.yess-application.yess-chatbot-standalone {
    height: auto !important;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
}

body.yess-chatbot-standalone .yess-chatbot-standalone-main {
    display: block;
    width: 100%;
    height: auto !important;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: visible !important;
    overscroll-behavior: auto !important;
}

/* The previous v1.1.1 patch forced an inner scrolling conversation.
   Let it grow so ordinary wheel/touch/PageDown scrolling works anywhere on
   the page, including over messages, instead of trapping the pointer inside
   nested scroll containers. Applies only in the standalone host. */
body.yess-chatbot-standalone .yess-conversation-log {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    overscroll-behavior: auto !important;
    scrollbar-gutter: auto;
}

body.yess-chatbot-standalone .yess-page-layout,
body.yess-chatbot-standalone .yess-page-layout__content {
    height: auto;
    min-height: 0;
    overflow: visible;
}

/* Keep the Framework layout and global styles; only the standalone language bar
   is specific to this host. Avoid overriding component themes. */
.yess-chatbot-standalone-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.1rem;
    background: var(--yess-surface, #fff);
    border-bottom: 1px solid var(--yess-border-color, #dbe2ea);
}
.yess-chatbot-standalone-toolbar__brand { color: inherit; font-weight: 700; text-decoration: none; }
.yess-chatbot-standalone-toolbar .yess-language-switcher { display: flex; gap: 0.4rem; align-items: center; }
.yess-chatbot-language-button {
    min-width: 2.8rem;
    padding: 0.45rem 0.65rem;
    border-radius: 0.55rem;
    border: 1px solid var(--yess-border-color, #dbe2ea);
    background: transparent;
    color: inherit;
    font-weight: 600;
    cursor: pointer;
}
.yess-chatbot-language-button.is-active { background: var(--yess-primary, #2563eb); color: #fff; border-color: transparent; }
.yess-chatbot-language-button:focus-visible { outline: 3px solid var(--yess-focus-color, #0d9488); outline-offset: 2px; }
@media(max-width: 500px) { .yess-chatbot-standalone-toolbar { padding: 0.6rem; } }

/* IIS demo login: follows the host's shared Yess typography and surfaces. */
.yess-chatbot-demo-login {
    display: grid;
    place-items: center;
    min-height: 90vh;
    padding: 1.5rem;
}
.yess-chatbot-demo-login__card {
    width: min(100%, 440px);
    padding: 2rem;
    border-radius: 1rem;
    background: var(--yess-surface, #fff);
    color: var(--yess-text, #252b35);
    border: 1px solid var(--yess-border, #dadde2);
    box-shadow: 0 10px 32px rgba(0, 0, 0, .08);
}
.yess-chatbot-demo-login form { display: grid; gap: .75rem; margin-top: 1.5rem; }
.yess-chatbot-demo-login input {
    width: 100%; border: 1px solid #a6a9b0; border-radius: .4rem;
    padding: .7rem; font: inherit;
}
.yess-chatbot-demo-login button {
    background: var(--yess-primary, #275dad); color: white;
    border: 0; padding: .8rem 1.1rem; border-radius: .4rem;
    cursor: pointer; font: inherit;
}
.yess-chatbot-demo-login__note { font-size: .85rem; opacity: .75; }
.yess-chatbot-demo-login .demo-error { color: #ac2424; font-weight: 600; }

/* Anne standalone branding. Integrated Yess ONE remains Yess Chatbot. */
.yess-chatbot-standalone-toolbar__brand { display: inline-flex; align-items: center; gap: .55rem; font-size: 1.12rem; }
.yess-chatbot-standalone-toolbar__avatar { width: 2.3rem; height: 2.3rem; border-radius: 50%; object-fit: cover; object-position: center 32%; background: #fff; border: 1px solid var(--yess-border-color,#dbe2ea); }
body.yess-chatbot-standalone .yess-chatbot-shell__intro-icon:has(.yess-chatbot-anne-avatar),
body.yess-chatbot-standalone .yess-chatbot-message__avatar:has(.yess-chatbot-anne-avatar) { overflow: hidden; background: #fff; }

/* Header icon of the chat page is Anne, not a FontAwesome placeholder. */
body.yess-chatbot-standalone .yess-anne-header-icon { display: inline-block; width: 2rem; height: 2rem; min-width: 2rem; background: #fff url('/images/anne-avatar.png') center 32% / cover no-repeat; border-radius: 50%; border: 1px solid var(--yess-border-color,#dbe2ea); }
body.yess-chatbot-standalone .yess-chatbot-empty-state__icon:has(.yess-chatbot-anne-avatar) { background: #fff; overflow: hidden; }
