/* Illinois Conservatory for the Arts - Promotional Section Styles */

@layer base {
  :root {
    --ease: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* Other variables are already defined in style.css */
  }
}


/* Prevent other popup systems from affecting promotional modal */
.promo-popup-modal {
  /* Ensure proper box-sizing for modal container only */
  box-sizing: border-box;
}

/* Force promotional popup to use its own styles */

.promo-popup-modal .promo-popup-header {
  padding: 1.5rem 0.5rem 1rem !important;
  text-align: center !important;
  border-bottom: 1px solid rgba(249, 246, 244, 0.1) !important;
  flex-shrink: 0 !important;
}


.promo-popup-modal .promo-popup-content-area {
  padding: 1rem 1.5rem 1.5rem !important;
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  min-height: 0 !important;
  position: relative !important;
  overflow: hidden !important;
}

/* ========================================
   UNIFIED PROMOTIONAL SECTION STYLES
   ======================================== */

/*
TRULY UNIFIED PROMOTIONAL CSS - USAGE:
- For Music/Theater: Use class="promotional-section"
- For Dance: Use class="promotional-section dance-variant"
- All content classes are the same: promotional-content, promotional-center, promotional-button, etc.
- Only ONE set of classes needed - no duplicates!
- The dance-variant modifier automatically applies different colors and styling
*/

/* Base promotional section - works for both music and dance */
.promotional-section {
  background-color: var(--ica-mint);
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(3, 51, 46, 0.1);
}

/* Dance variant with different background */
.promotional-section.dance-variant {
  background-color: #C6D62B38;
}

/* Dance variant subtitle with gradient */
.promotional-section.dance-variant .promotional-subtitle {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 50%, #C6D62B7A 50%);
}

/* Dance variant button styling */
.promotional-section.dance-variant .promotional-button {
  background-color: var(--ica-bg);
}

.promotional-section.dance-variant .promotional-button:hover {
  background-color: #1E312F;
  color: white;
}

.promotional-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  gap: 2rem;
  flex-wrap: nowrap;
}

.promotional-left {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.promotional-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
}

