﻿/* Wrapping element */
/* Set some basic padding to keep content from hitting the edges */
.body-content {
    margin-top: 15px;
    padding-left: 15px;
    padding-right: 15px;
}

/* Set widths on the form inputs since otherwise they're 100% wide */
input,
select,
textarea {
    max-width: 280px;
}

/* Responsive: Portrait tablets and up */
@media screen and (min-width: 768px) {
    .body-content {
        padding: 0;
    }
}
.sgai.hidden {
    display: none
}

.sgai {
    position: fixed;
    right: 32px;
    bottom: 96px;
    width: 380px;
    height: 70vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 16px;
    box-shadow: 0 12px 24px rgba(0,0,0,.15);
    z-index: 9999
}

.sgai-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid #eee
}

.sgai-title {
    font-weight: 700
}

#sgAiMsgs {
    flex: 1;
    overflow: auto;
    padding: 12px
}

.sgai-bar {
    display: flex;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid #eee
}

.sgai-input {
    flex: 1
}

.sgai-sel {
    width: 110px
}

.sgai-launch {
    position: fixed;
    right: 32px;
    bottom: 32px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: #1f6feb;
    color: #fff;
    font-weight: 800;
    box-shadow: 0 10px 20px rgba(0,0,0,.2);
    z-index: 9998
}

.sgai-msg {
    margin: 8px 0;
    line-height: 1.4
}

    .sgai-msg.me {
        text-align: right
    }

    .sgai-msg.ai {
        background: #f7f9fc;
        border: 1px solid #e6ecf5;
        padding: 8px 10px;
        border-radius: 10px
    }
:root {
    --sgai-bg: rgba(255,255,255,0.92);
    --sgai-blur: 10px;
    --sgai-border: #e8ebf3;
    --sgai-ink: #0b1220;
    --sgai-ink-dim: #5c6b82;
    --sgai-accent: #1f6feb; /* StoneGate blue */
    --sgai-accent-ink: #fff;
    --sgai-shadow: 0 18px 40px rgba(16,24,40,.18);
    --sgai-radius: 18px;
}

.sgai.is-hidden {
    display: none
}

.sgai {
    position: fixed;
    right: 28px;
    bottom: 96px;
    width: 420px;
    max-width: calc(100vw - 40px);
    height: 72vh;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(var(--sgai-blur));
    background: var(--sgai-bg);
    border: 1px solid var(--sgai-border);
    border-radius: var(--sgai-radius);
    box-shadow: var(--sgai-shadow);
    z-index: 9999;
    overflow: hidden;
    font-family: -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    color: var(--sgai-ink);
}

.sgai__head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 12px;
    border-bottom: 1px solid var(--sgai-border);
    background: linear-gradient(180deg, rgba(255,255,255,.65), rgba(255,255,255,.35));
}

.sgai__brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700
}

    .sgai__brand svg {
        fill: var(--sgai-accent)
    }

.sgai__scopes {
    margin-left: auto;
    display: flex;
    gap: 6px
}

.sgai__chip {
    background: #f2f5fb;
    color: #2a3550;
    border: 1px solid #e0e6f2;
    border-radius: 999px;
    font-size: .85rem;
    padding: 6px 10px;
    line-height: 1;
    transition: all .15s ease;
}

    .sgai__chip:hover {
        filter: brightness(.97)
    }

    .sgai__chip.is-active {
        background: var(--sgai-accent);
        color: var(--sgai-accent-ink);
        border-color: var(--sgai-accent)
    }

.sgai__close {
    margin-left: 8px;
    background: transparent;
    border: none;
    font-size: 22px;
    line-height: 1;
    color: #6f7a90;
    padding: 4px 6px;
    border-radius: 8px;
}

    .sgai__close:hover {
        background: rgba(0,0,0,.06)
    }

.sgai__msgs {
    flex: 1;
    overflow: auto;
    padding: 14px 14px
}

.sgai__row {
    margin: 8px 0;
    display: flex;
    gap: 10px
}

    .sgai__row.me {
        justify-content: flex-end
    }

.sgai__bubble {
    max-width: 85%;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid var(--sgai-border);
    background: #fff;
    color: var(--sgai-ink);
    box-shadow: 0 2px 6px rgba(16,24,40,.05);
}

.sgai__row.ai .sgai__bubble {
    background: #f7f9fe
}

.sgai__meta {
    font-size: .75rem;
    color: var(--sgai-ink-dim);
    margin-top: 4px
}

.sgai__composer {
    display: flex;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid var(--sgai-border);
    background: #fff
}

.sgai__input {
    flex: 1;
    border: 1px solid var(--sgai-border);
    border-radius: 12px;
    padding: 10px 12px;
    outline: none
}

    .sgai__input:focus {
        border-color: var(--sgai-accent);
        box-shadow: 0 0 0 3px rgba(31,111,235,.15)
    }

.sgai__send {
    min-width: 84px;
    border: none;
    border-radius: 12px;
    background: var(--sgai-accent);
    color: var(--sgai-accent-ink);
    font-weight: 600;
    padding: 10px 12px;
    box-shadow: 0 6px 16px rgba(31,111,235,.3);
}

    .sgai__send:hover {
        filter: brightness(.98)
    }

