.main .chatbox > .footer > .editor .rich_text_toolbar .rte_btn.rte_open_extended_editor
{
width: 38px;
height: 34px;
background: linear-gradient(135deg, var(--chat-window-nonary-bg-color), var(--chat-window-nonary-bg-color));
color: var(--chat-window-secondary-text-color);
border-radius: 8px;
font-weight: 700;
box-shadow: 0 1px 4px rgba(0,0,0,0.10);
transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.main .chatbox > .footer > .editor .rich_text_toolbar .rte_btn.rte_open_extended_editor:hover
{
transform: scale(1.07);
box-shadow: 0 2px 8px rgba(0,0,0,0.16);
opacity: 0.92;
}

.main .extended_editor_panel .ext_editor_body .note-editor .note-toolbar .note-btn-group
{
position: relative;
display: inline-flex;
align-items: center;
vertical-align: middle;
flex-shrink: 0;
}

.main .extended_editor_panel .ext_editor_body .note-editor .note-toolbar .note-btn
{
background: transparent;
border: 1px solid transparent;
border-radius: 5px;
color: var(--info-panel-primary-text-color, #374151);
padding: 4px 6px;
font-size: 13px;
cursor: pointer;
transition: background 0.15s, border-color 0.15s, color 0.15s;
line-height: 1;
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 28px;
height: 28px;
box-sizing: border-box;
outline: none;
}

.main .extended_editor_panel .ext_editor_body .note-editor .note-toolbar .note-btn:hover
{
background: var(--info-panel-secondary-bg-color, #f3f4f6);
border-color: var(--info-panel-primary-border-color, #e5e7eb);
}

.main .extended_editor_panel .ext_editor_body .note-editor .note-toolbar .note-btn.active,
.main .extended_editor_panel .ext_editor_body .note-editor .note-toolbar .note-btn:active
{
background: var(--info-panel-secondary-bg-color, #e5e7eb);
border-color: var(--info-panel-primary-border-color, #d1d5db);
color: var(--info-panel-primary-text-color, #111827);
}

.main .extended_editor_panel .ext_editor_body .note-editor .note-toolbar .note-btn i
{
font-size: 14px;
line-height: 1;
}

.main .extended_editor_panel .ext_editor_body .note-editor .note-toolbar .note-btn svg
{
width: 14px;
height: 14px;
flex-shrink: 0;
}

.main .extended_editor_panel .ext_editor_body .note-editor .note-toolbar .note-btn .note-icon-caret
{
margin-left: 2px;
font-size: 10px;
}

.main .extended_editor_panel .ext_editor_body .note-editor .note-toolbar .note-btn .note-current-fontsize
{
font-size: 12px;
margin-right: 2px;
}

.main .extended_editor_panel .ext_editor_body .note-editor .note-toolbar .note-color .note-btn .note-recent-color
{
display: block;
width: 14px;
height: 3px;
margin-top: 1px;
border-radius: 1px;
}

.main .extended_editor_panel .ext_editor_body .note-editor .note-toolbar .note-dropdown-menu a,
.main .extended_editor_panel .ext_editor_body .note-editor .note-toolbar .note-dropdown-menu .note-dropdown-item
{
display: block;
padding: 6px 12px;
color: var(--info-panel-primary-text-color, #374151);
text-decoration: none;
cursor: pointer;
font-size: 13px;
border-radius: 4px;
transition: background 0.12s;
}

.main .extended_editor_panel .ext_editor_body .note-editor .note-toolbar .note-dropdown-menu a:hover,
.main .extended_editor_panel .ext_editor_body .note-editor .note-toolbar .note-dropdown-menu .note-dropdown-item:hover
{
background: var(--info-panel-secondary-bg-color, #f3f4f6);
}

.main .extended_editor_panel .ext_editor_body .note-editor .note-toolbar .note-dropdown-menu .note-dimension-picker
{
font-size: 0;
}

.main .extended_editor_panel .ext_editor_body .note-editor .note-toolbar .note-dropdown-menu .note-dimension-picker .note-dimension-picker-mousecatcher
{
position: absolute !important;
z-index: 2;
width: 100%;
height: 100%;
cursor: pointer;
}

.main .extended_editor_panel .ext_editor_body .note-editor .note-toolbar .note-dropdown-menu .note-dimension-picker .note-dimension-picker-unhighlighted
{
width: 175px;
height: 175px;
overflow: hidden;
}

.main .extended_editor_panel .ext_editor_body .note-editor .note-toolbar .note-dropdown-menu .note-dimension-picker .note-dimension-picker-highlighted
{
position: absolute;
z-index: 1;
border: 1px solid var(--info-panel-tertiary-bg-color, #6366f1);
}

.main .extended_editor_panel .ext_editor_body .note-editor .note-toolbar .note-dropdown-menu .note-dimension-display
{
text-align: center;
font-size: 12px;
color: var(--info-panel-primary-text-color, #6b7280);
margin-top: 4px;
}

.main .extended_editor_panel .ext_editor_body .note-editor .note-toolbar .note-dropdown-menu
{
display: none;
position: absolute;
top: calc(100% + 4px);
left: 0;
z-index: 100;
background: var(--info-panel-primary-bg-color);
border: 1px solid var(--info-panel-primary-border-color);
border-radius: 8px;
box-shadow: 0 8px 24px rgba(0,0,0,0.12);
padding: 8px;
min-width: 200px;
max-width: calc(100vw - 32px);
box-sizing: border-box;
}

.main .extended_editor_panel .ext_editor_body .note-editor .note-toolbar .note-dropdown-menu.show
{
display: block;
}

.main .extended_editor_panel .ext_editor_body .note-editor .note-toolbar .note-color .note-palette
{
margin-bottom: 6px;
}

.main .extended_editor_panel .ext_editor_body .note-editor .note-toolbar .note-color .note-palette-title
{
font-size: 12px;
font-weight: 600;
margin-bottom: 4px;
color: var(--info-panel-primary-text-color);
}

.main .extended_editor_panel .ext_editor_body .note-editor .note-toolbar .note-color .note-color-btn
{
width: 20px;
height: 20px;
border: 1px solid rgba(0,0,0,0.1);
border-radius: 3px;
padding: 0;
margin: 1px;
cursor: pointer;
}

.main .extended_editor_panel .ext_editor_body .note-editor .note-toolbar .note-color .note-color-btn:hover
{
transform: scale(1.15);
box-shadow: 0 0 3px rgba(0,0,0,0.2);
}

.main .extended_editor_panel .ext_editor_body .note-editor .note-toolbar .note-color .note-color-reset
{
font-size: 12px;
padding: 3px 8px;
margin-bottom: 4px;
border-radius: 4px;
cursor: pointer;
background: var(--info-panel-secondary-bg-color);
border: 1px solid var(--info-panel-primary-border-color);
color: var(--info-panel-primary-text-color);
}

.main .extended_editor_panel .ext_editor_body .note-editor .note-toolbar .note-color .note-color-select
{
font-size: 12px;
padding: 3px 8px;
margin-top: 4px;
border-radius: 4px;
cursor: pointer;
background: var(--info-panel-secondary-bg-color);
border: 1px solid var(--info-panel-primary-border-color);
color: var(--info-panel-primary-text-color);
}

.main .extended_editor_panel .ext_editor_body .note-editor .note-toolbar .ext-changecase-dropdown
{
right: 0;
left: auto;
min-width: 160px;
max-width: 180px;
}

.main .chatbox > .contents > .chat_messages > ul > li.postcard_message > div > .right > .postcard_bubble > .postcard_text
{
overflow: visible !important;
max-height: none !important;
clip: auto !important;
clip-path: none !important;
}

.main .chatbox > .contents > .chat_messages > ul > li.postcard_message.excerpt > div > .right > .postcard_bubble > .postcard_text
{
overflow: hidden !important;
max-height: 250px !important;
}

.main .chatbox > .contents > .chat_messages > ul > li.postcard_message > div > .right > .postcard_bubble > .postcard_text img,
.main .chatbox > .contents > .chat_messages > ul > li.postcard_message > div > .right > .postcard_bubble > .postcard_text .ext_editor_postcard img
{
max-width: 100% !important;
border-radius: 6px;
margin: 6px 0;
display: block !important;
height: auto !important;
visibility: visible !important;
opacity: 1 !important;
clip: auto !important;
clip-path: none !important;
position: static !important;
}

.main .chatbox > .contents > .chat_messages > ul > li.postcard_message > div > .right > .postcard_bubble > .postcard_text video,
.main .chatbox > .contents > .chat_messages > ul > li.postcard_message > div > .right > .postcard_bubble > .postcard_text .ext_editor_postcard video
{
max-width: 100% !important;
border-radius: 6px;
margin: 6px 0;
display: block !important;
height: auto !important;
visibility: visible !important;
opacity: 1 !important;
clip: auto !important;
clip-path: none !important;
position: static !important;
}

.main .chatbox > .contents > .chat_messages > ul > li.postcard_message > div > .right > .postcard_bubble > .postcard_text .postcard_sticker_row,
.main .chatbox > .contents > .chat_messages > ul > li.postcard_message > div > .right > .postcard_bubble > .postcard_text .ext_editor_postcard .postcard_sticker_row
{
display: flex !important;
flex-wrap: wrap;
gap: 8px;
padding: 6px 0;
clear: both;
align-items: center;
visibility: visible !important;
opacity: 1 !important;
}

.main .chatbox > .contents > .chat_messages > ul > li.postcard_message > div > .right > .postcard_bubble > .postcard_text .postcard_sticker_row .postcard_sticker_item,
.main .chatbox > .contents > .chat_messages > ul > li.postcard_message > div > .right > .postcard_bubble > .postcard_text .ext_editor_postcard .postcard_sticker_row .postcard_sticker_item
{
display: inline-block !important;
font-size: 52px;
line-height: 1;
cursor: default;
position: relative;
visibility: visible !important;
opacity: 1 !important;
}

.main .chatbox > .contents > .chat_messages > ul > li.postcard_message > div > .right > .postcard_bubble > .postcard_text .postcard_emoji_inline,
.main .chatbox > .contents > .chat_messages > ul > li.postcard_message > div > .right > .postcard_bubble > .postcard_text .ext_editor_postcard .postcard_emoji_inline
{
display: inline-block !important;
font-size: 26px;
line-height: 1.2;
vertical-align: middle;
cursor: default;
margin: 0 1px;
visibility: visible !important;
opacity: 1 !important;
}

.main .chatbox > .contents > .chat_messages > ul > li.postcard_message > div > .right > .postcard_bubble > .postcard_text .sticker_delete_btn
{
display: none !important;
}

.main .chatbox > .contents > .chat_messages > ul > li.postcard_message > div > .right > .postcard_bubble > .postcard_text .postcard_video_wrap,
.main .chatbox > .contents > .chat_messages > ul > li.postcard_message > div > .right > .postcard_bubble > .postcard_text .ext_editor_postcard .postcard_video_wrap
{
display: block !important;
visibility: visible !important;
opacity: 1 !important;
max-width: 100%;
margin: 6px 0;
border-radius: 6px;
overflow: hidden;
cursor: pointer;
position: relative;
}

.main .chatbox > .contents > .chat_messages > ul > li.postcard_message > div > .right > .postcard_bubble > .postcard_text .postcard_video_wrap img,
.main .chatbox > .contents > .chat_messages > ul > li.postcard_message > div > .right > .postcard_bubble > .postcard_text .ext_editor_postcard .postcard_video_wrap img
{
width: 100%;
height: auto !important;
display: block !important;
border-radius: 6px;
margin: 0;
visibility: visible !important;
opacity: 1 !important;
}

.main .extended_editor_panel .ext_editor_body .note-editor .note-toolbar .note-color .note-dropdown-menu .note-color-dropdown-close
{
display: flex;
align-items: center;
justify-content: center;
width: 100%;
padding: 6px 8px;
margin-top: 8px;
border-radius: 4px;
cursor: pointer;
background: var(--info-panel-secondary-bg-color, #f3f4f6);
border: 1px solid var(--info-panel-primary-border-color, #d1d5db);
color: var(--info-panel-primary-text-color, #374151);
font-size: 12px;
font-weight: 600;
transition: background 0.15s;
z-index: 10;
position: relative;
}

.main .extended_editor_panel .ext_editor_body .note-editor .note-toolbar .note-color .note-dropdown-menu .note-color-dropdown-close:hover
{
background: #ef4444;
color: #fff;
border-color: #ef4444;
}

/* Reduce uploading file(s) icon size */
.main .chatbox > .contents > .chat_messages > ul > li > div > .right > .files > div > ul > li > .file.others > span > .icon > img
{
width: 24px;
height: auto;
}

.main .chatbox > .contents > .chat_messages > ul > li > div > .right > .files > div > ul > li > .file.others > span > .icon
{
margin-right: 6px;
}

.main .chatbox > .contents > .chat_messages > ul > li > div > .right > .files > div > ul > li > .file.others
{
padding: 4px 8px;
}

.main .chatbox > .contents > .chat_messages > ul > li > div > .right > .files > div > ul > li > .file.others > span .name
{
font-size: 11px;
}

.main .chatbox > .contents > .chat_messages > ul > li > div > .right > .files > div > ul > li > .file.others > span .subtitle
{
font-size: 10px;
}

/* Video thumbnail container in postcard */
.main .chatbox > .contents > .chat_messages > ul > li.postcard_message > div > .right > .postcard_bubble > .postcard_text .postcard_video_wrap
{
position: relative;
display: block;
max-width: 100%;
margin: 6px 0;
border-radius: 6px;
overflow: hidden;
cursor: pointer;
}

.main .chatbox > .contents > .chat_messages > ul > li.postcard_message > div > .right > .postcard_bubble > .postcard_text .postcard_video_wrap img
{
width: 100%;
height: auto;
display: block;
border-radius: 6px;
margin: 0;
}

.main .chatbox > .contents > .chat_messages > ul > li.postcard_message > div > .right > .postcard_bubble > .postcard_text .postcard_video_wrap .postcard_video_play
{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 48px;
height: 48px;
background: rgba(0,0,0,0.55);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
font-size: 22px;
pointer-events: none;
transition: background 0.15s;
}

.main .chatbox > .contents > .chat_messages > ul > li.postcard_message > div > .right > .postcard_bubble > .postcard_text .postcard_video_wrap:hover .postcard_video_play
{
background: rgba(0,0,0,0.75);
}

/* Bubble footer dropdown: professional gap between trigger and popup */
.main .chatbox > .contents > .chat_messages > ul > li > div > .right > .bubble_footer > .options .dropdown_list,
.main .chatbox > .contents > .chat_messages > ul > li > div > .right > .content > div > .bubble_footer > .options .dropdown_list
{
bottom: calc(100% + 6px) !important;
top: auto !important;
z-index: 100;
}

.main .chatbox > .contents > .chat_messages > ul > li > div > .right > .bubble_footer > .options .dropdown_list.reverse,
.main .chatbox > .contents > .chat_messages > ul > li > div > .right > .content > div > .bubble_footer > .options .dropdown_list.reverse
{
bottom: auto !important;
top: calc(100% + 6px) !important;
}

.main .chatbox > .contents > .chat_messages > ul > li > div > .right > .bubble_footer > .options .dropdown_list.msg_context_dropdown,
.main .chatbox > .contents > .chat_messages > ul > li > div > .right > .content > div > .bubble_footer > .options .dropdown_list.msg_context_dropdown
{
max-width: 260px;
max-width: min(260px, calc(100vw - 24px));
}

/* Postcard footer dropdown: align right and add gap */
.main .chatbox > .contents > .chat_messages > ul > li.postcard_message > div > .right > .postcard_bubble > .postcard_footer > .options .dropdown_list
{
bottom: calc(100% + 6px) !important;
top: auto !important;
right: 0 !important;
left: auto !important;
z-index: 100;
}

.main .chatbox > .contents > .chat_messages > ul > li.postcard_message > div > .right > .postcard_bubble > .postcard_footer > .options .dropdown_list.reverse
{
bottom: auto !important;
top: calc(100% + 6px) !important;
}

.main .chatbox > .contents > .chat_messages > ul > li.postcard_message > div > .right > .postcard_bubble > .postcard_footer > .options .dropdown_list.msg_context_dropdown
{
max-width: 260px;
max-width: min(260px, calc(100vw - 24px));
}

/* Delete option in dropdown — subtle red accent */
.msg_context_dropdown .msg_dropdown_grid > ul > li.ask_confirmation
{
grid-column: 1 / -1;
flex-direction: row;
gap: 10px;
background: rgba(244,67,54,0.06);
border: 1px solid rgba(244,67,54,0.15);
border-radius: 10px;
margin-top: 4px;
padding: 10px 14px;
}

.msg_context_dropdown .msg_dropdown_grid > ul > li.ask_confirmation .msg_menu_icon
{
background: rgba(244,67,54,0.12);
color: #F44336;
width: 36px;
height: 36px;
min-width: 36px;
font-size: 18px;
}

.msg_context_dropdown .msg_dropdown_grid > ul > li.ask_confirmation .msg_menu_label
{
color: #D32F2F;
font-size: 13px;
font-weight: 700;
}

.msg_context_dropdown .msg_dropdown_grid > ul > li.ask_confirmation:hover
{
background: rgba(244,67,54,0.12);
border-color: rgba(244,67,54,0.3);
}

.msg_context_dropdown .msg_dropdown_grid > ul > li.ask_confirmation:hover .msg_menu_icon
{
background: #F44336;
color: #fff;
}

.dark_mode .msg_context_dropdown .msg_dropdown_grid > ul > li.ask_confirmation
{
background: rgba(244,67,54,0.1);
border-color: rgba(244,67,54,0.2);
}

.dark_mode .msg_context_dropdown .msg_dropdown_grid > ul > li.ask_confirmation:hover
{
background: rgba(244,67,54,0.18);
}

/* Modern delete confirmation overlay */
.patch_delete_overlay
{
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.45);
z-index: 9999;
display: flex;
align-items: center;
justify-content: center;
animation: patchFadeIn 0.18s ease;
}

@keyframes patchFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes patchSlideUp { from { opacity: 0; transform: translateY(20px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }

.patch_delete_dialog
{
background: var(--chat-window-secondary-bg-color, #fff);
border-radius: 16px;
box-shadow: 0 20px 60px rgba(0,0,0,0.25);
width: 340px;
max-width: 92vw;
animation: patchSlideUp 0.22s ease;
overflow: hidden;
}

.patch_delete_dialog_header
{
display: flex;
align-items: center;
gap: 12px;
padding: 20px 20px 12px;
}

.patch_delete_dialog_header .patch_del_icon
{
width: 44px;
height: 44px;
min-width: 44px;
border-radius: 50%;
background: rgba(244,67,54,0.1);
display: flex;
align-items: center;
justify-content: center;
color: #EF4444;
font-size: 20px;
}

.patch_delete_dialog_header .patch_del_title
{
font-size: 16px;
font-weight: 700;
color: var(--chat-window-primary-text-color, #1f2937);
}

.patch_delete_dialog_header .patch_del_subtitle
{
font-size: 12px;
color: var(--chat-window-quinary-text-color, #6b7280);
margin-top: 2px;
}

.patch_delete_dialog_body
{
padding: 8px 20px 16px;
display: flex;
flex-direction: column;
gap: 8px;
}

.patch_delete_dialog_body .patch_del_option
{
display: flex;
align-items: center;
gap: 12px;
padding: 12px 14px;
border-radius: 10px;
border: 1px solid var(--chat-window-primary-border-color, #e5e7eb);
cursor: pointer;
transition: all 0.15s;
background: transparent;
}

.patch_delete_dialog_body .patch_del_option:hover
{
background: var(--chat-window-tertiary-bg-color, #f9fafb);
border-color: var(--chat-window-tertiary-border-color, #d1d5db);
}

.patch_delete_dialog_body .patch_del_option .patch_del_opt_icon
{
width: 34px;
height: 34px;
min-width: 34px;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
font-size: 16px;
}

.patch_delete_dialog_body .patch_del_option.opt_for_me .patch_del_opt_icon
{
background: rgba(59,130,246,0.1);
color: #3B82F6;
}

.patch_delete_dialog_body .patch_del_option.opt_for_everyone .patch_del_opt_icon
{
background: rgba(244,67,54,0.1);
color: #EF4444;
}

.patch_delete_dialog_body .patch_del_option .patch_del_opt_text
{
font-size: 13px;
font-weight: 600;
color: var(--chat-window-primary-text-color, #374151);
}

.patch_delete_dialog_body .patch_del_option .patch_del_opt_desc
{
font-size: 11px;
color: var(--chat-window-quinary-text-color, #9ca3af);
margin-top: 1px;
}

.patch_delete_dialog_footer
{
padding: 0 20px 16px;
}

.patch_delete_dialog_footer .patch_del_cancel
{
display: block;
width: 100%;
padding: 10px;
border-radius: 10px;
border: 1px solid var(--chat-window-primary-border-color, #e5e7eb);
background: transparent;
cursor: pointer;
font-size: 13px;
font-weight: 600;
color: var(--chat-window-quinary-text-color, #6b7280);
text-align: center;
transition: all 0.15s;
}

.patch_delete_dialog_footer .patch_del_cancel:hover
{
background: var(--chat-window-tertiary-bg-color, #f3f4f6);
}

.dark_mode .patch_delete_dialog
{
background: var(--chat-window-secondary-bg-color, #1e293b);
box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

/* Spacing + paragraph + all toolbar dropdowns: keep within editor bounds */
.main .extended_editor_panel .ext_editor_body .note-editor .note-toolbar .ext-spacing-dropdown
{
right: 0;
left: auto;
min-width: 120px;
max-width: 150px;
}

.main .extended_editor_panel .ext_editor_body .note-editor .note-toolbar .note-para .note-dropdown-menu
{
left: 4px;
right: auto;
min-width: 200px;
max-width: 240px;
}

.main .extended_editor_panel .ext_editor_body .note-editor .note-toolbar .note-style .note-dropdown-menu
{
left: 4px;
right: auto;
min-width: 150px;
max-width: 200px;
}

.main .extended_editor_panel .ext_editor_body .note-editor .note-toolbar .note-color .note-dropdown-menu
{
left: 0;
right: auto;
transform: none;
min-width: 220px;
max-width: min(280px, calc(100vw - 48px));
overflow-x: hidden;
overflow-y: auto;
max-height: 420px;
}

.main .extended_editor_panel .ext_editor_body .note-editor .note-toolbar .note-fontsize .note-dropdown-menu
{
min-width: 100px;
max-width: 130px;
}

.main .extended_editor_panel .ext_editor_body .note-editor .note-toolbar .note-insert .note-dropdown-menu
{
min-width: 160px;
max-width: 200px;
}

/* Ensure all dropdowns that might overflow right stay in bounds */
.main .extended_editor_panel .ext_editor_body .note-editor .note-toolbar
{
position: relative;
overflow: visible;
z-index: 10;
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 2px;
}

.main .extended_editor_panel .ext_editor_body .note-editor .note-toolbar .note-btn-group:last-child .note-dropdown-menu,
.main .extended_editor_panel .ext_editor_body .note-editor .note-toolbar .note-btn-group:nth-last-child(2) .note-dropdown-menu,
.main .extended_editor_panel .ext_editor_body .note-editor .note-toolbar .note-btn-group:nth-last-child(3) .note-dropdown-menu
{
right: 0;
left: auto;
}

/* Postcard content: ext_editor_postcard alignment */
.main .chatbox > .contents > .chat_messages > ul > li.postcard_message > div > .right > .postcard_bubble > .postcard_text .ext_editor_postcard
{
word-wrap: break-word;
overflow-wrap: break-word;
overflow: visible !important;
display: flex;
flex-direction: column;
}

.main .chatbox > .contents > .chat_messages > ul > li.postcard_message > div > .right > .postcard_bubble > .postcard_text .ext_editor_postcard p
{
margin: 0 0 0.5em;
}

.main .chatbox > .contents > .chat_messages > ul > li.postcard_message > div > .right > .postcard_bubble > .postcard_text .ext_editor_postcard p:last-child
{
margin-bottom: 0;
}

.main .chatbox > .contents > .chat_messages > ul > li.postcard_message > div > .right > .postcard_bubble > .postcard_text .ext_editor_postcard h1,
.main .chatbox > .contents > .chat_messages > ul > li.postcard_message > div > .right > .postcard_bubble > .postcard_text .ext_editor_postcard h2,
.main .chatbox > .contents > .chat_messages > ul > li.postcard_message > div > .right > .postcard_bubble > .postcard_text .ext_editor_postcard h3,
.main .chatbox > .contents > .chat_messages > ul > li.postcard_message > div > .right > .postcard_bubble > .postcard_text .ext_editor_postcard h4,
.main .chatbox > .contents > .chat_messages > ul > li.postcard_message > div > .right > .postcard_bubble > .postcard_text .ext_editor_postcard h5,
.main .chatbox > .contents > .chat_messages > ul > li.postcard_message > div > .right > .postcard_bubble > .postcard_text .ext_editor_postcard h6
{
margin: 0 0 0.4em;
line-height: 1.3;
word-wrap: break-word;
overflow-wrap: break-word;
}

/* Postcard bubble: ensure content is never clipped */
.main .chatbox > .contents > .chat_messages > ul > li.postcard_message > div > .right > .postcard_bubble
{
overflow: visible !important;
}

/* Footer toggle_message_toolbar dropdown: professional alignment */
.main .chatbox > .footer > .editor .toggle_message_toolbar > div > .dropdown_list
{
left: 4px !important;
margin-left: 0 !important;
max-height: 65vh;
overflow-y: auto;
overflow-x: hidden;
}

/* Chatbox footer note-toolbar: fix layout and padding */
.main .chatbox > .footer > .editor .message_editor .note-editor .note-toolbar
{
padding: 2px 5px !important;
}

.main .chatbox > .footer > .editor.show_toolbar .message_editor .note-editor .note-toolbar
{
display: flex !important;
flex-wrap: nowrap;
align-items: center;
gap: 1px;
}

.main .chatbox > .footer > .editor .note-editor .note-toolbar > .note-btn-group
{
display: inline-flex;
align-items: center;
padding: 0;
margin: 0;
}

/* Postcard GIF content visibility */
.main .chatbox > .contents > .chat_messages > ul > li.postcard_message > div > .right > .postcard_bubble > .postcard_text .ext_editor_postcard .gif-container,
.main .chatbox > .contents > .chat_messages > ul > li.postcard_message > div > .right > .postcard_bubble > .postcard_text .gif-container
{
display: block !important;
visibility: visible !important;
opacity: 1 !important;
max-width: 100%;
}

.main .chatbox > .contents > .chat_messages > ul > li.postcard_message > div > .right > .postcard_bubble > .postcard_text .ext_editor_postcard .gif-container img,
.main .chatbox > .contents > .chat_messages > ul > li.postcard_message > div > .right > .postcard_bubble > .postcard_text .gif-container img
{
max-width: 100% !important;
display: block !important;
height: auto !important;
visibility: visible !important;
opacity: 1 !important;
border-radius: 6px;
}

/* Media bar buttons smooth interaction */
.main .extended_editor_panel .ext_media_btn
{
user-select: none;
-webkit-user-select: none;
}

.main .extended_editor_panel .ext_media_btn:active
{
transform: scale(0.96);
}
