/* ========================================= */
/* Video Panel Styles (Expertly Refactored)  */
/* - Mobile-First, Fluid, and Accessible -   */
/* ========================================= */

.video-category-container{
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Main panel container */
.dropdown-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem; /* Default mobile gap */

  /* FLUID WIDTH: Stays within parent, but has a max size */
  width: 100%;
  max-width: 31.9375rem; /* 511px */
  
  /* AUTO HEIGHT: Panel grows with its content, preventing overflow */
  height: auto;
  
  padding: 1.25rem 1rem; /* Default mobile padding */
  border-radius: 0.375rem; /* 6px */
  border: 1px solid rgba(98, 96, 91, 0.25);
  background: #2A2A28;
}

.dropdown-content {
  display: flex;
  flex-direction: column;
  width: 100%; /* Ensure content fills the panel */
}

/* Custom dropdown/select styling */
#video-category {
  /* Let padding and font-size define the height */
  height: auto; 
  padding: 0.75rem 1.5rem; /* 12px 24px */
  /* Ensure arrow has space and doesn't overlap text */
  padding-right: 3rem; 
  
  display: flex;
  justify-content: space-between;
  align-items: center;
  align-self: stretch;
  color: white;

  border-radius: 0.5rem 0.5rem 0 0; /* 8px */
  border: 1px solid #C9C9C9;
  background: #000;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  appearance: none; /* Removes default browser styling */

  /* FLUID TYPOGRAPHY: Scales from 14px to 16px */
  font-size: clamp(0.875rem, 0.8rem + 0.25vw, 1rem);

  /* SVG arrow that scales with the font size */
  background-image: url('/assets/images/arrow-down-01.svg');
  background-position: right 0.75rem center; /* right 12px */
  background-repeat: no-repeat;
  background-size: 1rem; /* 16px */
}

#video-category:focus {
  outline: 2px solid var(--brand-primary, #88392b);
  outline-offset: 2px;
  border-color: var(--brand-primary, #88392b);
}

/* The most critical change for a responsive video */
.video-player-container {
  /* 1. Set up for absolute positioning */
  position: relative;
  
  /* 2. Remove fixed height and padding */
  /* height: 222px; <-- REMOVED */
  /* padding: 12px 24px; <-- REMOVED */

  /* 3. Let the aspect ratio define the height */
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio (9 / 16 = 0.5625) */

  border-radius: 0 0 0.5rem 0.5rem; /* 8px */
  border: 1px solid #C9C9C9;
  border-top: none; /* Avoid double border with dropdown */
  background: #000;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  overflow: hidden; /* Ensures iframe corners are rounded */
}

/* Style the iframe to fill the aspect ratio container */
.video-player-container iframe {
  /* 4. Position the iframe to fill the container perfectly */
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ================================================= */
/* Responsive Media Queries (Simplified Mobile-First) */
/* ================================================= */

/* --- Tablet and Larger (min-width: 768px) --- */
@media (min-width: 48em) {
  .dropdown-panel {
    /* Restore larger padding and gap for desktop */
    padding: 1.5625rem 1.3125rem; /* 25px 21px */
    gap: 2.25rem; /* 36px */
  }
}