/* ForumX R85 — messages access + private image upload */
.site-header [data-fx-message-link] { position:relative; }
@media (max-width:760px) {
  .site-header [data-fx-message-link] {
    display:inline-grid !important;
    place-items:center !important;
    width:42px !important;
    min-width:42px !important;
    height:42px !important;
    min-height:42px !important;
  }
  .site-header .header-actions { gap:5px !important; }
}
@media (max-width:420px) {
  .site-header [data-fx-message-link] {
    width:39px !important; min-width:39px !important; height:39px !important; min-height:39px !important;
  }
  .site-header .header-actions { gap:3px !important; }
}

.fx-msg-image-row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.fx-msg-image-button {
  display:inline-flex; align-items:center; gap:8px; min-height:40px; padding:0 13px;
  border:1px solid color-mix(in srgb, var(--accent,#4f8cff) 26%, rgba(130,155,190,.22));
  border-radius:12px; background:rgba(255,255,255,.035); color:var(--text,#e8eef7); font-weight:700; cursor:pointer;
}
.fx-msg-image-button:hover { background:color-mix(in srgb, var(--accent,#4f8cff) 12%, rgba(255,255,255,.035)); }
.fx-msg-image-button .forumx-icon { width:17px; height:17px; }
.fx-msg-image-preview {
  display:grid; grid-template-columns:52px minmax(0,1fr) 34px; align-items:center; gap:10px;
  min-width:min(100%,320px); max-width:440px; padding:7px 8px;
  border:1px solid rgba(123,153,194,.18); border-radius:12px; background:rgba(7,19,31,.54);
}
.fx-msg-image-preview[hidden] { display:none !important; }
.fx-msg-image-preview img { width:52px; height:52px; object-fit:cover; border-radius:9px; }
.fx-msg-image-preview span { display:grid; gap:2px; min-width:0; }
.fx-msg-image-preview strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; }
.fx-msg-image-preview small { color:var(--muted,#8d9caf); font-size:10px; }
.fx-msg-image-preview button {
  width:32px; height:32px; border:0; border-radius:9px; background:rgba(255,255,255,.05); color:#c8d5e5; font-size:20px; cursor:pointer;
}
.fx-chat-attach-wrap { position:relative; }
.fx-chat-attach-wrap > .fx-msg-image-preview.is-composer {
  position:absolute; left:0; bottom:calc(100% + 10px); z-index:75; width:300px;
  box-shadow:0 16px 38px rgba(0,0,0,.34);
}
.fx-chat-bubble .post-body img {
  display:block; max-width:min(100%,460px) !important; max-height:560px; object-fit:contain;
  margin:7px 0 3px; border-radius:14px !important; cursor:zoom-in;
}
@media (max-width:640px) {
  .fx-msg-image-preview { grid-template-columns:44px minmax(0,1fr) 32px; width:100%; max-width:100%; }
  .fx-msg-image-preview img { width:44px; height:44px; }
  .fx-chat-attach-wrap > .fx-msg-image-preview.is-composer { width:min(78vw,300px); }
}
