/**
 * Arabic RTL overrides for PWS Voice Chat / PWS AI Chat.
 */

#pws-chat-widget[dir="rtl"] .pws-chat-panel {
    direction: rtl;
}

#pws-chat-widget[dir="rtl"] .pws-chat-bubble-wrap {
    direction: ltr !important;
    flex-direction: row !important;
}

#pws-chat-widget[dir="rtl"] .pws-chat-header {
    direction: rtl;
    flex-direction: row;
}

#pws-chat-widget[dir="rtl"] .pws-chat-header-info {
    direction: rtl;
    flex-direction: row;
    text-align: right;
}

#pws-chat-widget[dir="rtl"] .pws-chat-name,
#pws-chat-widget[dir="rtl"] .pws-chat-status {
    text-align: right;
}

#pws-chat-widget[dir="rtl"] .pws-chat-messages {
    direction: ltr;
}

#pws-chat-widget[dir="rtl"] .pws-message-content {
    direction: rtl;
    text-align: right;
    unicode-bidi: plaintext;
}

#pws-chat-widget[dir="rtl"] .pws-message-user {
    align-self: flex-end;
}

#pws-chat-widget[dir="rtl"] .pws-message-bot {
    align-self: flex-start;
    align-items: flex-start;
    flex-direction: column;
}

#pws-chat-widget[dir="rtl"] .pws-message-user .pws-message-content {
    border-bottom-right-radius: 14px;
    border-bottom-left-radius: 4px;
}

#pws-chat-widget[dir="rtl"] .pws-message-bot .pws-message-content {
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 4px;
}

#pws-chat-widget[dir="rtl"] .pws-chat-form {
    direction: rtl;
    flex-direction: row;
}

#pws-chat-widget[dir="rtl"] .pws-chat-input {
    direction: rtl;
    text-align: right;
}

#pws-chat-widget[dir="rtl"] .pws-chat-send svg {
    transform: scaleX(-1);
    transform-origin: center;
}

#pws-chat-widget[dir="rtl"] .pws-chat-voice-status {
    direction: rtl;
    text-align: right;
}

#pws-chat-widget[dir="rtl"] .pws-chat-voice-status.is-recording {
    justify-content: flex-start;
}

#pws-chat-widget[dir="rtl"] .pws-chat-replay {
    direction: rtl;
    white-space: nowrap;
    width: max-content;
}

#pws-chat-widget[dir="rtl"] .pws-chat-footer,
#pws-chat-widget[dir="rtl"] .pws-chat-invite {
    direction: rtl;
    text-align: right !important;
}
