/**
 * Computer Country responsive overlay for Artisteer chrome.
 * Desktop (>=1000px) stays on Artisteer defaults. Fluid rules only below that.
 */

/* Allow phones to shrink; harmless on desktop when viewport is wide */
body,
#art-page-background-glare,
#art-page-background-glare-image,
#art-page-background-gradient,
#art-page-background-gradient-bottom,
#art-page-background-top-texture,
#art-page-background-middle-texture,
#art-page-background-bottom-texture {
  min-width: 0 !important;
}

/* Tablet / phone: unlock fixed 1000px chrome */
@media (max-width: 999px) {
  .art-sheet,
  .art-nav,
  .art-nav-wrapper,
  .art-nav-outer,
  .art-nav-inner {
    width: 100% !important;
    max-width: 1000px;
    box-sizing: border-box;
  }

  .art-sheet {
    margin-left: auto !important;
    margin-right: auto !important;
    background-color: #ffffff !important;
    background-image: none !important;
    overflow: visible !important;
  }

  .art-sheet-body {
    background-color: #ffffff !important;
  }

  .art-sheet-cc {
    display: block !important;
    background-color: #ffffff !important;
    background-image: none !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: auto !important;
    height: auto !important;
  }

  .art-nav {
    background-color: #3D91D6 !important;
    background-image: none !important;
    border-radius: 4px;
  }

  .art-footer {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .art-footer-body,
  .art-footer-text {
    max-width: 100%;
    box-sizing: border-box;
  }

  img,
  video,
  iframe {
    max-width: 100%;
    height: auto;
  }

  .art-content table,
  .art-postcontent table,
  .art-blockcontent table,
  .art-layout-cell table {
    max-width: 100%;
  }

  /* Keep the logo banner; drop promotional header art on tablet/phone */
  .art-nostyle.ccountry-banner:not(:has(.ccountry-logo)),
  .slideshow,
  .ccountry-banner .slideshow {
    display: none !important;
  }

  .ccountry-logo img {
    max-width: 100%;
    width: auto !important;
    height: auto !important;
  }

  .art-sheet-tl,
  .art-sheet-tr,
  .art-sheet-bl,
  .art-sheet-br,
  .art-sheet-tc,
  .art-sheet-bc,
  .art-sheet-cl,
  .art-sheet-cr,
  .art-nav-l,
  .art-nav-r,
  .custom-ccountry-page-title .l,
  .custom-ccountry-page-title .r,
  .art-vmenu a .l,
  .art-vmenu a .r {
    display: none !important;
  }

  /* CSS pills — keep the same 23px height as desktop Artisteer buttons */
  .art-hmenu a .l,
  .art-hmenu a .r {
    display: none !important;
  }

  ul.art-hmenu > li > a {
    background-color: #e6e6e6 !important;
    background-image: linear-gradient(#f7f7f7, #d4d4d4) !important;
    border: 1px solid #9a9a9a !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    height: 23px !important;
    min-height: 0 !important;
    max-height: 23px !important;
    padding: 0 10px !important;
    line-height: 21px !important;
    vertical-align: middle;
  }

  ul.art-hmenu > li > a .t {
    display: inline !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 21px !important;
    color: #000000 !important;
    background: none !important;
  }

  ul.art-hmenu > li > a:hover,
  ul.art-hmenu > li:hover > a,
  ul.art-hmenu > li > a.active {
    background-color: #4a9ad9 !important;
    background-image: linear-gradient(#6bb0e3, #3d91d6) !important;
    border-color: #2f6fa3 !important;
  }

  ul.art-hmenu > li > a:hover .t,
  ul.art-hmenu > li:hover > a .t,
  ul.art-hmenu > li > a.active .t {
    color: #ffffff !important;
  }

  html,
  body {
    overflow-x: hidden;
    overflow-y: auto;
  }

  #art-main {
    overflow: visible !important;
  }

  .custom-ccountry-page-title {
    right: 0 !important;
    left: 0 !important;
  }

  .custom-ccountry-page-title h2 {
    color: #ffffff !important;
  }

  .ccountry-rotator {
    right: 0 !important;
  }
}

/* Phone: title stays in blue bar; buttons sit in white area beside the logo */
@media (max-width: 720px) {
  .art-content-layout,
  .art-content-layout-row,
  .art-content-layout .art-layout-cell {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .art-content-layout .art-sidebar1,
  .art-content-layout .art-sidebar2,
  .art-content-layout .art-content {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .art-sheet,
  .art-nav {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .art-sheet-body,
  .art-content-layout,
  .art-post,
  .art-postcontent,
  .art-blockcontent {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  /* Blue bar: title only, one line (no wrap / no button fight) */
  .art-nav {
    min-height: 36px !important;
    overflow: visible !important;
  }

  .art-nav-outer,
  .art-nav-wrapper,
  .art-nav-inner {
    overflow: visible !important;
    height: auto !important;
  }

  .art-hmenu-extra1,
  .custom-ccountry-page-title {
    float: none !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 36px !important;
    margin: 0 !important;
    position: relative !important;
    text-align: left;
  }

  body.portal-branded .art-hmenu-extra1 {
    display: block !important;
    height: 36px !important;
    align-items: unset;
  }

  .custom-ccountry-page-title h2 {
    font-size: 0.85em !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 36px !important;
    height: 36px !important;
    margin: 0 !important;
    padding: 0 8px !important;
    left: 0 !important;
    max-width: 100%;
  }

  /*
   * Place Web Mail / My Account in the white sheet, right of the logo.
   * Positioned from the nav wrapper so they drop into the banner row.
   */
  ul.art-hmenu {
    position: absolute !important;
    top: 48px !important;
    right: 12px !important;
    left: auto !important;
    float: none !important;
    display: block !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: right;
    white-space: nowrap !important;
    z-index: 120;
  }

  ul.art-hmenu li {
    display: inline-block !important;
    float: none !important;
    vertical-align: middle;
    margin: 0 !important;
  }

  /* script.js inserts a 4px separator — don't add more margin on top of it */
  ul.art-hmenu > .art-hmenu-li-separator {
    display: inline-block !important;
    width: 4px !important;
    margin: 0 !important;
    vertical-align: middle;
  }

  ul.art-hmenu > li > a {
    display: inline-block !important;
    height: 23px !important;
    min-height: 0 !important;
    max-height: 23px !important;
    padding: 0 10px !important;
    line-height: 21px !important;
  }

  ul.art-hmenu > li > a .t {
    display: inline !important;
    line-height: 21px !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  ul.art-hmenu ul {
    position: static !important;
    display: none;
    width: auto !important;
  }

  .art-nostyle.ccountry-banner,
  .ccountry-banner {
    float: none !important;
    width: 100% !important;
    overflow: visible;
    position: relative;
  }

  /* Logo left; same max size on all sites so apps cannot outgrow www/RBL */
  .ccountry-logo {
    float: left !important;
    display: block;
    width: auto !important;
    max-width: 180px !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 10px 8px 10px 10px !important;
    text-align: left;
    box-sizing: border-box !important;
  }

  .ccountry-logo img,
  .ccountry-logo a img {
    display: block;
    max-width: 180px !important;
    width: auto !important;
    height: auto !important;
  }

  .ccountry-rotator {
    float: none !important;
    top: 0 !important;
    width: 100% !important;
  }

  .ccountry-loged-in {
    float: none !important;
    display: block;
    clear: both;
    width: auto !important;
    max-width: 100%;
    padding-left: 10px !important;
    padding-top: 4px !important;
    text-align: left;
    box-sizing: border-box;
  }

  div.r-pad-1 {
    width: auto !important;
    max-width: 100%;
  }

  div.cell-1 {
    float: none !important;
    display: block;
    padding-left: 0 !important;
    margin-bottom: 8px;
  }
}
