/* Messenger v2.1.7. Compact, accessible, responsive and theme-aware. */
.r217-filters{display:flex;gap:5px;overflow-x:auto;padding:3px 12px 10px;scrollbar-width:none}
.r217-filters::-webkit-scrollbar{display:none}
.r217-filters button,.r217-thread-bar button{border:1px solid var(--line,#e4e8ee);border-radius:999px;padding:7px 10px;background:var(--surface,#fff);font-size:11px;white-space:nowrap;color:var(--ink,#323b4c);cursor:pointer;font-weight:700}
.r217-filters button.active,.r217-filters button:hover,.r217-thread-bar button:hover{border-color:#f52246;color:#f52246;background:rgba(235,20,55,.055)}
.r217-thread-bar{display:flex;align-items:center;gap:8px;padding:7px 14px;border-bottom:1px solid var(--line,#e9ecf1);background:var(--surface,#fff)}
.r217-new-chat{margin:8px 12px;border:1px solid #f6c7ce;border-radius:12px;background:rgba(240,25,50,.055);color:#e91536;padding:9px;cursor:pointer;font-weight:700}
.r217-compose-tools{display:flex;align-items:center;gap:1px}
.r217-compose-tools .r217-btn{padding:7px;min-width:27px;font-size:17px;color:#e91639;background:transparent}
.r217-reply-bar{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:0 16px;background:var(--surface,#fff);font-size:12px}
.r217-reply-bar:empty{display:none}.r217-reply-bar button{border:0;background:none;color:#ed1636;cursor:pointer}
.r217-modal{border:1px solid var(--line,#e3e7ec);border-radius:18px;background:var(--surface,#fff);color:var(--ink,#17243c);box-shadow:0 18px 80px #1117;padding:0;width:min(460px,calc(100vw - 22px));max-height:85dvh;overflow:hidden}
.r217-modal::backdrop,.r217-lightbox::backdrop{background:rgba(8,15,30,.7)}
.r217-modal-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 17px;border-bottom:1px solid var(--line,#e3e7ec)}
.r217-modal-head strong{font-size:16px}.r217-modal-head button{border:0;background:transparent;color:var(--ink,#182438);font-size:23px;cursor:pointer}
.r217-modal-body{padding:15px;display:flex;flex-direction:column;gap:10px;max-height:calc(85dvh - 60px);overflow:auto}
.r217-btn{border:1px solid var(--line,#e3e7ec);border-radius:11px;background:var(--surface,#fff);color:var(--ink,#26334a);cursor:pointer;padding:11px 12px;text-align:left;font-weight:600;font-size:13px}
.r217-btn:hover{border-color:#f02946;color:#ed1636}.r217-btn.primary{background:#ed1636;color:#fff;text-align:center;border-color:#ed1636}.r217-btn.danger{color:#d31833}.r217-btn.icon{border:0}
.r217-input{width:100%;min-width:0;padding:11px 12px;border:1px solid var(--line,#dde4eb);border-radius:11px;background:var(--surface,#fff);color:var(--ink,#17243c);font:inherit}
.r217-muted{color:var(--muted,#788498);font-size:12px;margin:0;line-height:1.6}.r217-results{display:grid;gap:6px}.r217-result{white-space:normal}
.r217-emoji-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:4px}.r217-emoji-grid button{text-align:center;font-size:22px;padding:7px 2px}
.r217-gifs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.r217-gifs button{border:0;background:none;cursor:pointer;padding:0}.r217-gifs img{width:100%;height:95px;object-fit:cover;border-radius:9px}
.r217-media-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.r217-media-item{min-width:0;aspect-ratio:1;overflow:hidden;border:1px solid var(--line,#dfe5ec);border-radius:9px;color:var(--ink,#17243c);background:var(--surface,#fff);cursor:pointer;font-size:12px}.r217-media-item img{width:100%;height:100%;object-fit:cover}
.r217-lightbox{width:min(96vw,1100px);height:min(94dvh,870px);border:0;background:rgba(4,7,14,.97);border-radius:14px;padding:15px;color:#fff;text-align:center}.r217-lightbox>button{position:absolute;top:10px;right:16px;background:#222;border:0;color:#fff;border-radius:30px;font-size:27px;cursor:pointer}.r217-lightbox img,.r217-lightbox video{height:100%;max-width:100%;object-fit:contain}.r217-lightbox img.zoom{transform:scale(1.7);cursor:zoom-out}
.r217-quoted{display:block;max-width:100%;border:0;border-left:3px solid #ec3552;border-radius:6px;padding:6px 10px;text-align:left;background:rgba(138,146,158,.16);color:inherit;font:inherit;font-size:11px;margin:6px 0;cursor:pointer}
.r217-reactions{display:flex;flex-wrap:wrap;gap:4px;margin:5px 0}.r217-reactions span{font-size:12px;border-radius:15px;padding:1px 6px;background:rgba(138,146,158,.2)}
.r217-document,.r217-shared{display:block;padding:7px 9px;margin:5px 0;border:1px solid #ee8fa1;border-radius:8px;color:inherit;text-decoration:none;overflow-wrap:anywhere;font-size:12px}
.r15-bubble audio{width:min(100%,280px);max-width:100%}.r217-focus .r15-bubble{outline:3px solid #ff4e66;outline-offset:2px}.r217-pin{display:flex;align-items:center;gap:7px;padding:8px 13px;background:rgba(237,22,54,.08);font-size:12px}.r217-pin span{flex:1}.r217-pin button{border:0;background:transparent;color:#ed1636;cursor:pointer}
.r15-bubble-tools{opacity:1!important}.r15-bubble-tools button{background:transparent;border:0;color:var(--ink,#536176);cursor:pointer}.r15-bubble-tools button:hover{color:#ed1636}
@media(max-width:700px){.r217-thread-bar{overflow:auto;padding:6px}.r217-compose-tools{gap:0}.r217-compose-tools .r217-btn{padding:4px;min-width:25px;font-size:15px}.r15-chat-compose{gap:4px}.r217-modal{max-height:90dvh}.r217-modal-body{max-height:calc(90dvh - 60px)}.r217-media-grid{grid-template-columns:repeat(2,1fr)}}
body[data-theme="dark"] .r217-modal,body[data-theme="dark"] .r217-btn,body[data-theme="dark"] .r217-input,body[data-theme="dark"] .r217-thread-bar{background:#111;color:#f5f5f5;border-color:#393939}
body[data-theme="dark"] .r217-modal-head{border-color:#393939}body[data-theme="dark"] .r217-modal-head button{color:#fff}

.r217-mini-tools{flex:0 0 auto;gap:0}
.r217-mini-tools .r217-btn.icon{font-size:13px;min-width:20px;padding:4px!important;background:transparent;color:#ed1636;border:0}
.r15-mini-compose{min-width:0}
@media(max-width:390px){.r217-mini-tools .r217-btn.icon{font-size:12px;min-width:18px;padding:3px!important}}
@media(prefers-color-scheme:dark){body[data-theme="system"] .r217-modal,body[data-theme="system"] .r217-btn,body[data-theme="system"] .r217-input,body[data-theme="system"] .r217-thread-bar{background:#111;color:#f5f5f5;border-color:#393939}}


/* v2.1.8 — single ellipsis and modern consistent Messenger icons */
.r15-bubble-row .r15-bubble-tools.r218-single-action{display:flex;flex:0 0 auto;opacity:1!important;align-items:center;justify-content:center;padding:0;min-width:30px;order:2}
.r15-bubble-row .r15-bubble-tools.r218-single-action>button{display:grid;place-items:center;flex:0 0 30px;width:30px;height:30px;padding:0;border:1px solid transparent;border-radius:10px;background:transparent;color:#64748b;cursor:pointer;transition:background .16s,color .16s,border-color .16s}
.r15-bubble-row .r15-bubble-tools.r218-single-action>button:hover,.r15-bubble-row .r15-bubble-tools.r218-single-action>button:focus-visible,.r15-bubble-row .r15-bubble-tools.r218-single-action>button[aria-expanded="true"]{color:#ed1636;background:rgba(237,22,54,.08);border-color:rgba(237,22,54,.12);outline-offset:2px}
.r15-bubble-tools.r218-single-action svg{width:19px;height:19px;stroke:currentColor}
.r218-action-menu{position:fixed;z-index:28000;display:flex;flex-direction:column;width:min(244px,calc(100vw - 16px));max-height:min(430px,calc(100dvh - 16px));overflow-y:auto;overscroll-behavior:contain;background:var(--surface,#fff);color:var(--ink,#17243c);border:1px solid var(--line,#e4e9f0);box-shadow:0 18px 50px rgba(20,31,53,.2);border-radius:14px;padding:6px;animation:r218-menu-in .14s ease-out}
@keyframes r218-menu-in{from{opacity:0;transform:translateY(-3px)}to{opacity:1;transform:translateY(0)}}
.r218-menu-title{padding:8px 10px 9px;font-weight:800;font-size:11px;color:var(--muted,#788498);letter-spacing:.02em}
.r218-menu-item{display:flex;align-items:center;gap:11px;text-align:left;width:100%;flex-shrink:0;border:0;border-radius:9px;background:transparent;color:inherit;cursor:pointer;padding:10px 11px;min-height:42px;font:inherit;font-weight:600;font-size:12px;line-height:1.4}
.r218-menu-item svg{flex:0 0 18px;width:18px;height:18px;color:#ed1636}
.r218-menu-item:hover,.r218-menu-item:focus-visible{background:rgba(237,22,54,.08);outline:0}
.r218-menu-item.danger{color:#d42b45}.r218-menu-separator{height:1px;flex:0 0 1px;background:var(--line,#e6ebf1);margin:5px 7px}
.r217-compose-tools{gap:3px;flex:0 0 auto}
.r217-compose-tools .r218-icon-button{display:grid;place-items:center;flex:0 0 auto;width:34px;height:34px;min-width:34px;padding:0;background:transparent;border:1px solid transparent;border-radius:10px;color:#ed1636;box-shadow:none;cursor:pointer}
.r217-compose-tools .r218-icon-button:hover,.r217-compose-tools .r218-icon-button:focus-visible{background:rgba(237,22,54,.09);border-color:rgba(237,22,54,.12);outline:0}
.r217-compose-tools .r218-icon-button svg{width:19px;height:19px;stroke:currentColor}
.r217-thread-bar .r218-text-button,.r217-new-chat.r218-text-button{display:flex;align-items:center;justify-content:center;gap:6px;font-size:11px}
.r217-thread-bar .r218-text-button svg,.r217-new-chat.r218-text-button svg{width:16px;height:16px;stroke:currentColor;flex:none}
.r217-new-chat.r218-text-button{width:max-content}
.r15-chat-compose .r15-attach,.r15-mini-compose .r15-attach{background:transparent;color:#ed1636;border:1px solid transparent;transition:background .16s}
.r15-chat-compose .r15-attach:hover,.r15-mini-compose .r15-attach:hover{background:rgba(237,22,54,.09)}
.r15-chat-compose .r15-attach svg,.r15-mini-compose .r15-attach svg{width:19px;height:19px;stroke-width:1.85}
.r15-chat-compose .r15-send,.r15-mini-compose button[type=submit]{border-radius:12px}
body[data-theme="dark"] .r218-action-menu{background:#161616;color:#f4f4f4;border-color:#383838;box-shadow:0 20px 60px rgba(0,0,0,.6)}
body[data-theme="dark"] .r15-bubble-row .r15-bubble-tools.r218-single-action>button{color:#d2d2d2}
body[data-theme="dark"] .r15-bubble-row .r15-bubble-tools.r218-single-action>button:hover,body[data-theme="dark"] .r15-bubble-row .r15-bubble-tools.r218-single-action>button[aria-expanded="true"]{color:#ff3c5f;background:rgba(237,22,54,.18)}
@media(max-width:700px){.r217-compose-tools{gap:0}.r217-compose-tools .r218-icon-button{min-width:28px;width:28px;height:32px}.r217-compose-tools .r218-icon-button svg{width:17px;height:17px}.r15-chat-compose{gap:4px}.r15-chat-compose .r15-attach{width:31px;height:32px}.r15-bubble-row .r15-bubble-tools.r218-single-action{min-width:27px}.r15-bubble-row .r15-bubble-tools.r218-single-action>button{width:27px;height:29px;flex-basis:27px}}
@media(max-width:390px){.r217-mini-tools .r218-icon-button{min-width:25px;width:25px;height:29px;padding:0!important}.r217-mini-tools .r218-icon-button svg{width:16px;height:16px}.r217-thread-bar .r218-text-button{padding:7px 8px}}
@media(prefers-color-scheme:dark){body[data-theme="system"] .r218-action-menu{background:#161616;color:#f4f4f4;border-color:#383838;box-shadow:0 20px 60px rgba(0,0,0,.6)}body[data-theme="system"] .r15-bubble-row .r15-bubble-tools.r218-single-action>button{color:#ddd}}
@media(prefers-reduced-motion:reduce){.r218-action-menu{animation:none}}

.r15-inbox-title .r218-new-chat-icon{display:grid;place-items:center;width:34px;height:34px;flex:0 0 34px;border:1px solid var(--line,#e4e8ee);border-radius:10px;background:var(--surface,#fff);color:#ed1636;cursor:pointer;text-decoration:none}
.r15-inbox-title .r218-new-chat-icon svg{width:19px;height:19px}
.r15-inbox-title .r218-new-chat-icon:hover{background:rgba(237,22,54,.08);border-color:rgba(237,22,54,.18)}
/* Ensure dark-theme rules never turn the new composer buttons into black squares. */
body[data-theme="dark"] .r217-compose-tools .r218-icon-button,
body[data-theme="dark"] .r15-chat-compose .r15-attach,
body[data-theme="dark"] .r15-mini-compose .r15-attach{background:transparent!important;color:#ff3155!important;border-color:transparent!important;box-shadow:none!important}
body[data-theme="dark"] .r217-compose-tools .r218-icon-button:hover,
body[data-theme="dark"] .r15-chat-compose .r15-attach:hover,
body[data-theme="dark"] .r15-mini-compose .r15-attach:hover{background:rgba(255,49,85,.14)!important}
@media(prefers-color-scheme:dark){
 body[data-theme="system"] .r217-compose-tools .r218-icon-button,
 body[data-theme="system"] .r15-chat-compose .r15-attach,
 body[data-theme="system"] .r15-mini-compose .r15-attach{background:transparent!important;color:#ff3155!important;border-color:transparent!important;box-shadow:none!important}
 body[data-theme="system"] .r217-compose-tools .r218-icon-button:hover{background:rgba(255,49,85,.14)!important}
}


/* v2.1.9 — Reply outside dots; illustrated conversation tools */
.r15-message-content .r219-inline-reply{display:inline-flex;align-items:center;gap:5px;width:max-content;max-width:100%;padding:3px 5px;margin:0;border:0;border-radius:7px;background:transparent;color:#66748a;cursor:pointer;font:inherit;font-size:11px;font-weight:700;line-height:1.55;transition:background .15s,color .15s}
.r15-message-content .r219-inline-reply svg{flex:none;width:14px;height:14px;stroke:currentColor}
.r15-message-content .r219-inline-reply:hover,.r15-message-content .r219-inline-reply:focus-visible{color:#ed1636;background:rgba(237,22,54,.07);outline-offset:2px}
.r15-bubble-row.mine .r219-inline-reply{align-self:flex-end}
.r15-bubble-row.theirs .r219-inline-reply{align-self:flex-start}
.r219-conversation-list{display:flex;flex-direction:column;gap:7px}
.r219-conversation-choice{display:flex;align-items:center;gap:12px;width:100%;min-height:46px;padding:11px 13px;background:var(--surface,#fff);color:var(--ink,#243048);border:1px solid var(--line,#e3e9f0);border-radius:12px;text-align:left;font:inherit;font-size:13px;font-weight:650;cursor:pointer;transition:border-color .15s,background .15s,color .15s}
.r219-conversation-choice svg{flex:0 0 19px;width:19px;height:19px;color:#ed1636;stroke:currentColor;stroke-width:1.85}
.r219-conversation-choice span{flex:1;min-width:0}
.r219-conversation-choice:hover,.r219-conversation-choice:focus-visible{border-color:rgba(237,22,54,.35);background:rgba(237,22,54,.055);outline-offset:2px}
.r219-conversation-choice.danger{color:#d52842}
.r219-conversation-choice.danger svg{color:#d52842}
.r219-conversation-separator{height:1px;background:var(--line,#e3e9f0);margin:3px 5px}
.r219-conversation-loading{color:var(--muted,#728096);padding:12px;margin:0;text-align:center;font-size:12px}
body[data-theme="dark"] .r15-message-content .r219-inline-reply{color:#b5bdcb}
body[data-theme="dark"] .r15-message-content .r219-inline-reply:hover{color:#ff3657}
body[data-theme="dark"] .r219-conversation-choice{background:#191919;color:#f1f1f1;border-color:#373737}
body[data-theme="dark"] .r219-conversation-choice:hover{background:#28191d;border-color:#a33348}
body[data-theme="dark"] .r219-conversation-choice.danger{color:#ff687e}
body[data-theme="dark"] .r219-conversation-choice svg{color:#ff3657}
@media(max-width:700px){.r15-message-content .r219-inline-reply{font-size:11px;padding:4px 5px;min-height:27px}.r219-conversation-choice{min-height:45px}}
@media(prefers-color-scheme:dark){body[data-theme="system"] .r219-conversation-choice{background:#191919;color:#f1f1f1;border-color:#373737}body[data-theme="system"] .r219-conversation-choice svg{color:#ff3657}body[data-theme="system"] .r15-message-content .r219-inline-reply{color:#b5bdcb}}
@media(prefers-reduced-motion:reduce){.r219-conversation-choice,.r219-inline-reply{transition:none}}

/* v2.1.12 — direct Reply, Edit and React under the message. */
.r15-message-content .r2111-inline-actions{display:flex;align-items:center;justify-content:flex-start;gap:8px;flex-wrap:wrap;max-width:100%;margin-top:1px}
.r15-bubble-row.mine .r2111-inline-actions{justify-content:flex-end}
.r15-message-content .r2111-inline-action{display:inline-flex;align-items:center;gap:5px;width:auto;min-height:28px;padding:4px 6px;border:0;border-radius:8px;background:transparent;box-shadow:none;color:#66748a;cursor:pointer;font:inherit;font-size:11px;font-weight:700;line-height:1.4;transition:color .15s,background .15s}
.r15-message-content .r2111-inline-action svg{display:block;flex:none;width:15px;height:15px;stroke:currentColor}
.r15-message-content .r2111-inline-action:hover,.r15-message-content .r2111-inline-action:focus-visible{color:#ed1636;background:rgba(237,22,54,.08);outline-offset:2px}
body[data-theme="dark"] .r15-message-content .r2111-inline-action{color:#bfc6d1}
body[data-theme="dark"] .r15-message-content .r2111-inline-action:hover{color:#ff3657;background:rgba(237,22,54,.14)}
@media(prefers-color-scheme:dark){body[data-theme="system"] .r15-message-content .r2111-inline-action{color:#bfc6d1}}
@media(max-width:700px){.r15-message-content .r2111-inline-actions{gap:4px}.r15-message-content .r2111-inline-action{font-size:11px;min-height:30px;padding:4px 5px}}
@media(prefers-reduced-motion:reduce){.r15-message-content .r2111-inline-action{transition:none}}