.promotional-main {
  font-family: var(--font-ui);
  font-size: clamp(10px, 1.5vw, 13px);
  font-weight: 500;
  color: var(--ica-green-deep);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.promotional-subtitle {
  font-family: var(--font-ui);
  font-size: clamp(10px, 1.5vw, 12px);
  font-weight: 600;
  color: var(--ica-green-deep);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.promotional-session {
  font-family: var(--font-ui);
  font-size: clamp(10px, 1.5vw, 13px);
  font-weight: 400;
  color: var(--ica-green-deep);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.promotional-action {
  flex-shrink: 0;
  margin-left: auto;
}

.promotional-button {
  background-color: var(--ica-bg);
  color: #1E312F;
  padding: 0.75rem 1.5rem;
  border: 1px solid #1E312F;
  border-radius: 0;
  font-family: "Termina", Sans-serif;
  font-size: 10px;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
  box-shadow: -2px 2px 0px 2px rgba(255, 255, 255, 0.39);
  fill: #1E312F;
}

.promotional-button:hover {
  background-color: #1E312F;
  color: white;
  transform: translateY(-2px);
  text-decoration: none;
  box-shadow: -2px 2px 0px 2px rgba(255, 255, 255, 0.39);
}

.promotional-button:focus {
  outline: none;
}


/* ========================================
   PROMOTIONAL POPUP MODAL STYLES
   ======================================== */
@layer components {
  .promo-popup-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--ease), visibility var(--ease);
    /* Core Web Vitals optimizations */
    will-change: opacity, visibility;
    contain: layout style paint;
    /* Ensure proper centering */
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }

  .promo-popup-modal.active {
    display: flex;
    opacity: 1;
    visibility: visible;
  }

  .promo-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(3, 51, 46, 0.8);
    backdrop-filter: blur(4px);
  }

  .promo-popup-content {
    /* Prevent any positioning shifts */
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) scale(0.9) !important;
    /* Ensure consistent dimensions */
    max-width: 900px;
    width: 95vw;
    height: 85vh;
    max-height: 85vh;
    /* Restore styling */
    background: #1E312F !important;
    background-color: #1E312F !important;
    border: 1px solid #F0F0F5 !important;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(3, 51, 46, 0.3);
    overflow: hidden;
    transition: transform var(--ease);
    animation: promoModalSlideIn 0.3s ease-out;
    /* Ensure consistent centering */
    margin: 0;
    left: 50% !important;
    top: 50% !important;
    transform-origin: center center;
    /* Ensure proper scrolling */
    display: flex;
    flex-direction: column;
  }

  /* Responsive width for screens above 600px */
  @media (min-width: 600px) {
    .promo-popup-content {
      max-width: 500px !important;
      width: 90vw !important;
    }
  }

  .promo-popup-modal.active .promo-popup-content {
    transform: translate(-50%, -50%) scale(1) !important;
  }

  @keyframes promoModalSlideIn {
    from {
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.9);
    }
    to {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1);
    }
  }

  .promo-popup-close {
    position: absolute !important;
    top: 1rem !important;
    right: 1rem !important;
    background: none !important;
    border: 2px solid var(--ica-lime) !important;
    cursor: pointer !important;
    padding: 0.75rem !important;
    border-radius: 50% !important;
    transition: all var(--ease) !important;
    z-index: 10 !important;
    min-width: 44px !important;
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: white !important;
  }

  .promo-popup-close:hover {
    background-color: var(--ica-lime);
    color: var(--ica-green-deep);
    transform: scale(1.1);
  }

  .promo-close-icon {
    width: 20px;
    height: 20px;
    display: block;
    filter: brightness(0) invert(1);
    color: white !important;
  }

  /* Force close button content to be white */
  .promo-popup-close * {
    color: white !important;
    fill: white !important;
  }

  .promo-popup-close svg {
    fill: white !important;
    color: white !important;
  }

  /* Force all close button content to be white */
  .promo-popup-close::before,
  .promo-popup-close::after {
    color: white !important;
  }

  /* Override any inherited colors */
  .promo-popup-close,
  .promo-popup-close *,
  .promo-popup-close svg,
  .promo-popup-close svg * {
    color: white !important;
    fill: white !important;
    stroke: white !important;
  }

  .promo-popup-body {
    padding: 0 !important;
    color: var(--ica-bg) !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    position: relative !important;
    /* Ensure proper flex layout */
    flex: 1;
    min-height: 0;
    /* Enable scrolling for long content */
    max-height: 100%;
  }

  .promo-popup-image {
    width: 100%;
    height: auto;
    overflow: hidden;
    max-height: 35vh;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0;
    flex-shrink: 0;
    padding: 1rem 2rem 0 2rem;
  }

  /* Hide empty image and header divs to prevent spacing issues */
  .promo-popup-image:empty,
  .promo-popup-header:empty {
    display: none !important;
  }

  /* Also hide divs that only contain whitespace */
  .promo-popup-image:not(:has(*)),
  .promo-popup-header:not(:has(*)) {
    min-height: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .promo-popup-hero-image {
    margin-top: 20px;
    width: 80%;
    height: auto;
    display: block;
    object-fit: contain;
    max-height: 30vh;
    min-height: 150px;
    max-width: 100%;
    /* Ensure responsive behavior */
    aspect-ratio: auto;
  }


  .promo-popup-header {
    padding: 2.5rem 0.5rem 3rem !important;
    text-align: center !important;
    border-bottom: 1px solid rgba(249, 246, 244, 0.1) !important;
    flex-shrink: 0 !important;
    width: 100% !important;
  }

  .promo-popup-title {
    font-family: "Termina", var(--font-ui), -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    color: var(--ica-lime) !important;
    margin: 0 0 0.75rem !important;
    line-height: 1.3 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
  }

  .promo-popup-subtitle {
    font-family: var(--font-body) !important;
    font-size: 1.2rem !important;
    color: var(--ica-bg) !important;
    margin: 0 !important;
    line-height: 1.4 !important;
    opacity: 0.95 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
  }

  .promo-popup-content-area {
    padding: 1rem 1.5rem 1.5rem !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    min-height: 0 !important;
    position: relative !important;
    overflow: auto !important;
    /* Ensure proper scrolling */
    scrollbar-width: thin;
    scrollbar-color: var(--ica-lime) transparent;
  }

  /* Custom scrollbar for webkit browsers */
  .promo-popup-content-area::-webkit-scrollbar {
    width: 6px;
  }

  .promo-popup-content-area::-webkit-scrollbar-track {
    background: transparent;
  }

  .promo-popup-content-area::-webkit-scrollbar-thumb {
    background: var(--ica-lime);
    border-radius: 3px;
  }

  .promo-popup-content-area::-webkit-scrollbar-thumb:hover {
    background: var(--ica-mint);
  }


  /* Top section container */
  .promo-popup-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    flex-shrink: 0;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
  }

  /* Script content container */
  .promo-popup-script {
    width: 100%;
    flex: 1;
    position: relative;
    overflow: auto;
    /* Enable scrolling for form content */
    scrollbar-width: thin;
  }

  /* Promotional Form Specific Styles */
  #promo-spot-availability-form {
    width: 100%;
    height: 100%;
    min-height: 200px;
    flex: 1;
    position: relative;
    overflow: auto;
    /* Enable scrolling for form content */
    scrollbar-width: thin;
  }

  /* Center container only; do not override inner form styles */
  /* (Avoid touching Ontraport's internal CSS) */

  /* Only target our own loading elements, not Ontraport's content */
  
  /* Exception for loading dots - they need flex display */
  #promo-spot-availability-form .promo-form-loading-dots {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 1rem !important;
    padding: 2rem !important;
    color: var(--ica-bg) !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 10 !important;
    text-align: center !important;
  }
  
  /* Loading text */
  #promo-spot-availability-form .promo-loading-text {
    font-size: 1rem !important;
    color: var(--ica-bg) !important;
    font-weight: 500 !important;
    margin-bottom: 0.5rem !important;
    display: block !important;
  }
  
  /* Loading dots container */
  #promo-spot-availability-form .promo-loading-dots-container {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px !important;
  }


  .promo-loading-dot {
    width: 8px;
    height: 8px;
    background-color: var(--ica-lime);
    border-radius: 50%;
    animation: promoLoadingDots 1.4s infinite ease-in-out both;
  }

  .promo-loading-dot:nth-child(1) {
    animation-delay: -0.32s;
  }

  .promo-loading-dot:nth-child(2) {
    animation-delay: -0.16s;
  }

  .promo-loading-dot:nth-child(3) {
    animation-delay: 0s;
  }

  @keyframes promoLoadingDots {
    0%, 80%, 100% {
      transform: scale(0);
      opacity: 0.5;
    }
    40% {
      transform: scale(1);
      opacity: 1;
    }
  }

  /* Hide loading dots when form is loaded */
  #promo-spot-availability-form.loaded .promo-form-loading-dots {
    display: none;
  }

  /* Remove overrides targeting Ontraport-specific selectors */

  /* Custom scrollbar for form container */
  #promo-spot-availability-form::-webkit-scrollbar {
    width: 6px;
  }

  #promo-spot-availability-form::-webkit-scrollbar-track {
    background: transparent;
  }

  #promo-spot-availability-form::-webkit-scrollbar-thumb {
    background: var(--ica-lime);
    border-radius: 3px;
  }

  #promo-spot-availability-form::-webkit-scrollbar-thumb:hover {
    background: var(--ica-mint);
  }




  /* No styling on Ontraport iframes - let them use their own CSS */
}

