:root {
    --pregna-purple: #8f86e8;
    --pregna-pink: #ffaaa9;
    --pregna-ink: #25233a;
    --pregna-muted: #77758a;
    --pregna-soft: #f8f6ff;
}

.pregna-chatbot, .pregna-chatbot * { box-sizing: border-box; }

.pregna-chatbot {
    position: fixed;
    right: 22px;
    bottom: 300px;
    z-index: 10050;
    font-family: "SF Pro Display", "Segoe UI", Arial, sans-serif;
}

.pregna-chatbot__launcher {
    width: 68px;
    height: 68px;
    border: 0;
    border-radius: 50%;
    padding: 5px;
    cursor: pointer;
    position: relative;
    background: linear-gradient(135deg, var(--pregna-purple), var(--pregna-pink));
    box-shadow: 0 14px 35px rgba(74, 57, 119, .3);
    transition: transform .25s ease;
}

.pregna-chatbot__launcher:hover { transform: translateY(-3px) scale(1.03); }

.pregna-chatbot__launcher-ring {
    position: absolute;
    inset: -7px;
    border: 2px solid rgba(143, 134, 232, .35);
    border-radius: 50%;
    animation: pregnaPulse 2.2s infinite;
}

.pregna-chatbot__launcher-avatar,
.pregna-chatbot__avatar {
    display: grid;
    place-items: center;
    overflow: hidden;
    background: white;
    border-radius: 50%;
}

.pregna-chatbot__launcher-avatar { width: 58px; height: 58px; }
.pregna-chatbot__launcher-avatar img { width: 49px; height: auto; }

.pregna-chatbot__launcher-badge {
    position: absolute;
    right: -2px;
    top: -4px;
    width: 23px;
    height: 23px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: white;
    background: #ef476f;
    border: 3px solid white;
    font-size: 11px;
    font-weight: 700;
}

.pregna-chatbot__teaser {
    position: absolute;
    right: 80px;
    bottom: 7px;
    width: 235px;
    text-align: left;
    border: 0;
    border-radius: 18px 18px 4px 18px;
    padding: 13px 16px;
    background: white;
    color: var(--pregna-ink);
    box-shadow: 0 12px 35px rgba(35, 29, 55, .18);
    cursor: pointer;
    animation: pregnaFloat 4s ease-in-out infinite;
}

.pregna-chatbot__teaser strong,
.pregna-chatbot__teaser span { display: block; }
.pregna-chatbot__teaser strong { font-size: 14px; margin-bottom: 3px; }
.pregna-chatbot__teaser span { color: var(--pregna-muted); font-size: 12px; }

.pregna-chatbot__panel {
    position: absolute;
    right: 0;
    bottom: 82px;
    width: min(390px, calc(100vw - 28px));
    height: min(650px, calc(100vh - 125px));
    border-radius: 24px;
    overflow: hidden;
    background: white;
    box-shadow: 0 25px 70px rgba(42, 32, 73, .28);
    border: 1px solid rgba(143, 134, 232, .16);
    transform-origin: right bottom;
    animation: pregnaOpen .25s ease-out;
}

.pregna-chatbot__panel[hidden] { display: none; }

