article:has(#doctor-chat) > .entry-header {
    display: none;
}

.doctor-chat {
    --chat-ink: #1e1c19;
    --chat-muted: #625d56;
    --chat-border: #e5e0d8;
    --chat-paper: #f7f5f1;
    --chat-white: #fff;
    --chat-accent: #24201b;
    background: var(--chat-white);
    border: 1px solid var(--chat-border);
    border-radius: 22px;
    box-shadow: 0 16px 42px #261d140d;
    color: var(--chat-ink);
    display: grid;
    height: clamp(530px, calc(100dvh - 135px), 780px);
    margin: .75rem auto 2rem;
    max-width: 950px;
    overflow: hidden;
}

.doctor-chat *,
.doctor-chat *::before,
.doctor-chat *::after {
    box-sizing: border-box;
}

.doctor-chat [hidden] {
    display: none !important;
}

.doctor-chat--paid {
    grid-template-columns: minmax(215px, 25%) minmax(0, 1fr);
    max-width: 1090px;
}

.doctor-chat .doctor-chat__main,
.doctor-chat .doctor-chat__sidebar {
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
}

.doctor-chat__header {
    align-items: center;
    background: var(--chat-accent);
    color: var(--chat-white);
    display: flex;
    flex: none;
    gap: .8rem;
    min-height: 68px;
    padding: .7rem clamp(.9rem, 3vw, 1.6rem);
}

.doctor-chat .doctor-chat__heading {
    flex: 1;
    min-width: 0;
}

.doctor-chat .doctor-chat__heading h1 {
    color: inherit;
    font: inherit;
    font-size: 1.04rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0;
}

.doctor-chat .doctor-chat__heading p {
    font-size: .82rem;
    margin: .18rem 0 0;
    opacity: .82;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.doctor-chat .doctor-chat__account {
    color: inherit;
    font-size: .86rem;
    line-height: 1.4;
    text-decoration: underline;
    text-underline-offset: .23em;
}

.doctor-chat__mark {
    align-items: center;
    background: #eee7dc;
    border-radius: 12px;
    color: #3f3328;
    display: inline-grid;
    flex: none;
    height: 35px;
    place-items: center;
    width: 35px;
}

.doctor-chat__mark::before {
    content: '';
    height: 13px;
    width: 17px;
    border: 1.5px solid currentColor;
    border-radius: 5px 5px 5px 1px;
    background: radial-gradient(circle at 35% 50%, currentColor 1px, transparent 1.4px),
        radial-gradient(circle at 65% 50%, currentColor 1px, transparent 1.4px);
}

.doctor-chat__mark--welcome {
    border-radius: 18px;
    height: 56px;
    margin-bottom: .85rem;
    width: 56px;
}

.doctor-chat__mark--welcome::before {
    height: 20px;
    width: 26px;
}

.doctor-chat button {
    align-items: center;
    background: var(--chat-accent);
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--chat-white);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: .9rem;
    font-weight: 650;
    justify-content: center;
    line-height: 1.25;
    min-height: 42px;
    padding: .55rem .85rem;
}

.doctor-chat button:hover:not(:disabled) {
    filter: brightness(.88);
}

.doctor-chat button:disabled {
    cursor: default;
    opacity: .42;
}

.doctor-chat :focus-visible {
    outline: 2px solid #936b39;
    outline-offset: 3px;
}

.doctor-chat .doctor-chat__secondary,
.doctor-chat__conversations button,
.doctor-chat__prompts button {
    background: var(--chat-white);
    border-color: var(--chat-border);
    color: var(--chat-ink);
}

.doctor-chat__sidebar {
    background: #f3f0ea;
    border-inline-end: 1px solid var(--chat-border);
    gap: .8rem;
    padding: 1rem;
}

.doctor-chat .doctor-chat__sidebar h2 {
    color: inherit;
    font-size: 1.02rem;
    margin: 0;
}

.doctor-chat__conversations {
    flex: 1;
    list-style: none;
    margin: 0 !important;
    overflow-y: auto;
    padding: 0;
}

.doctor-chat__conversations li {
    margin: .3rem 0;
}