/* ========================================
   PROMOTIONAL POPUP RESPONSIVE STYLES
   ======================================== */

/* Desktop (1025px and above) */
@media (min-width: 1025px) {
  .promo-popup-content {
    max-width: 900px;
    width: 90vw;
    height: 87vh;
    max-height: 87vh;
  }

  .promo-popup-hero-image {
    
    max-height: 120px;
    min-height: 100px;
  }

  .promo-popup-title {
    font-size: 1.5rem !important;
  }

  .promo-popup-subtitle {
    font-size: 1.1rem !important;
  }

  .promo-popup-header {
    padding: 2rem 0.5rem 1.5rem !important;
  }

  .promo-popup-content-area {
    padding: 1.5rem 2rem 2rem !important;
  }
}

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) and (min-width: 768px) {
  .promo-popup-content {
    max-width: 700px;
    width: 92vw;
    height: 87vh;
    max-height: 87vh;
  }

  .promo-popup-hero-image {

    max-height: 120px;
    min-height: 100px;
  }

  .promo-popup-title {
    font-size: 1.3rem !important;
  }

  .promo-popup-subtitle {
    font-size: 1rem !important;
  }

  .promo-popup-header {
    padding: 1.5rem 1.5rem 1rem !important;
  }

  .promo-popup-content-area {
    padding: 1rem 1.5rem 1.5rem !important;
  }
}

/* Mobile Large (481px - 767px) */
@media (max-width: 767px) and (min-width: 481px) {
  .promo-popup-content {
    max-width: 95vw;
    width: 95vw;
    height: 87vh;
    max-height: 87vh;
    border-radius: 8px;
  }

  .promo-popup-hero-image {
    max-height: 120px;
    min-height: 100px;
    margin-top: 20px;
  }

  .promo-popup-title {
    font-size: 1.2rem !important;
    line-height: 1.2 !important;
  }

  .promo-popup-subtitle {
    font-size: 0.9rem !important;
    line-height: 1.3 !important;
  }

  .promo-popup-header {
    padding: 1rem 1rem 0.75rem !important;
  }

  .promo-popup-content-area {
    padding: 0.75rem 1rem 1rem !important;
  }

  .promo-popup-close {
    top: 0.75rem !important;
    right: 0.75rem !important;
    padding: 0.5rem !important;
    min-width: 40px !important;
    min-height: 40px !important;
  }

  .promo-close-icon {
    width: 18px;
    height: 18px;
  }
}

