/* Brand Button Navigation Styles for Disney+ Layout - 7 DESKTOP / 4 MOBILE */

/* Global CSS Variables - Disney+ Authentic Measurements with 16:9 ratio */
:root {
  --a3h1kk3: 4px;  /* Small border radius */
  --a3h1kk5: 8px;  /* Medium border radius */
  --disney-blue: #1E40AF;
  --_1unjxn0: 16 / 9; /* Disney+ 16:9 aspect ratio */
}

/* Main brand button container */
[data-set-style="brand"] {
  position: relative;
  width: 100%;
  margin: 24px 0;
  padding: 0 3.5vw; /* Disney+ page padding */
}

/* DISNEY+ EXACT: Brand buttons container */
._18tvqir1 {
  display: flex;
  justify-content: space-between; /* Distribute across full width */
  align-items: center;
  gap: 12px; /* Default gap */
  width: 100%; /* Take full container width */
  margin: 0;
  padding: 0;
  flex-wrap: nowrap; /* Keep on one line on desktop */
}

/* DISNEY+ EXACT: Individual brand button */
._180kkgi1 {
  flex: 1; /* Each button takes equal width of available space */
  border-radius: 10px; 
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  text-decoration: none;
  display: block;
  position: relative;
  transform: scale(1) translateZ(0);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
  min-width: 80px;
}

/* Remove old grid system completely */
.t62z113 {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.t62z110 {
  padding-bottom: 0;
}

/* DISNEY+ EXACT: Brand button tile container - 16:9 aspect ratio */
._1unjxn2 {
  aspect-ratio: var(--_1unjxn0); /* 16:9 aspect ratio like Disney+ */
  width: 100%;
  position: relative;
  border-radius: inherit;
  overflow: hidden;
}

._97ius31 {
  position: relative;
  width: 100%;
  height: 100%;
  transform: scale(1) translateZ(0);
  -webkit-font-smoothing: subpixel-antialiased;
  border-radius: inherit;
}

/* Alternative for browsers that don't support aspect-ratio */
._1055dze0 {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: calc(9 / 16 * 100%); /* 16:9 Aspect Ratio fallback */
  background-color: #2d2f36; /* Disney+ lighter background */
}

/* DISNEY+ EXACT: Image container within brand button */
._1unjxn5 {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  border-radius: inherit;
}

._1unjxn4 {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  border-radius: inherit;
}

/* Disney+ background color class */
.r3t2ih7y {
  background: #2d2f36;
}

/* DISNEY+ EXACT: Brand logo image */
.t62z115,
._1unjxn3,
.c2fcyk0,
._1055dze3 {
  width: 75%;
  height: auto;
  object-fit: contain; /* Keep logo proportions */
  object-position: center;
  border-radius: inherit;
  display: block;
  z-index: 1;
}

/* DISNEY+ EXACT: Brand video styling */
.t62z119,
.t62z118 {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 0;
}

/* DESKTOP ONLY (≥768px): 7 buttons with video hover effects */
@media (min-width: 768px) {
  /* Hover effects for video playback */
  ._180kkgi1:hover .t62z119, 
  .stueet1:hover .t62z118 {
    opacity: 1;
  }

  ._180kkgi1:hover .c2fcyk0, 
  .stueet1:hover ._1055dze3 {
    opacity: 0.3;
  }
  
  /* 7 buttons across on desktop */
  ._18tvqir1 {
    flex-wrap: nowrap;
  }
  
  ._180kkgi1 {
    flex: 1;
  }
}

/* MOBILE ONLY (<768px): 4 buttons across, no video */
@media (max-width: 767px) {
  [data-set-style="brand"] {
    margin: 16px 0;
    padding: 0 16px;
  }
  
  ._18tvqir1 {
    gap: 8px;
    flex-wrap: wrap; /* Allow wrapping on mobile */
    justify-content: space-between;
  }
  
  ._180kkgi1 {
    flex: 0 0 calc(25% - 6px); /* EXACTLY 4 buttons per row */
    min-width: 0;
    max-width: calc(25% - 6px);
    border-radius: 6px;
  }
  
  /* Smaller logos on mobile */
  .t62z115,
  ._1unjxn3,
  .c2fcyk0,
  ._1055dze3 {
    width: 70%;
  }
  
  /* NO video effects on mobile - images stay static */
  ._180kkgi1:hover .t62z119, 
  .stueet1:hover .t62z118 {
    opacity: 0; /* Keep videos hidden on mobile */
  }

  ._180kkgi1:hover .c2fcyk0, 
  .stueet1:hover ._1055dze3 {
    opacity: 1; /* Keep static images visible on mobile */
  }
}

/* Enhanced hover effects - Disney+ style */
._180kkgi1:hover, 
.stueet1:hover, 
._180kkgi0:hover {
  transform: scale(1.03) translateZ(0);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  z-index: 10;
}

._180kkgi1:focus, 
.stueet1:focus, 
._180kkgi0:focus {
  outline: 2px solid var(--disney-blue, #1E40AF);
  outline-offset: 2px;
}

/* Shadow effect for brand buttons */
._97ius31::after {
  content: "";
  position: absolute;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
  left: 3px;
  width: calc(100% - 6px);
  bottom: 3px;
  height: 12px;
  z-index: -1;
  border-radius: inherit;
}

/* Clean up base styles */
.stueet1 {
  display: block;
  text-decoration: none;
  color: inherit;
}

.stueet1:visited {
  text-decoration: none;
  color: inherit;
}

/* Smaller mobile screens */
@media (max-width: 480px) {
  ._18tvqir1 {
    gap: 6px;
  }
  
  ._180kkgi1 {
    flex: 0 0 calc(25% - 4.5px);
    max-width: calc(25% - 4.5px);
    border-radius: 4px;
  }
  
  .t62z115,
  ._1unjxn3,
  .c2fcyk0,
  ._1055dze3 {
    width: 65%;
  }
}

/* Very small screens */
@media (max-width: 360px) {
  ._18tvqir1 {
    gap: 4px;
  }
  
  ._180kkgi1 {
    flex: 0 0 calc(25% - 3px);
    max-width: calc(25% - 3px);
  }
  
  .t62z115,
  ._1unjxn3,
  .c2fcyk0,
  ._1055dze3 {
    width: 60%;
  }
}

/* Accessibility improvements */
._180kkgi1[aria-label] {
  position: relative;
}

._180kkgi1:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

/* Ensure proper stacking context */
._18tvqir1 {
  z-index: 1;
}

._180kkgi1 {
  z-index: 2;
}

._180kkgi1:hover {
  z-index: 10;
}

/* Ensure consistent 16:9 ratio across all elements */
._1unjxn2,
._97ius31,
._1055dze0 {
  aspect-ratio: var(--_1unjxn0);
}

/* For legacy browser support */
@supports not (aspect-ratio: 16 / 9) {
  ._1unjxn2,
  ._1055dze0 {
    padding-bottom: calc(9 / 16 * 100%);
    height: 0;
  }
  
  ._1unjxn5,
  ._1unjxn4 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }
}

/* Remove unnecessary old styles */
.r3t2ih21w,
.r3t2ih224,
.r3t2ih22q,
.r3t2ihxw,
.r3t2iht8,
.r3t2ihok,
.r3t2ihjw,
.r3t2ih91,
.r3t2ih85,
.r3t2ihaw,
.r3t2ih8s,
.r3t2ih8h,
.r3t2ih8f,
.r3t2ih8a,
.r3t2ih238,
.r3t2ih20q,
.r3t2ih9e {
  /* Utility classes preserved */
}

.r3t2ihaw {
  aspect-ratio: 16 / 9;
}
