/* ===== PHX tablet fixes (768–1319px). Loaded after phx.css and the other phx-* files. ===== */

/* desktop main menu: on iPad landscape (1024px) the 10 menu items were 1307px wide, so the last ones were cut off
   and the whole page could be dragged sideways. Smaller text and padding so all items fit.
   Journal sets the size per item with "div.main-menu.main-menu-3 > .j-menu li.main-menu-item-1 > a", so this selector is heavier. */
/* the menu's hidden sub-menus (flyouts) stick out past the right edge, so on tablets the page could be dragged sideways.
   "clip" cuts that off without breaking the sticky menu (tested at 1024 and 1280). */
@media (min-width:768px){
  html,html body{overflow-x:clip!important}
}
@media (min-width:768px) and (max-width:1199px){
  html body div.desktop-main-menu-wrapper div.main-menu.main-menu-3 > ul.j-menu > li.main-menu-item > a{font-size:12.5px!important;padding-left:6px!important;padding-right:6px!important;letter-spacing:0!important}
}
@media (min-width:1200px) and (max-width:1319px){
  html body div.desktop-main-menu-wrapper div.main-menu.main-menu-3 > ul.j-menu > li.main-menu-item > a{font-size:14px!important;padding-left:10px!important;padding-right:10px!important}
}

@media (min-width:768px) and (max-width:1199px){
  /* homepage hero, the two small product cards (AirPods / Nest): the round plate and image covered the title and price.
     Text stays above, and the image is a little smaller. */
  html body .phx-hero .phx-mini > div,html body .phx-hero .phx-mini .phx-mini-link{position:relative;z-index:2}
  html body .phx-hero .phx-mini h3{max-width:60%}
  html body .phx-hero .phx-mini .phx-mini-plate{width:180px!important;height:180px!important;top:auto!important;right:-26px!important;bottom:-26px!important}
  html body .phx-hero .phx-mini > img{width:140px!important;height:140px!important;top:auto!important;right:0!important;bottom:4px!important}

  /* product page gallery: when the page is one column, the box was as wide as the screen with the image small in the middle.
     Keep it at a sensible size and centred. */
  html body .phx-pg{max-width:620px;margin-left:auto;margin-right:auto}
}
@media (min-width:1024px) and (max-width:1199px){
  /* footer on iPad landscape: Journal put About / My Account at 50% and Company Info / Customer at 25% with no side padding,
     so the second pair sat out of line. Four equal columns with the same padding. */
  html body footer .grid-row-1 > .grid-cols > .grid-col{width:25%!important;max-width:25%!important;flex:0 0 25%!important;padding-left:20px!important;padding-right:20px!important}
}
@media (min-width:768px) and (max-width:1023px){
  /* iPad portrait: the cards are narrow (about 340px), so an even smaller image */
  html body .phx-hero .phx-mini .phx-mini-plate{width:150px!important;height:150px!important}
  html body .phx-hero .phx-mini > img{width:116px!important;height:116px!important}
  html body .phx-hero .phx-mini h3{max-width:64%}
}
