/* Parent cabinet: messenger full-bleed (rules must live in PARENT, not iframe).
   Designs: Compact list / conversation — no inset card, pad only for MobileBottomNav. */

.gm-master-shell.gm-messenger-active {
  /* lock scroll on messenger route */
}

@media (max-width: 1023px) {
  .gm-master-shell.gm-messenger-active {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }

  .gm-master-shell.gm-messenger-active .gm-messenger-main-wrap {
    /* space for MobileBottomNav */
    padding-bottom: calc(5.75rem + env(safe-area-inset-bottom, 0px)) !important;
    min-height: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    /* definite height so iframe % heights resolve */
    height: 100dvh;
    max-height: 100dvh;
    box-sizing: border-box;
    overflow: hidden;
  }

  .gm-master-shell.gm-messenger-active .gm-messenger-main {
    padding: 0 !important;
    min-height: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
  }

  .gm-messenger-page {
    position: absolute !important;
    inset: 0 !important;
    flex: none !important;
    min-height: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .gm-messenger-frame,
  .gm-messenger-frame iframe {
    display: block !important;
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #081018 !important;
  }
}

@media (min-width: 1024px) {
  .gm-master-shell.gm-messenger-active {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .gm-master-shell.gm-messenger-active .gm-messenger-main-wrap {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    max-height: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .gm-master-shell.gm-messenger-active .gm-messenger-main {
    padding: 0 !important;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .gm-messenger-page,
  .gm-messenger-frame {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    height: 100%;
    border-radius: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    overflow: hidden;
  }

  .gm-messenger-frame iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #081018;
  }
}