/* Mobile Small (320px - 480px) */
@media (max-width: 480px) {
  .promo-popup-content {
    max-width: 98vw;
    width: 98vw;
    height: 87vh;
    max-height: 87vh;
    border-radius: 6px;
  }

  .promo-popup-hero-image {
    max-height: 120px;
    min-height: 100px;
    margin-top: 15px;
  }

  .promo-popup-title {
    font-size: 1.1rem !important;
    line-height: 1.2 !important;
    margin: 0 0 0.5rem !important;
  }

  .promo-popup-subtitle {
    font-size: 0.85rem !important;
    line-height: 1.3 !important;
  }

  .promo-popup-header {
    padding: 0.75rem 0.75rem 0.5rem !important;
  }

  .promo-popup-content-area {
    padding: 0.5rem 0.75rem 0.75rem !important;
  }

  .promo-popup-close {
    top: 0.5rem !important;
    right: 0.5rem !important;
    padding: 0.4rem !important;
    min-width: 36px !important;
    min-height: 36px !important;
  }

  .promo-close-icon {
    width: 16px;
    height: 16px;
  }

  /* Ensure iframe content is properly sized */
  /* No styling on Ontraport iframes - let them use their own CSS */
}

/* Landscape orientation adjustments */
@media (max-height: 500px) and (orientation: landscape) {
  .promo-popup-content {
    height: 87vh;
    max-height: 87vh;
  }

  .promo-popup-hero-image {
    max-height: 120px;
    min-height: 100px;
    margin-top: 10px;
  }

  .promo-popup-header {
    padding: 0.75rem 1rem 0.5rem !important;
  }

  .promo-popup-content-area {
    padding: 0.5rem 1rem 0.75rem !important;
  }
}

/* ========================================
   PROMOTIONAL SECTION RESPONSIVE STYLES
   ======================================== */

/* Desktop only - Single row layout */
@media (min-width: 1025px) {
  .promotional-section {
    padding: 0.6rem 0;
  }
  
  .promotional-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: nowrap;
  }
  
  .promotional-center {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    justify-content: center;
  }
  
  .promotional-main,
  .promotional-subtitle,
  .promotional-session {
    white-space: nowrap;
  }
}

@media (max-width: 1024px) {
  .promotional-content {
    gap: 1.5rem;
  }
  
  .promotional-main {
    font-size: 14px;
  }
  
  .promotional-subtitle {
    font-size: 12px;
  }
  
  .promotional-session {
    font-size: 11px;
  }
  
  .promotional-button {
    padding: 0.2rem 1.5rem;
    font-size: 10px;
    min-width: 130px;
  }
}

@media (max-width: 900px) {
  .promotional-section {
    padding: 0.5rem 0;
  }
  
  .promotional-content {
    gap: 1.25rem;
  }
  
  .promotional-main {
    font-size: 14px;
  }
  
  .promotional-subtitle {
    font-size: 12px;
  }
  
  .promotional-session {
    font-size: 0.875rem;
  }
  
  .promotional-button {
    padding: 0.2rem 1.5rem;
    font-size: 10px;
    min-width: 120px;
  }
}

@media (max-width: 760px) {
  .promotional-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 0.75rem;
    text-align: center;
    align-items: center;
    justify-items: center;
    padding: 0 15px;
  }
  
  .promotional-left {
    grid-column: 1 / -1;
    grid-row: 1;
    order: 1;
    justify-self: center;
  }
  
  .promotional-center {
    grid-column: 1;
    grid-row: 2;
    order: 2;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    justify-self: start;
    text-align: left;
  }
  
  .promotional-main {
    font-size: 14px;
    text-align: center;
    width: 100%;
  }
  
  .promotional-subtitle {
    font-size: 12px;
  }
  
  .promotional-session {
    font-size: 10px;
  }
  
  .promotional-action {
    grid-column: 2;
    grid-row: 2;
    order: 3;
    margin-left: 0;
    justify-self: end;
  }
  
  .promotional-button {
    padding: 0.29rem 1.25rem;
    font-size: 10px;
    min-width: 140px;
    flex-shrink: 0;
  }
}

@media (max-width: 480px) {
  .promotional-button {
    padding: 0.2rem 1.25rem;
    font-size: 10px;
    min-width: 120px;
  }
}

/* ========================================
   ACCESSIBILITY & FOCUS STYLES
   ======================================== */
.promotional-button:focus,
.promo-popup-close:focus {
  outline: 2px solid var(--ica-lime) !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 4px rgba(198, 214, 43, 0.3) !important;
}

/* Ensure popup is accessible */
.promo-popup-modal {
  /* Ensure proper focus management */
  z-index: 9999;
}

/* Prevent body scroll when promotional popup is open */
body.popup-open {
  overflow: hidden !important;
  position: fixed !important;
  width: 100% !important;
  top: 0 !important;
  left: 0 !important;
}



