/* ============================================================
   SWESUND EKONOMI
   MOBILE ACTIVE COMPANY / COMPANY SWITCHER V1
   Desktop untouched.
   ============================================================ */

@media (max-width:900px){

  /*
   * Keep the real V9 company selector visible on mobile.
   * The selector is populated by v9/core/app.js from the
   * companies the authenticated user is allowed to access.
   */

  #appView .v9-topbar-left{
    display:flex !important;
    align-items:center !important;
    flex:1 1 auto !important;
    min-width:0 !important;
    width:auto !important;
  }


  /*
   * On a small screen, company context is more important than
   * repeating the product title and fiscal-year control.
   */

  #appView .v9-topbar-left .v9-product-title,
  #appView .v9-topbar-left .v9-context-divider,
  #appView .v9-topbar-left .v9-year-context{
    display:none !important;
  }


  #appView .v9-company-context{
    display:flex !important;
    visibility:visible !important;
    opacity:1 !important;

    flex-direction:column !important;
    align-items:flex-start !important;

    gap:3px !important;

    width:min(58vw,280px) !important;
    min-width:0 !important;
    max-width:280px !important;

    margin:0 !important;
    padding:0 !important;
  }


  #appView .v9-company-context small{
    display:block !important;

    margin:0 !important;

    color:#66788c !important;

    font-size:9px !important;
    line-height:1.1 !important;

    font-weight:800 !important;

    text-transform:uppercase !important;
    letter-spacing:.055em !important;
  }


  #appView #v9CompanySelect{
    display:block !important;
    visibility:visible !important;
    opacity:1 !important;

    width:100% !important;
    min-width:0 !important;
    max-width:280px !important;

    height:34px !important;

    margin:0 !important;

    padding:
      0
      28px
      0
      9px !important;

    border:
      1px solid
      #ccd8e4 !important;

    border-radius:8px !important;

    background-color:#fff !important;

    color:#102d49 !important;

    font-size:12px !important;
    font-weight:750 !important;

    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;

    cursor:pointer !important;
  }


  #appView #v9CompanySelect:focus{
    outline:none !important;

    border-color:#3978ad !important;

    box-shadow:
      0
      0
      0
      3px
      rgba(57,120,173,.12) !important;
  }


  /*
   * Do not let the right side of the topbar crush the company
   * selector when the viewport gets narrow.
   */

  #appView .v9-topbar-right{
    flex:0 0 auto !important;
    min-width:0 !important;
  }

}


@media (max-width:620px){

  #appView .v9-company-context{
    width:min(61vw,245px) !important;
    max-width:245px !important;
  }


  #appView #v9CompanySelect{
    max-width:245px !important;

    height:36px !important;

    font-size:12px !important;
  }

}


@media (max-width:390px){

  #appView .v9-company-context{
    width:min(58vw,205px) !important;
    max-width:205px !important;
  }


  #appView #v9CompanySelect{
    max-width:205px !important;
  }

}