/* اقتباس: إطار الزوايا، ولونه من لون الدردشة (--primary-color) */
#chat .public_message blockquote.q {
    --a: var(--primary-color, #B8892B);
    --tx: #1B2440;
    --bg: #FFFDF8;
    display: flex;
    flex-direction: column;
    direction: ltr;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 4px;
    width: fit-content;
    max-width: 100%;
    box-sizing: border-box;
    margin: 6px 0 8px !important;
    position: relative;
    text-align: left;
    font-family: "Amiri", serif;
    font-size: 22px;
    font-style: normal;
    font-weight: 400;
    line-height: 1.45;
    color: var(--tx, #1B2440) !important;
    padding: 10px 16px 12px !important;
    border: 0;
    border-right: 2px solid var(--a, #B8892B);
    border-left: 2px solid var(--a, #B8892B);
    border-radius: 22px;
    background-color: color-mix(in srgb, var(--a, #B8892B) 9%, var(--bg, #FFFDF8)) !important;
    background-image: none !important;
}

#chat .public_message {
    background: #ffffff;
    background-color: #ffffff;
}

#chat .public_message.linen {
    background-color: linen;
}

#chat .public_message.greeting {
    background-color: #faf0e8;
}

#chat .public_message.public_message_ad {
    background-color: #d0e7ff;
}

#chat .public_message blockquote.q::before {
    content: "\201C" !important;
    display: block !important;
    position: absolute;
    top: 2px;
    right: 12px;
    font: 400 32px/1 Georgia, serif;
    color: var(--a, #B8892B);
    opacity: .38;
}

#chat .public_message blockquote.q::after {
    content: none !important;
    display: none !important;
}

#chat .public_message blockquote.q .public_message--reply-head {
    display: inline-flex;
    flex-direction: row;
    direction: ltr;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: auto;
    max-width: 100%;
}

#chat .public_message blockquote.q .public_message--reply-head .username {
    display: inline-flex;
    flex-direction: row;
    direction: ltr;
    align-items: center;
    gap: 4px;
    max-width: 100%;
}

#chat .public_message blockquote.q .username__icon {
    order: -1;
    float: none !important;
    max-height: 18px;
    width: auto;
}

#chat .public_message blockquote.q .username__wrapper {
    direction: rtl;
}

#chat .public_message blockquote.q .public_message--reply-photo {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    object-fit: cover;
    border-radius: 2px;
    display: block;
}

#chat .public_message blockquote.q .public_message--reply-name,
#chat .public_message blockquote.q .public_message--reply-message {
    display: block;
    position: relative;
    z-index: 1;
    margin: 0;
    padding: 0;
    background: transparent !important;
    background-color: transparent !important;
    color: var(--tx, #1B2440) !important;
    white-space: normal;
    overflow-wrap: anywhere;
}

#chat .public_message blockquote.q .public_message--reply-name {
    margin: 0;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    text-align: left;
    color: var(--a, #B8892B) !important;
}

#chat .public_message blockquote.q .public_message--reply-message {
    align-self: stretch;
    font-family: "Amiri", serif;
    font-size: 22px;
    font-weight: 400;
    line-height: 1.45;
    text-align: center;
    direction: rtl;
}

#chat .public_message blockquote.q .public_message--reply-message img {
    max-height: 28px;
    width: auto;
    vertical-align: middle;
}

/* الوضع الليلي: الاقتباس يبان على الخلفية الغامقة، في العام والخاص */
html.ep-night-mode #chat .public_message blockquote.q,
html.ep-night-mode #chat .private_message blockquote.q,
html.ep-night-mode #chat #chat_box blockquote.q {
    --tx: #e7edf5;
    --bg: #1b222c;
    background-color: color-mix(in srgb, var(--a, var(--primary-color, #8ea0b8)) 18%, #1b222c) !important;
    background-image: none !important;
    color: #e7edf5 !important;
    border-right-color: var(--a, var(--primary-color, #c5d2e4));
    border-left-color: var(--a, var(--primary-color, #c5d2e4));
}

html.ep-night-mode #chat .public_message blockquote.q::before,
html.ep-night-mode #chat .private_message blockquote.q::before,
html.ep-night-mode #chat #chat_box blockquote.q::before {
    color: color-mix(in srgb, var(--a, var(--primary-color, #d5deea)) 40%, #fff) !important;
    opacity: .7;
}

html.ep-night-mode #chat .public_message blockquote.q .public_message--reply-name,
html.ep-night-mode #chat .public_message blockquote.q .public_message--reply-message,
html.ep-night-mode #chat .private_message blockquote.q .public_message--reply-name,
html.ep-night-mode #chat .private_message blockquote.q .public_message--reply-message,
html.ep-night-mode #chat #chat_box blockquote.q .public_message--reply-name,
html.ep-night-mode #chat #chat_box blockquote.q .public_message--reply-message {
    color: #e7edf5 !important;
    background: transparent !important;
    background-color: transparent !important;
}

html.ep-night-mode #chat .public_message blockquote.q .public_message--reply-name,
html.ep-night-mode #chat .private_message blockquote.q .public_message--reply-name,
html.ep-night-mode #chat #chat_box blockquote.q .public_message--reply-name {
    color: color-mix(in srgb, var(--a, var(--primary-color, #d5deea)) 35%, #fff) !important;
}

html.ep-night-mode #chat #chat__body__message-reply,
html.ep-night-mode #chat #chat_box #chat__body__message-reply {
    background: color-mix(in srgb, var(--primary-color, #8ea0b8) 18%, #1b222c) !important;
    background-color: color-mix(in srgb, var(--primary-color, #8ea0b8) 18%, #1b222c) !important;
    color: #e7edf5 !important;
    border-right: 2px solid var(--primary-color, #c5d2e4);
    border-left: 2px solid var(--primary-color, #c5d2e4);
    border-radius: 16px;
}

html.ep-night-mode #chat #chat__body__message-reply--username,
html.ep-night-mode #chat #chat__body__message-reply--message,
html.ep-night-mode #chat #chat_box #chat__body__message-reply--username,
html.ep-night-mode #chat #chat_box #chat__body__message-reply--message {
    color: #e7edf5 !important;
}
