/* FPC Wire v1.9.4 — canonical stability layer */
/* This file intentionally owns only shell/message behavior. */

/* Never allow the retired cloned mobile drawer to intercept taps. */
.wire-mobile-menu-toggle-v189d,
.wire-mobile-menu-overlay-v189d,
.wire-mobile-menu-drawer-v189d{display:none!important;pointer-events:none!important}
html.wire-menu-open,html.wire-menu-open body{overflow:auto!important}

/* The server-rendered verification badge must remain visible. */
.verified-badge{display:inline-flex!important;visibility:visible!important;width:auto!important;height:auto!important;margin-left:4px!important;vertical-align:middle!important}
.verified-badge img{display:block!important;visibility:visible!important;width:20px!important;height:20px!important;max-width:20px!important;object-fit:contain!important}

/* Desktop message shell: one constrained grid with no fixed children. */
@media (min-width:800px){
  .messages-shell{display:grid!important;grid-template-columns:minmax(240px,34%) minmax(0,1fr)!important;width:100%!important;max-width:100%!important;min-width:0!important;overflow:hidden!important}
  .conversation-sidebar,.message-thread-panel{min-width:0!important;max-width:none!important}
  .message-thread-panel{display:grid!important;grid-template-rows:auto minmax(0,1fr) auto!important;height:calc(100dvh - 66px)!important;overflow:hidden!important}
  .message-thread{min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important}
  .message-composer{position:relative!important;inset:auto!important;display:grid!important;grid-template-columns:42px minmax(0,1fr) auto!important;gap:9px!important;width:100%!important;max-width:100%!important;overflow:visible!important}
}

@media (max-width:799px){
  body.wire-message-page-v190c{overflow:hidden!important;padding-bottom:0!important}
  body.wire-message-page-v190c .messages-page-header{display:none!important}
  body.wire-message-page-v190c .content-column{height:100dvh!important;min-height:0!important;overflow:hidden!important;border:0!important}
  body.wire-message-page-v190c .messages-shell.has-active-thread{
    display:block!important;
    position:fixed!important;
    inset:0 0 calc(var(--wire-native-mobile-nav-height,76px) + env(safe-area-inset-bottom)) 0!important;
    width:auto!important;
    height:auto!important;
    min-height:0!important;
    margin:0!important;
    overflow:hidden!important;
    border:0!important;
    border-radius:0!important;
    background:#050b11!important;
  }
  body.wire-message-page-v190c .messages-shell.has-active-thread .conversation-sidebar{display:none!important}
  body.wire-message-page-v190c .messages-shell:not(.has-active-thread){display:block!important;min-height:calc(100dvh - var(--wire-native-mobile-nav-height,76px))!important}
  body.wire-message-page-v190c .message-thread-panel{
    display:grid!important;
    grid-template-rows:auto minmax(0,1fr) auto!important;
    width:100%!important;
    height:100%!important;
    min-width:0!important;
    min-height:0!important;
    overflow:hidden!important;
  }
  body.wire-message-page-v190c .message-thread-header{
    position:relative!important;
    z-index:2!important;
    display:grid!important;
    grid-template-columns:38px minmax(0,1fr) auto!important;
    min-height:64px!important;
    padding:8px 10px!important;
    cursor:default!important;
  }
  body.wire-message-page-v190c .message-thread-header>a:nth-child(2){display:flex!important;align-items:center!important;gap:9px!important;min-width:0!important}
  body.wire-message-page-v190c .message-thread-actions{min-width:0!important}
  body.wire-message-page-v190c .thread-spam-button{display:none!important}
  body.wire-message-page-v190c .message-thread{
    min-height:0!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    padding:12px 11px 16px!important;
    -webkit-overflow-scrolling:touch!important;
    overscroll-behavior:contain!important;
  }
  body.wire-message-page-v190c .message-composer{
    position:relative!important;
    inset:auto!important;
    z-index:3!important;
    display:grid!important;
    grid-template-columns:42px minmax(0,1fr) auto!important;
    grid-template-areas:'media text send' 'filename filename filename'!important;
    align-items:end!important;
    gap:8px!important;
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:8px max(9px,env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(9px,env(safe-area-inset-left))!important;
    box-sizing:border-box!important;
    border-top:1px solid #26384e!important;
    background:#07111b!important;
    overflow:visible!important;
    pointer-events:auto!important;
    transform:none!important;
  }
  body.wire-message-page-v190c .message-composer textarea{
    grid-area:text!important;
    position:relative!important;
    z-index:5!important;
    display:block!important;
    width:100%!important;
    min-width:0!important;
    min-height:44px!important;
    max-height:120px!important;
    height:auto!important;
    margin:0!important;
    padding:10px 12px!important;
    border:1px solid #30455d!important;
    border-radius:16px!important;
    background:#0c1825!important;
    color:#fff!important;
    caret-color:#fff!important;
    opacity:1!important;
    visibility:visible!important;
    pointer-events:auto!important;
    touch-action:manipulation!important;
    -webkit-user-select:text!important;
    user-select:text!important;
    -webkit-appearance:none!important;
    appearance:none!important;
  }
  body.wire-message-page-v190c .message-composer .message-media-picker{grid-area:media!important;width:42px!important;height:42px!important;margin:1px 0!important}
  body.wire-message-page-v190c .message-composer .primary-button{grid-area:send!important;min-width:66px!important;min-height:42px!important;margin:1px 0!important;padding:0 14px!important}
  body.wire-message-page-v190c .message-composer .media-file-name{grid-area:filename!important;min-height:0!important}
  body.wire-message-page-v190c .message-back-link{display:grid!important;place-items:center!important;width:38px!important;height:44px!important}

  /* Closed rails and retired overlays must never sit above the text field. */
  body.wire-message-page-v190c .left-rail:not(.open):not(.is-open){pointer-events:none!important}
  body.wire-message-page-v190c .wire-mobile-menu-overlay-v189d,
  body.wire-message-page-v190c .wire-mobile-menu-drawer-v189d{display:none!important;pointer-events:none!important}
}
