.fb-gif-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:8px 0;max-width:100%;min-width:0}
.fb-gif-button,.fb-gif-toggle,.fb-gif-remove,.fb-gif-close{font:inherit;cursor:pointer;border:1px solid #226078;border-radius:9px;background:#092535;color:#a6f8e1;padding:7px 11px;line-height:1.3}
.fb-gif-button{font-size:14px;font-weight:850;letter-spacing:.04em;min-height:36px}.fb-gif-button[aria-pressed=true]{border-color:#00efb2}.fb-gif-button:disabled{opacity:.5;cursor:wait}
.fb-gif-selection{display:flex;align-items:center;flex-wrap:wrap;gap:8px;font-size:14px;min-width:0;max-width:100%}.fb-gif-selection[hidden]{display:none}.fb-gif-selection img{width:64px;height:48px;object-fit:contain;border-radius:7px}.fb-gif-selection span{max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fb-gif-status{font-size:14px;color:#a7c5d5}.fb-gif-frame{display:flex;flex-direction:column;align-items:flex-start;gap:5px;max-width:100%;margin:8px 0;white-space:normal}.fb-gif-image{display:block;max-width:100%;width:auto;max-height:320px;object-fit:contain;border-radius:12px}.fb-gif-image[hidden]{display:none}.fb-gif-toggle{font-size:14px;padding:5px 9px}
.fb-gif-body{white-space:pre-wrap;overflow-wrap:anywhere;min-width:0}.fb-gif-dialog{width:min(440px,calc(100vw - 28px));max-height:85dvh;overflow:auto;color:#edfbff;background:#061d2c;border:1px solid #247089;border-radius:18px;padding:22px;font:15px/1.5 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}.fb-gif-dialog::backdrop{background:#020b13cc}.fb-gif-dialog h2{font-size:22px;margin:12px 0 20px}.fb-gif-close{float:right}.fb-gif-dialog label{display:block;margin:12px 0 8px;font-weight:650}.fb-gif-dialog input{box-sizing:border-box;max-width:100%;width:100%;font:inherit;color:#e7f9ff;background:#0b2a3d;border:1px solid #29647c;border-radius:9px;padding:10px}.fb-gif-dialog p{font-size:14px;color:#a4c4d5}.fb-gif-dialog form button{margin-top:10px}.fb-gif-dialog .fb-gif-picker-error{color:#ffb6aa}.fb-gif-dialog button:focus-visible,.fb-gif-tools button:focus-visible,.fb-gif-toggle:focus-visible{outline:2px solid #00efb2;outline-offset:3px}
.fb-wall-comment-input,.fb-profile-comment-form{flex-wrap:wrap}.fb-wall-comment-input .fb-gif-tools,.fb-profile-comment-form .fb-gif-tools{flex:1 0 100%}.fb-dm-compose .fb-gif-tools{grid-column:1/-1}
.fb-dm-compose{flex-wrap:wrap}.fb-dm-compose>textarea{order:0;flex:1 1 65%}.fb-dm-compose>#dmSend{order:1}.fb-dm-compose>.fb-gif-tools{order:2;flex:1 0 100%;margin:0}.fb-dm-compose .fb-gif-tools button{height:auto;min-width:0;width:auto;font-size:14px;border-radius:9px;padding:7px 10px}.fbcr-send>.fb-gif-tools{order:3;grid-column:1/-1}.fbcr-reply-form{flex-wrap:wrap}.fbcr-reply-form>.fb-gif-tools{flex:1 0 100%}
@media(max-width:520px){.fb-gif-dialog{padding:16px}.fb-gif-image{max-height:260px}.fb-gif-selection span{max-width:110px}}

/* Mobile sheet: browse first, then attach to the existing post or message composer. */
.fb-gif-dialog.fb-gif-sheet{width:min(560px,calc(100vw - 28px));padding:0;max-height:86dvh;overflow:hidden;border-radius:24px;background:#061b29;box-shadow:0 24px 90px #0008}
.fb-gif-sheet-handle{width:38px;height:4px;border-radius:4px;background:#416271;margin:10px auto 0}
.fb-gif-sheet-header{display:flex;align-items:center;justify-content:space-between;padding:13px 18px 8px;gap:12px}.fb-gif-sheet-header h2{font-size:21px;letter-spacing:-.03em;margin:0}.fb-gif-sheet-header .fb-gif-close{float:none;min-height:40px;border:0;background:#12303e;color:#c2e4ec;padding:9px 13px}
.fb-gif-library{display:flex;flex-direction:column;min-height:0}.fb-gif-search-form{display:flex;gap:7px;padding:4px 16px 10px}.fb-gif-search-form .fb-gif-search{font-size:16px;line-height:1.3;border:1px solid #285065;border-radius:12px;background:#102e3c;color:#efffff;padding:12px;flex:1;min-width:0;width:auto}.fb-gif-search-form .fb-gif-search-submit{margin:0;min-height:44px;background:#0de2b1;color:#032a23;border:0;border-radius:12px;font-weight:750;padding:10px 13px}
.fb-gif-visually-hidden{position:absolute;width:1px;height:1px;padding:0!important;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.fb-gif-categories{display:flex;gap:7px;overflow-x:auto;padding:2px 16px 8px;scrollbar-width:thin}.fb-gif-category{min-height:36px;border:1px solid #245469;border-radius:999px;background:#0b2635;color:#aecedb;white-space:nowrap;padding:7px 12px;font:600 14px/1.3 inherit;cursor:pointer}.fb-gif-category[aria-pressed=true]{background:#124c45;color:#98ffe1;border-color:#168f78}
.fb-gif-dialog p.fb-gif-library-status{margin:4px 17px 8px;min-height:18px;font-size:14px;color:#b5d1dc}.fb-gif-browser{overflow-y:auto;overscroll-behavior:contain;min-height:180px;max-height:min(43dvh,360px);padding:0 12px 6px}.fb-gif-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.fb-gif-tile{border:0;border-radius:12px;overflow:hidden;background:#0d2d3d;cursor:pointer;position:relative;min-width:0;padding:0;aspect-ratio:1}.fb-gif-tile img{width:100%;height:100%;object-fit:cover;display:block}.fb-gif-tile-caption{position:absolute;bottom:0;left:0;right:0;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;font-size:14px;color:#eaffff;background:linear-gradient(transparent,#031724d9);padding:14px 7px 5px;opacity:0}.fb-gif-tile:focus-visible,.fb-gif-tile:hover{outline:2px solid #15e9b4;outline-offset:-2px}.fb-gif-tile:focus-visible .fb-gif-tile-caption,.fb-gif-tile:disabled .fb-gif-tile-caption{opacity:1}.fb-gif-tile:disabled{opacity:.55;cursor:default}
.fb-gif-skeleton{aspect-ratio:1;border-radius:12px;background:linear-gradient(110deg,#0d2c3a,#184252,#0d2c3a);background-size:200% 100%;animation:fb-gif-shimmer 1.5s linear infinite}@keyframes fb-gif-shimmer{to{background-position:-200% 0}}
.fb-gif-load-more{display:block;width:100%;min-height:44px;background:#0c3141;color:#c1f9ec;border:1px solid #286078;border-radius:12px;margin:8px 0;font:inherit;cursor:pointer}.fb-gif-load-more[hidden],.fb-gif-attribution[hidden]{display:none}.fb-gif-attribution{align-self:center;font-size:14px;letter-spacing:.02em;color:#b3d6df;margin:4px 0;text-decoration:none}.fb-gif-dialog p.fb-gif-library-privacy{margin:4px 16px 9px;color:#8caebd;font-size:14px;line-height:1.4}.fb-gif-other{border-top:1px solid #204757;padding:9px 16px 14px;max-height:35dvh;overflow-y:auto}.fb-gif-other summary{font-size:14px;color:#b5d5df;cursor:pointer;min-height:28px;line-height:28px}.fb-gif-other input[type=file]{font-size:14px}.fb-gif-dialog .fb-gif-other label{font-size:14px}.fb-gif-dialog .fb-gif-other p{font-size:14px}
@media(max-width:600px){.fb-gif-dialog.fb-gif-sheet{position:fixed;inset:auto 0 0;margin:0;width:100%;max-width:100%;border-radius:23px 23px 0 0;border-bottom:0;padding-bottom:env(safe-area-inset-bottom);max-height:90dvh}.fb-gif-browser{max-height:43dvh}.fb-gif-sheet-header{padding-top:11px}.fb-gif-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.fb-gif-tile{aspect-ratio:1.18}.fb-gif-other{max-height:28dvh}}
@media(prefers-reduced-motion:reduce){.fb-gif-skeleton{animation:none}}
.fb-gif-dialog.fb-gif-sheet{box-sizing:border-box}.fb-gif-dialog.fb-gif-sheet[open]{display:flex;flex-direction:column;height:min(86dvh,740px)}.fb-gif-dialog.fb-gif-sheet .fb-gif-library{flex:1;min-height:0}.fb-gif-dialog.fb-gif-sheet .fb-gif-browser{flex:1;min-height:60px;max-height:none}.fb-gif-sheet-header,.fb-gif-sheet-handle,.fb-gif-other,.fb-gif-search-form,.fb-gif-categories,.fb-gif-attribution,.fb-gif-library-status,.fb-gif-library-privacy{flex-shrink:0}.fb-gif-category{font:inherit;font-size:14px;font-weight:600;line-height:1.3}
@media(max-width:600px){.fb-gif-dialog.fb-gif-sheet[open]{height:min(90dvh,740px)}}

