.junction-client-template .ticket-reply {
    display: grid;
    grid-template-columns: minmax(8.5rem, 11rem) minmax(0, 1fr);
    grid-template-areas:
        "author meta"
        "author body";
    gap: 0;
    padding: 0;
    margin: 0 0 1rem;
    border: 1px solid #e4e9f0;
    border-radius: 6px;
    background-color: #fff;
    overflow: hidden;
}

.junction-client-template .ticket-reply:has(.top-bar.staff-reply) {
    border-color: #cbe9fb;
    background-color: #fbfdff;
}

.junction-client-template .ticket-reply > .top-bar,
.junction-client-template .ticket-reply > .replier,
.junction-client-template .ticket-reply > .response {
    width: auto;
    max-width: none;
    flex: initial;
}

.junction-client-template .ticket-reply > .top-bar {
    grid-area: meta;
    padding: 1rem 1.25rem .6rem;
    margin: 0;
    border-bottom: 1px solid #e9edf3;
    border-radius: 0;
    background-color: transparent;
}

.junction-client-template .ticket-reply > .top-bar.staff-reply {
    background-color: transparent;
}

.junction-client-template .ticket-reply > .top-bar p {
    color: #64748b;
    font-size: .875rem;
    font-style: normal;
    margin: 0;
}

.junction-client-template .ticket-reply > .replier {
    grid-area: author;
    border-right: 1px solid #e4e9f0;
    background-color: #f8fafc;
    padding: 1rem;
    text-align: right;
}

.junction-client-template .ticket-reply > .top-bar.staff-reply + .replier {
    border-color: #cbe9fb;
    background-color: #f1f9ff;
}

.junction-client-template .ticket-reply > .replier > img.img-thumbnail {
    display: none;
}

.junction-client-template .ticket-reply > .replier p {
    margin: 0;
    text-align: inherit !important;
}

.junction-client-template .ticket-reply > .replier strong {
    display: block;
    color: #334155;
    line-height: 1.25;
}

.junction-client-template .ticket-reply > .replier small {
    display: inline-block;
    margin-top: .35rem;
    color: #64748b;
    font-size: .75rem;
    line-height: 1.2;
}

.junction-client-template .ticket-reply > .top-bar:not(.staff-reply) + .replier p::after {
    content: "Client";
    display: inline-block;
    margin-top: .35rem;
    color: #64748b;
    font-size: .75rem;
    line-height: 1.2;
}

.junction-client-template .ticket-reply > .response {
    grid-area: body;
    padding: 1rem 1.25rem;
    margin-top: 0;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.junction-client-template .ticket-reply > .response img {
    max-width: 100%;
    height: auto;
}

.junction-client-template .ticket-reply > .response .attachments span {
    display: inline-block;
    padding-right: 10px;
    margin-bottom: .35rem;
}

.junction-client-template .card .ticket-reply p {
    margin-bottom: 1rem;
}

@media (max-width: 767.98px) {
    .junction-client-template .ticket-reply {
        grid-template-columns: 1fr;
        grid-template-areas:
            "author"
            "meta"
            "body";
    }

    .junction-client-template .ticket-reply > .replier {
        border-right: none;
        border-bottom: 1px solid #e4e9f0;
        text-align: left;
    }

    .junction-client-template .ticket-reply > .top-bar.staff-reply + .replier {
        border-color: #cbe9fb;
    }

    .junction-client-template .ticket-reply > .top-bar,
    .junction-client-template .ticket-reply > .response {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
