/*
 * ============================================================
 * NOYTRIX API DOCS — STANDALONE WORKSPACE TAB V55
 *
 * Real docs root:
 * #nxd-docs-v41
 *
 * Desktop:
 * sidebar remains visible
 * documentation completely replaces previous workspace screen
 * ============================================================
 */


@media (min-width: 1200px) {


  /* ==========================================================
     1. HIDE OLD API PAGE WHILE DOCS ARE OPEN
     ========================================================== */

  body:has(#nxd-docs-v41)
  #screen-api {

    visibility:
      hidden
      !important;

    pointer-events:
      none
      !important;
  }


  /*
   * Docs live directly under body,
   * therefore hiding #screen-api does NOT hide docs.
   */


  /* ==========================================================
     2. DOCS = FULL WORKSPACE TAB
     ========================================================== */

  html body
  #nxd-docs-v41 {

    position:
      fixed
      !important;

    top:
      0
      !important;

    right:
      0
      !important;

    bottom:
      0
      !important;

    left:
      var(
        --nx-docs-left-v55,
        255px
      )
      !important;


    width:
      auto
      !important;

    height:
      auto
      !important;


    min-width:
      0
      !important;

    min-height:
      0
      !important;


    max-width:
      none
      !important;

    max-height:
      none
      !important;


    margin:
      0
      !important;

    padding:
      0
      !important;


    border:
      0
      !important;

    border-radius:
      0
      !important;


    box-shadow:
      none
      !important;


    background:
      #061326
      !important;


    overflow:
      hidden
      !important;


    opacity:
      1
      !important;


    transform:
      none
      !important;


    z-index:
      999999
      !important;


    isolation:
      isolate
      !important;


    box-sizing:
      border-box
      !important;
  }


  /* ==========================================================
     3. COMPLETELY OPAQUE BACKGROUND
     ========================================================== */

  #nxd-docs-v41::before {

    content:
      "";

    position:
      absolute;

    inset:
      0;

    z-index:
      -2;

    background:
      #061326;

    pointer-events:
      none;
  }


  #nxd-docs-v41::after {

    content:
      "";

    position:
      absolute;

    inset:
      0;

    z-index:
      -1;

    background:
      linear-gradient(
        135deg,
        rgba(
          8,
          28,
          52,
          .98
        ),
        rgba(
          4,
          17,
          33,
          .99
        )
      );

    pointer-events:
      none;
  }


  /* ==========================================================
     4. TOP BAR = REAL TAB HEADER
     ========================================================== */

  #nxd-docs-v41
  .nxd-top {

    position:
      relative
      !important;

    top:
      auto
      !important;

    left:
      auto
      !important;

    right:
      auto
      !important;


    width:
      100%
      !important;

    max-width:
      none
      !important;


    margin:
      0
      !important;


    border-radius:
      0
      !important;


    background:
      #07162a
      !important;


    box-shadow:
      none
      !important;


    z-index:
      20
      !important;


    box-sizing:
      border-box
      !important;
  }


  /* ==========================================================
     5. LEFT DOCS NAVIGATION
     ========================================================== */

  #nxd-docs-v41
  .nxd-nav {

    background:
      #061326
      !important;

    border-radius:
      0
      !important;


    min-height:
      0
      !important;


    overflow-y:
      auto
      !important;

    overflow-x:
      hidden
      !important;


    box-sizing:
      border-box
      !important;
  }


  /* ==========================================================
     6. EVERYTHING INSIDE STAYS ABOVE OPAQUE ROOT
     ========================================================== */

  #nxd-docs-v41
  > * {

    position:
      relative;

    z-index:
      1;
  }


  /* ==========================================================
     7. REMOVE OLD MODAL-LIKE GEOMETRY
     ========================================================== */

  #nxd-docs-v41,

  #nxd-docs-v41
  > div,

  #nxd-docs-v41
  > main {

    max-width:
      none
      !important;

    max-height:
      none
      !important;

    border-radius:
      0
      !important;
  }


  /* ==========================================================
     8. CENTRAL CONTENT SHOULD USE AVAILABLE WIDTH
     ========================================================== */

  #nxd-docs-v41
  .nxd-main-inner {

    width:
      100%
      !important;

    max-width:
      1100px
      !important;

    margin-left:
      auto
      !important;

    margin-right:
      auto
      !important;

    box-sizing:
      border-box
      !important;
  }


  /* ==========================================================
     9. CODE / RIGHT PANEL
     No transparent areas back to old page.
     ========================================================== */

  #nxd-docs-v41
  aside,

  #nxd-docs-v41
  [class*="aside"],

  #nxd-docs-v41
  [class*="code-panel"] {

    background-color:
      #061326
      !important;
  }


  /* ==========================================================
     10. NO OUTER GAP ANYWHERE
     ========================================================== */

  body:has(#nxd-docs-v41) {

    overflow:
      hidden
      !important;
  }


  body:has(#nxd-docs-v41)
  .workspace {

    overflow:
      hidden
      !important;
  }


}


/*
 * ============================================================
 * TABLET / MOBILE
 *
 * Docs still become a full standalone page,
 * but sidebar geometry is not forced.
 * ============================================================
 */

@media (max-width: 1199px) {


  html body
  #nxd-docs-v41 {

    position:
      fixed
      !important;

    inset:
      0
      !important;


    width:
      100vw
      !important;

    height:
      100dvh
      !important;


    max-width:
      none
      !important;

    max-height:
      none
      !important;


    margin:
      0
      !important;


    border-radius:
      0
      !important;


    background:
      #061326
      !important;


    z-index:
      999999
      !important;
  }

}
