/* Tabbed Layout and Blue USWDS theme styles*/

/* Main Wrapper & Global Settings */
div.swpc-animator-wrapper.layout-tabbed.style-blue {
  font-size: 16px; /* force an ADA compliant font size*/
}

/* Basic Tab layouts */
div.swpc-animator-wrapper.layout-tabbed.style-blue .ui-tabs {
  border: none;
}

/* table.product-grid is where the animation layouts live */

/* Animation image and animator container should not take up more than the viewport height of the page */
.product-grid img, .animationCanvas { 
    max-height: 80vh; 
}


div.swpc-animator-wrapper.layout-tabbed.style-blue .product-grid tr td {
  border: none;
  background-color: white;  
}

/* Hide mobile selector on large screens */
.swpc-animator-wrapper.layout-tabbed .animator-tabs #tab-selector {
  display: none !important;
}

/* Tab Row Layout */
div.swpc-animator-wrapper.layout-tabbed.style-blue .ui-tabs-nav {
  border: none;
  background: #fff;
  width: 100%;
  display: flex !important; 
  flex-direction: row !important; 
  padding: 0; 
  margin: 0;
  position: relative; 
}

/* Force ALL elements to take up identical mathematical widths */
div.swpc-animator-wrapper.layout-tabbed.style-blue .ui-tabs-nav > li {
  float: none !important;       
  flex: 1 1 0% !important; 
  display: flex !important;     
  flex-direction: column !important;
  justify-content: stretch !important; 
  align-items: stretch !important;     
  margin: 0 !important;
  padding: 0 !important;
}

/* Ensure sub-anchors fill standalone cells vertically */
div.swpc-animator-wrapper.layout-tabbed.style-blue .ui-tabs-nav li.animator-tab-item a.ui-tabs-anchor {
  height: 100%;
  display: flex !important;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-sizing: border-box;
  width: 100%;
}

/* Global focus state removal */
div.swpc-animator-wrapper.layout-tabbed.style-blue .ui-tabs-nav li:focus,
div.swpc-animator-wrapper.layout-tabbed.style-blue .ui-tabs-nav li a:focus {
  outline: none;
  box-shadow: none;
}

/* Default Unselected State */
.style-blue .ui-state-default,
.style-blue .dropdown-group-heading {
  border: 1px solid #005ea2 !important;
  background: #ffffff !important;
  margin: 0;
  font-size: 16px !important;
}

/* Text rules for basic tabs */
.style-blue .ui-state-default a.ui-tabs-anchor,
.style-blue .dropdown-group-heading {
  color: #005ea2 !important;
  font-weight: 400;
  padding: .5em 1em;
  text-align: center;
  font-size: 16px !important;
}

/* Active Selected Tab State */
.style-blue .ui-state-active,
.style-blue .ui-tabs-nav li.ui-state-active a.ui-tabs-anchor {
  background: #005ea2 !important;
  color: #ffffff !important;
  border-color: #005ea2 !important;
}

/* Parent Active State Highlight */

/* If the dropdown wrapper contains a list item that is currently active, turn the parent heading blue with white text. */
.style-blue .ui-tabs-nav li.tab-dropdown-wrapper:has(.dropdown-links-tray li.ui-state-active) .dropdown-group-heading
{
  background: #005ea2 !important;
  color: #ffffff !important;
  border-color: #005ea2 !important;
}
/* Nested Hover Dropdown Drawer Layout */

/* Parent Label Block Button */
div.swpc-animator-wrapper.layout-tabbed.style-blue .dropdown-group-heading {
  display: block;
  width: 100%;
  cursor: pointer;
}

/* Floating Drawer Container Box */
div.swpc-animator-wrapper.layout-tabbed.style-blue .dropdown-links-tray {
  display: none; 
  position: absolute;
  top: 100%; 
  left: 0;
  width: 100%; 
  background: #ffffff;
  border: 1px solid #005ea2;
  list-style: none;
  padding: 0;
  margin: 0;
  z-index: 999;
  box-shadow: 0px 4px 6px rgba(0,0,0,0.1);
}

/* Reset sub-menu items so they stack vertically inside the tray drawer */
div.swpc-animator-wrapper.layout-tabbed.style-blue .dropdown-links-tray li.animator-tab-item {
  width: 100% !important;
  display: block !important;
  border: none !important;
  margin: 0 !important;
}

/* Align links stacked inside the absolute layout box */
div.swpc-animator-wrapper.layout-tabbed.style-blue .dropdown-links-tray li.animator-tab-item a.ui-tabs-anchor {
  padding: 10px 15px !important;
  text-align: center !important;
  display: block !important;
}

/* Hover row highlight styling for unselected items inside the drawer link list */
div.swpc-animator-wrapper.layout-tabbed.style-blue .dropdown-links-tray li.animator-tab-item:not(.ui-state-active):hover a.ui-tabs-anchor {
  background-color: #f0f4f9 !important;
  color: #005ea2 !important;
}

/* Open the nested drawer array wrapper layout cleanly on hover */
div.swpc-animator-wrapper.layout-tabbed.style-blue .tab-dropdown-wrapper:hover .dropdown-links-tray {
  display: block;
}
/* Dropdown Parent Vertical Height Alignment */

/* Force the heading to grow to fill 100% of the dynamic container cell height */
div.swpc-animator-wrapper.layout-tabbed.style-blue .ui-tabs-nav li.tab-dropdown-wrapper .dropdown-group-heading {
  height: 100%;
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

div.swpc-animator-wrapper.layout-tabbed .ui-tabs-nav li.tab-dropdown-wrapper .dropdown-group-heading .arrow {
  font-size: 12px;;
}

/* Mobile Responsive Breakdown Rules */
@media screen and (max-width: 767px) {
  /* Hide the horizontal navbar */
  div.swpc-animator-wrapper.layout-tabbed.style-blue .ui-tabs-nav {
    display: none !important;
  }
  
  /* Render the mobile native select input element */
  .swpc-animator-wrapper.layout-tabbed .animator-tabs #tab-selector {
    display: block !important;
    width: 100%;
    height: auto;
    padding: 10px;
    margin-bottom: 15px;
    font-size: 16px;
  }
  
  /* Reset background boxes to match basic content layouts */
  .swpc-animator-wrapper.layout-tabbed .animator-tabs .ui-widget-content {
    border: none;
    background: transparent;
  }
  .swpc-animator-wrapper.layout-tabbed .animator-tabs .ui-tabs-panel {
    padding: 15px 0;
  }
}