.doctor-chat__conversations button {
    display: block;
    font-weight: 500;
    overflow: hidden;
    text-align: start;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.doctor-chat__conversations button[aria-current] {
    background: #e8e0d4;
    border-color: #d4c7b7;
    font-weight: 650;
}

.doctor-chat button.doctor-chat__back {
    background: transparent;
    display: none;
    font-size: 1.1rem;
    margin-inline-start: -.4rem;
    padding: .5rem;
}

.doctor-chat .doctor-chat__scroll {
    background: var(--chat-paper);
    display: flex;
    flex: 1;
    flex-direction: column;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    padding: clamp(.85rem, 3vw, 1.6rem);
}

.doctor-chat .doctor-chat__welcome {
    margin: auto;
    padding: .75rem 0;
    text-align: center;
}

.doctor-chat .doctor-chat__welcome h2 {
    color: inherit;
    font-size: clamp(1.32rem, 2.6vw, 2rem);
    font-weight: 700;
    letter-spacing: -.04em;
    line-height: 1.15;
    margin: 0 0 .6rem;
}

.doctor-chat .doctor-chat__welcome p {
    color: var(--chat-muted);
    font-size: .95rem;
    line-height: 1.5;
    margin: 0 auto 1.1rem;
    max-width: 62ch;
}

.doctor-chat__prompts {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    justify-content: center;
}

.doctor-chat__prompts button {
    font-size: .83rem;
    gap: .45rem;
}

.doctor-chat__prompts button span {
    color: var(--chat-muted);
}

.doctor-chat .doctor-chat__older {
    align-self: center;
    flex: none;
    margin-bottom: .8rem;
}

.doctor-chat__thread {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    margin-inline: auto;
    max-width: 680px;
    width: 100%;
}

.doctor-chat__message {
    align-self: flex-start;
    background: var(--chat-white);
    border: 1px solid var(--chat-border);
    border-radius: 6px 17px 17px 17px;
    max-width: min(88%, 62ch);
    padding: .7rem .85rem;
}

.doctor-chat .doctor-chat__message p {
    line-height: 1.55;
    margin: 0;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.doctor-chat__message--user {
    align-self: flex-end;
    background: #e9e0d4;
    border-color: transparent;
    border-radius: 17px 6px 17px 17px;
}

.doctor-chat__message button {
    margin-top: .5rem;
}

.doctor-chat .doctor-chat__typing {
    align-items: center;
    align-self: flex-start;
    color: var(--chat-muted);
    display: flex;
    font-size: .84rem;
    gap: .5rem;
    margin: 0;
    padding: .25rem;
}

.doctor-chat__typing::before {
    animation: doctor-chat-pulse 1.3s ease-in-out infinite alternate;
    background: #806747;
    border-radius: 50%;
    content: '';
    height: .42rem;
    width: .42rem;
}

@keyframes doctor-chat-pulse {
    from { opacity: .45; }
    to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .doctor-chat__typing::before { animation: none; }
}

.doctor-chat__dock {
    border-top: 1px solid var(--chat-border);
    flex: none;
    padding: .75rem clamp(.85rem, 3vw, 1.5rem);
}

.doctor-chat__dock:not(:has([data-status]:not(:empty), [data-composer]:not([hidden]))) {
    display: none;
}

.doctor-chat__input {
    align-items: flex-end;
    background: var(--chat-white);
    border: 1px solid #c9c1b7;
    border-radius: 18px;
    display: flex;
    gap: .35rem;
    padding: .3rem;
}

.doctor-chat__input:focus-within {
    border-color: #8c7353;
}

.doctor-chat .doctor-chat__input textarea {
    background: transparent;
    border: 0;
    box-shadow: none;
    color: inherit;
    flex: 1;
    font: inherit;
    font-size: 1rem;
    line-height: 1.4;
    margin: 0;
    max-height: 124px;
    min-height: 42px;
    min-width: 0;
    outline: 0;
    padding: .65rem;
    resize: none;
}

.doctor-chat button.doctor-chat__send {
    border-radius: 13px;
    flex: none;
    font-size: 1.42rem;
    padding: .25rem;
    width: 42px;
}

.doctor-chat .doctor-chat__status,
.doctor-chat .doctor-chat__notice {
    color: var(--chat-muted);
    flex: none;
    font-size: .88rem;
    line-height: 1.4;
    margin: 0 0 .45rem;
}

.doctor-chat .doctor-chat__notice {
    margin: .65rem 1rem;
}

.doctor-chat__status:empty {
    display: none;
}

.doctor-chat__age-dialog {
    background: var(--chat-white);
    border: 1px solid var(--chat-border);
    border-radius: 16px;
    box-shadow: 0 16px 48px #261d1433;
    color: var(--chat-ink);
    padding: 1.25rem;
    width: min(26rem, calc(100% - 2rem));
}

.doctor-chat__age-dialog::backdrop {
    background: #24201b80;
}

.doctor-chat .doctor-chat__age-dialog h2 {
    color: inherit;
    font-size: 1.2rem;
    line-height: 1.25;
    margin: 0 0 .8rem;
}

.doctor-chat__age-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

.doctor-chat .doctor-chat__option {
    align-items: center;
    display: inline-flex;
    font-size: .83rem;
    gap: .4rem;
    line-height: 1.35;
}

.doctor-chat input[type="checkbox"] {
    accent-color: #5b4633;
    margin: 0;
}

.doctor-chat__payment {
    align-self: center;
    color: var(--chat-muted);
    flex: none;
    font-size: .84rem;
    margin-top: 1rem;
    max-width: 680px;
    width: 100%;
}

.doctor-chat .doctor-chat__payment summary {
    color: var(--chat-ink);
    cursor: pointer;
    font-weight: 650;
    text-decoration: underline;
    text-underline-offset: .2em;
}

.doctor-chat__offer {
    display: grid;
    gap: .7rem;
    margin-top: .65rem;
}

.doctor-chat__plan {
    background: var(--chat-white);
    border: 1px solid #ded5c8;
    border-radius: 16px;
    box-shadow: 0 4px 16px #261d140c;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(0, 235px);
    padding: clamp(.85rem, 3vw, 1.25rem);
}

.doctor-chat .doctor-chat__plan h3 {
    color: var(--chat-ink);
    font-size: 1.19rem;
    letter-spacing: -.02em;
    line-height: 1.2;
    margin: 0 0 .45rem;
}

.doctor-chat .doctor-chat__plan p {
    line-height: 1.45;
    margin: 0;
}

.doctor-chat .doctor-chat__plan ul {
    color: var(--chat-ink);
    line-height: 1.45;
    margin: .65rem 0 0;
    padding-inline-start: 1.15rem;
}

.doctor-chat__plan li + li {
    margin-top: .3rem;
}

.doctor-chat__plan li::marker {
    color: #806747;
}

.doctor-chat__plan-checkout {
    align-content: start;
    background: var(--chat-paper);
    border-radius: 12px;
    display: grid;
    gap: .55rem;
    padding: .8rem .85rem;
}

.doctor-chat .doctor-chat__plan .doctor-chat__price {
    color: var(--chat-ink);
    line-height: 1;
}

.doctor-chat__price strong {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -.045em;
}

.doctor-chat__billing-note,
.doctor-chat__test-note {
    font-size: .78rem;
}

.doctor-chat__test-note {
    background: #eee7dc;
    border-radius: 7px;
    color: #4f3b27;
    padding: .38rem .5rem;
}

.doctor-chat__terms {
    border-top: 1px solid var(--chat-border);
    grid-column: 1 / -1;
    padding-top: .7rem;
}

.doctor-chat .doctor-chat__terms p {
    margin-top: .55rem;
}

.doctor-chat__sr {
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

@media (max-width: 690px) {
    .doctor-chat {
        border-radius: 16px;
        height: clamp(500px, calc(100dvh - 105px), 770px);
        margin: 0 auto 1rem;
    }

    .doctor-chat--paid {
        display: block;
    }

    .doctor-chat--paid .doctor-chat__main,
    .doctor-chat--paid .doctor-chat__sidebar {
        height: 100%;
    }

    .doctor-chat--paid:not([data-mobile-view="list"]) [data-pane="list"],
    .doctor-chat--paid[data-mobile-view="list"] [data-pane="thread"] {
        display: none;
    }

    .doctor-chat button.doctor-chat__back {
        display: inline-flex;
    }

    .doctor-chat__prompts {
        align-items: center;
        flex-direction: column;
    }

    .doctor-chat__plan {
        grid-template-columns: minmax(0, 1fr);
    }
}