.sgai__launch {
    position: fixed;
    right: 28px;
    bottom: 28px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: var(--sgai-accent);
    color: #fff;
    box-shadow: 0 12px 28px rgba(31,111,235,.4);
    z-index: 9998;
    display: grid;
    place-items: center;
}

    .sgai__launch svg {
        fill: #fff
    }

.sgai__typing {
    display: inline-block;
    min-width: 36px
}

.sgai__dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin: 0 2px;
    background: #9fb4df;
    border-radius: 50%;
    animation: sgaiDots 1s infinite
}

    .sgai__dot:nth-child(2) {
        animation-delay: .15s
    }

    .sgai__dot:nth-child(3) {
        animation-delay: .3s
    }

@keyframes sgaiDots {
    0% {
        opacity: .2;
        transform: translateY(0)
    }

    50% {
        opacity: 1;
        transform: translateY(-2px)
    }

    100% {
        opacity: .2;
        transform: translateY(0)
    }
}

@media (max-width: 576px) {
    .sgai {
        right: 12px;
        left: 12px;
        width: auto;
        height: 70vh
    }
}
/* ===== STONY (namespaced) ===== */
.stony, .stony * {
    box-sizing: border-box;
    font-family: -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

.stony--hidden {
    display: none;
}

.stony {
    position: fixed;
    right: 28px;
    bottom: 92px;
    width: 420px;
    max-width: calc(100vw - 40px);
    height: 72vh;
    display: flex;
    flex-direction: column;
    background: rgba(255,255,255,.96);
    border: 1px solid #e7ebf3;
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(16,24,40,.18);
    z-index: 9999;
    overflow: hidden;
    color: #0b1220;
}

.stony__head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid #e7ebf3;
    background: linear-gradient(180deg, rgba(255,255,255,.7), rgba(255,255,255,.4));
}

.stony__brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stony__logo {
    flex: 0 0 auto;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(31,111,235,.25);
}

.stony__title {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.stony__subtitle {
    font-size: .78rem;
    color: #5d6b85;
}

.stony__chips {
    margin-left: auto;
    display: flex;
    gap: 6px;
}

.stony__chip {
    border: 1px solid #dbe3f2;
    background: #f4f7fe;
    color: #24324d;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: .85rem;
    line-height: 1;
    cursor: pointer;
    transition: all .15s ease;
}

    .stony__chip:hover {
        filter: brightness(.98);
    }

.stony__chip--active {
    background: #1f6feb;
    color: #fff;
    border-color: #1f6feb;
}

.stony__close {
    margin-left: 8px;
    background: transparent;
    border: none;
    font-size: 22px;
    line-height: 1;
    color: #6f7a90;
    padding: 2px 6px;
    border-radius: 8px;
    cursor: pointer;
}

    .stony__close:hover {
        background: rgba(0,0,0,.06);
    }

.stony__msgs {
    flex: 1;
    overflow: auto;
    padding: 14px;
    background: #fff;
}

.stony__row {
    display: flex;
    gap: 10px;
    margin: 8px 0;
}

.stony__row--me {
    justify-content: flex-end;
}

.stony__bubble {
    max-width: 85%;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid #e7ebf3;
    background: #ffffff;
    color: #0b1220;
    box-shadow: 0 2px 6px rgba(16,24,40,.05);
    font-size: .98rem;
    line-height: 1.4;
}

.stony__row--ai .stony__bubble {
    background: #f7f9ff;
}

.stony__composer {
    display: flex;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid #e7ebf3;
    background: #fff;
}

.stony__input {
    flex: 1;
    border: 1px solid #e1e6f1;
    border-radius: 12px;
    padding: 10px 12px;
    outline: none;
}

    .stony__input:focus {
        border-color: #1f6feb;
        box-shadow: 0 0 0 3px rgba(31,111,235,.15);
    }

.stony__send {
    min-width: 84px;
    border: none;
    border-radius: 12px;
    background: #1f6feb;
    color: #fff;
    font-weight: 600;
    padding: 10px 12px;
    box-shadow: 0 6px 16px rgba(31,111,235,.3);
    cursor: pointer;
}

    .stony__send:hover {
        filter: brightness(.98);
    }

.stony__launch {
    position: fixed;
    right: 28px;
    bottom: 28px;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    border: none;
    background: #1f6feb;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 14px 28px rgba(31,111,235,.45);
    z-index: 9998;
    display: grid;
    place-items: center;
}

.stony__typing {
    display: inline-block;
    min-width: 36px;
}

.stony__dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin: 0 2px;
    background: #9fb4df;
    border-radius: 50%;
    animation: stonyDots 1s infinite;
}

    .stony__dot:nth-child(2) {
        animation-delay: .15s;
    }

    .stony__dot:nth-child(3) {
        animation-delay: .30s;
    }

@keyframes stonyDots {
    0% {
        opacity: .2;
        transform: translateY(0)
    }

    50% {
        opacity: 1;
        transform: translateY(-2px)
    }

    100% {
        opacity: .2;
        transform: translateY(0)
    }
}

@media (max-width: 576px) {
    .stony {
        right: 12px;
        left: 12px;
        width: auto;
        height: 70vh;
    }
}