.pregna-chatbot__header {
    min-height: 78px;
    padding: 14px 16px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background:
        radial-gradient(circle at 85% 10%, rgba(255,255,255,.2), transparent 34%),
        linear-gradient(135deg, #8176df, #d990bc 58%, #ffaaa9);
}

.pregna-chatbot__identity { display: flex; align-items: center; gap: 11px; }
.pregna-chatbot__avatar { width: 48px; height: 48px; border: 2px solid rgba(255,255,255,.75); }
.pregna-chatbot__avatar img { width: 42px; height: auto; }
.pregna-chatbot__identity strong { display: block; font-size: 16px; }
.pregna-chatbot__identity small { display: flex; align-items: center; gap: 6px; opacity: .92; margin-top: 3px; }
.pregna-chatbot__identity small i { width: 7px; height: 7px; border-radius: 50%; background: #6ff0a1; }

.pregna-chatbot__header-actions { display: flex; gap: 5px; }
.pregna-chatbot__header-actions button {
    border: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,.14);
    color: white;
    cursor: pointer;
    font-size: 22px;
}

.pregna-chatbot__body {
    height: calc(100% - 114px);
    overflow-y: auto;
    padding: 18px 14px 24px;
    background:
        linear-gradient(rgba(250,249,255,.93), rgba(250,249,255,.93)),
        radial-gradient(circle at 10% 20%, #e7e3ff 0 2px, transparent 3px);
}

.pregna-chatbot__row { display: flex; margin: 8px 0; animation: pregnaMessage .2s ease-out; }
.pregna-chatbot__row--user { justify-content: flex-end; }

.pregna-chatbot__bubble {
    max-width: 88%;
    padding: 11px 13px;
    border-radius: 16px 16px 16px 5px;
    background: white;
    color: var(--pregna-ink);
    font-size: 13px;
    line-height: 1.45;
    box-shadow: 0 5px 18px rgba(51, 43, 78, .08);
}

.pregna-chatbot__row--user .pregna-chatbot__bubble {
    color: white;
    background: linear-gradient(135deg, var(--pregna-purple), #ac87d9);
    border-radius: 16px 16px 5px 16px;
}

.pregna-chatbot__bubble p { margin: 0 0 6px; }
.pregna-chatbot__bubble p:last-child { margin-bottom: 0; }

.pregna-chatbot__options { display: grid; gap: 8px; margin: 12px 0 4px; }
.pregna-chatbot__option {
    display: flex;
    gap: 10px;
    align-items: center;
    width: 100%;
    border: 1px solid #e6e1f6;
    border-radius: 13px;
    background: white;
    padding: 10px 12px;
    text-align: left;
    color: var(--pregna-ink);
    font-size: 13px;
    cursor: pointer;
    transition: .2s ease;
}
.pregna-chatbot__option:hover { border-color: var(--pregna-purple); transform: translateX(2px); background: #fbfaff; }
.pregna-chatbot__option span:first-child { font-size: 18px; }

.pregna-chatbot__form { margin-top: 12px; display: grid; gap: 8px; }
.pregna-chatbot__form input,
.pregna-chatbot__search input {
    width: 100%;
    border: 1px solid #ded9ed;
    border-radius: 11px;
    padding: 11px 12px;
    outline: none;
    color: var(--pregna-ink);
    background: white;
}
.pregna-chatbot__form input:focus,
.pregna-chatbot__search input:focus { border-color: var(--pregna-purple); box-shadow: 0 0 0 3px rgba(143,134,232,.1); }

.pregna-chatbot__form-actions,
.pregna-chatbot__search { display: flex; gap: 8px; }
.pregna-chatbot__primary,
.pregna-chatbot__secondary {
    border: 0;
    border-radius: 11px;
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 600;
}
.pregna-chatbot__primary { color: white; background: linear-gradient(135deg, var(--pregna-purple), var(--pregna-pink)); flex: 1; }
.pregna-chatbot__secondary { color: var(--pregna-muted); background: #eeebf6; }
.pregna-chatbot__search { margin-top: 10px; }
.pregna-chatbot__search .pregna-chatbot__primary { flex: 0 0 auto; }

.pregna-chatbot__link {
    display: block;
    color: #6d61cf;
    font-weight: 600;
    text-decoration: none;
    margin-top: 6px;
}
.pregna-chatbot__link:hover { text-decoration: underline; }
.pregna-chatbot__notice { color: #a64a5d; background: #fff1f3; border: 1px solid #ffd8df; padding: 9px; border-radius: 10px; margin-bottom: 8px; }

.pregna-chatbot__typing { display: flex; gap: 4px; align-items: center; min-width: 52px; }
.pregna-chatbot__typing i { width: 7px; height: 7px; background: #aaa4bb; border-radius: 50%; animation: pregnaTyping 1s infinite; }
.pregna-chatbot__typing i:nth-child(2) { animation-delay: .14s; }
.pregna-chatbot__typing i:nth-child(3) { animation-delay: .28s; }

.pregna-chatbot__footer {
    height: 36px;
    padding: 0 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eeeaf6;
    color: #9994a8;
    font-size: 9px;
    background: white;
}
.pregna-chatbot__footer a { color: #7569d1; font-weight: 700; text-decoration: none; }

@keyframes pregnaPulse { 0% { transform: scale(.92); opacity: .8; } 70%,100% { transform: scale(1.25); opacity: 0; } }
@keyframes pregnaFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes pregnaOpen { from { opacity: 0; transform: translateY(15px) scale(.95); } }
@keyframes pregnaMessage { from { opacity: 0; transform: translateY(5px); } }
@keyframes pregnaTyping { 0%,60%,100% { transform: translateY(0); } 30% { transform: translateY(-4px); } }

@media (max-width: 600px) {
    .pregna-chatbot { right: 14px; bottom: 285px; }
    .pregna-chatbot__teaser { display: none; }
    .pregna-chatbot__panel {
        position: fixed;
        inset: 10px;
        width: auto;
        height: auto;
        border-radius: 20px;
    }
}
