/*
 * GP HUBS Enterprise v14.15 — Compact Mobile Domain / View Rules Header
 * Keeps only the View Rules pill itself; removes inherited outer shells so the
 * website domain receives the maximum horizontal space on phones.
 */
@media (max-width:760px){
  #publisher-marketplace.gph-v114-marketpage .gph-v1414-mobile-head{
    grid-template-columns:minmax(0,1fr) auto!important;
    align-items:center!important;
    gap:8px!important;
  }

  /* Explicitly neutralise any legacy details/card styling around View Rules. */
  #publisher-marketplace.gph-v114-marketpage .gph-v1414-rules{
    display:block!important;
    position:relative!important;
    justify-self:end!important;
    align-self:center!important;
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
    height:auto!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    outline:0!important;
    background:transparent!important;
    background-image:none!important;
    box-shadow:none!important;
    overflow:visible!important;
  }

  /* Keep only the compact inner action. */
  #publisher-marketplace.gph-v114-marketpage .gph-v1414-rules>summary{
    width:auto!important;
    min-width:80px!important;
    max-width:none!important;
    min-height:38px!important;
    margin:0!important;
    padding:0 11px!important;
    border:1px solid #d9ddf8!important;
    border-radius:999px!important;
    background:#f7f6ff!important;
    box-shadow:none!important;
    white-space:nowrap!important;
  }

  /* Domain owns the remaining line and no longer breaks into two rows. */
  #publisher-marketplace.gph-v114-marketpage .gph-v1414-mobile-domain,
  #publisher-marketplace.gph-v114-marketpage .gph-v1414-mobile-domainline{
    min-width:0!important;
    width:100%!important;
  }
  #publisher-marketplace.gph-v114-marketpage .gph-v1414-mobile-domainline{
    flex-wrap:nowrap!important;
    column-gap:6px!important;
  }
  #publisher-marketplace.gph-v114-marketpage .gph-v1414-mobile-domainline>a{
    flex:1 1 auto!important;
    width:auto!important;
    min-width:0!important;
    max-width:100%!important;
    font-size:clamp(14px,4vw,16px)!important;
    line-height:1.2!important;
    letter-spacing:-.035em!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
  }

  /* Badges must never steal the title line. */
  #publisher-marketplace.gph-v114-marketpage .gph-v1414-new,
  #publisher-marketplace.gph-v114-marketpage .gph-v1414-gp{
    flex:0 0 auto!important;
  }
}

@media (max-width:430px){
  #publisher-marketplace.gph-v114-marketpage .gph-v1414-mobile-head{
    grid-template-columns:minmax(0,1fr) auto!important;
    gap:6px!important;
    padding:13px 12px 11px!important;
  }
  #publisher-marketplace.gph-v114-marketpage .gph-v1414-rules>summary{
    min-width:74px!important;
    min-height:36px!important;
    padding:0 9px!important;
    font-size:10.5px!important;
  }
  #publisher-marketplace.gph-v114-marketpage .gph-v1414-mobile-domainline>a{
    font-size:15px!important;
  }
}

@media (max-width:360px){
  /* v14.14 stacked the Rules action under the domain at 360px; keep one line now. */
  #publisher-marketplace.gph-v114-marketpage .gph-v1414-mobile-head{
    grid-template-columns:minmax(0,1fr) auto!important;
  }
  #publisher-marketplace.gph-v114-marketpage .gph-v1414-rules{
    justify-self:end!important;
  }
  #publisher-marketplace.gph-v114-marketpage .gph-v1414-rules>summary{
    min-width:68px!important;
    min-height:34px!important;
    padding:0 8px!important;
    font-size:10px!important;
  }
  #publisher-marketplace.gph-v114-marketpage .gph-v1414-mobile-domainline>a{
    font-size:14px!important;
  }
  #publisher-marketplace.gph-v114-marketpage .gph-v1414-new{display:none!important}
}
