/* Photo gallery editor in the publication composer. */
body.forum-page .ff-compose-page .fc-media-actions [data-media-edit-all] {display:inline-flex;align-items:center;gap:5px;min-height:30px;padding:5px 9px;background:#15191fd9;color:#fff;font-size:.74rem;white-space:nowrap}
body.forum-page .ff-compose-page .fc-media-actions [data-media-edit-all][hidden] {display:none!important}
body.forum-page .fc-gallery-editor {box-sizing:border-box;width:min(640px,calc(100vw - 28px));max-height:calc(100dvh - 28px);padding:16px;border:0;border-radius:16px;background:var(--forum-card,#fff);color:var(--forum-text,#142033);box-shadow:0 18px 55px #0005;overflow:auto}
body.forum-page .fc-gallery-editor::backdrop {background:#0009}
body.forum-page .fc-gallery-editor [hidden] {display:none!important}
body.forum-page .fc-gallery-editor header {display:flex;align-items:center;gap:8px;margin-bottom:18px}
body.forum-page .fc-gallery-editor h2 {margin:0;font-size:1rem;font-weight:700}
body.forum-page .fc-gallery-editor header [data-editor-close] {margin-left:auto;font-size:1.4rem}
body.forum-page .fc-gallery-editor button {border:0;cursor:pointer;font:inherit}
body.forum-page .fc-gallery-editor header button,body.forum-page .fc-gallery-editor footer button {min-height:34px;padding:6px 12px;border-radius:999px;background:#e7ecef;color:#142033}
body.forum-page .fc-gallery-editor header button {width:34px;padding:0}
body.forum-page .fc-gallery-editor footer {display:flex;align-items:center;gap:8px;margin-top:24px}
body.forum-page .fc-gallery-editor footer span {flex:1}
body.forum-page .fc-gallery-editor footer .fc-editor-save {background:#101820;color:#fff}
body.forum-page .fc-gallery-editor-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
body.forum-page .fc-gallery-editor-card {position:relative;min-width:0;aspect-ratio:4/3;overflow:hidden;border:1px solid #cbd3da;border-radius:15px;background:#eef0f1}
body.forum-page .fc-gallery-editor-card img {display:block;width:100%;height:100%;object-fit:contain}
body.forum-page .fc-gallery-editor-card button {position:absolute;top:7px;min-height:30px;padding:5px 9px;border-radius:999px;background:#15191fdb;color:#fff;font-size:.75rem}
body.forum-page .fc-gallery-editor-card-edit {left:7px}
body.forum-page .fc-gallery-editor-card-remove {right:7px}
body.forum-page .fc-gallery-editor-stage {position:relative;display:grid;place-items:center;height:min(34vh,260px);min-height:180px;overflow:hidden;border-radius:14px;background:#e1e4e7}
body.forum-page .fc-gallery-editor-stage img {max-width:100%;max-height:100%;object-fit:contain}
body.forum-page .fc-gallery-editor-stage button {position:absolute;top:50%;width:30px;height:30px;padding:0;transform:translateY(-50%);border-radius:50%;background:#15191fc9;color:#fff;font-size:1.3rem}
body.forum-page .fc-gallery-editor-stage [data-editor-prev] {left:8px}
body.forum-page .fc-gallery-editor-stage [data-editor-next] {right:8px}
body.forum-page .fc-gallery-editor-stage [data-editor-count] {position:absolute;bottom:8px;padding:3px 9px;border-radius:999px;background:#15191fc9;color:#fff;font-size:.72rem}
body.forum-page .fc-gallery-editor-photo label {display:block;margin-top:14px;font-size:.82rem;font-weight:600}
body.forum-page .fc-gallery-editor-photo input {box-sizing:border-box;display:block;width:100%;min-height:42px;margin-top:5px;padding:8px 12px;border:1px solid #cbd3da;border-radius:12px;background:var(--forum-card,#fff);color:var(--forum-text,#142033);font:inherit;font-weight:400}
body.forum-page .fc-gallery-editor-photo small {display:block;margin-top:3px;text-align:right;opacity:.7}
body.forum-page .ff-gallery-photo,body.forum-page .ff-post-media {margin:0}
body.forum-page .ff-gallery-photo figcaption,body.forum-page .ff-post-media:has(img):not(:has(video)) figcaption {padding:7px 10px;background:var(--forum-card,#fff);color:var(--forum-text,#142033);font-size:.85rem;text-align:left}
body.forum-page .ff-post-media:has(video) > figcaption {position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;clip-path:inset(50%)!important;white-space:nowrap!important;border:0!important}
html[data-theme="dark"] body.forum-page .fc-gallery-editor footer button:not(.fc-editor-save),html[data-theme="dark"] body.forum-page .fc-gallery-editor header button {background:#263448;color:#fff}
html[data-theme="dark"] body.forum-page .fc-gallery-editor-card {background:#263448}
@media(max-width:650px) {body.forum-page .fc-gallery-editor {padding:14px}body.forum-page .fc-gallery-editor-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}body.forum-page .fc-gallery-editor footer {flex-wrap:wrap}body.forum-page .fc-gallery-editor footer [data-editor-add] {flex-basis:100%;text-align:left}body.forum-page .ff-compose-page .fc-media-actions [data-media-edit-all] {padding:5px 7px;font-size:.7rem}}
@media(max-width:560px) {
  body.forum-page .ff-compose-page .fc-has-preview .fc-media-actions {
    display:grid!important;
    grid-template-columns:max-content max-content minmax(0,1fr) 38px;
    grid-template-rows:auto auto;
    align-items:start;
    justify-content:initial;
    gap:6px!important;
    inset:8px 8px auto!important;
  }
  body.forum-page .ff-compose-page .fc-media-actions :is([data-media-add],[data-media-edit-all],[data-media-to-body]) {
    box-sizing:border-box;
    min-width:0;
    min-height:32px;
    padding:5px 7px;
    white-space:nowrap;
    line-height:1.2;
    font-size:.68rem;
  }
  body.forum-page .ff-compose-page .fc-media-actions [data-media-add] {grid-column:1;grid-row:1;gap:4px}
  body.forum-page .ff-compose-page .fc-media-actions [data-media-add] svg {width:14px;height:14px}
  body.forum-page .ff-compose-page .fc-media-actions [data-media-edit-all] {grid-column:2;grid-row:1}
  body.forum-page .ff-compose-page .fc-media-actions [data-media-to-body] {grid-column:1 / 3;grid-row:2;justify-self:start}
  body.forum-page .ff-compose-page .fc-media-actions [data-media-remove] {grid-column:4;grid-row:1;margin-left:0;justify-self:end}
}
