/* Illinois Conservatory for the Arts - Hero Popup Styles */
/* Contains styles for Donation and Newsletter popups only */

@layer components {
  /* ========================================
     DONATION POPUP SPECIFIC STYLES
     ======================================== */
  
  #donate-modal .popup-image {
    text-align: left;
    justify-content: flex-start;
    margin-bottom: 1rem;
  }

  #donate-modal .popup-hero-image {
    width: 120px;
    height: auto;
    max-height: 60px;
    min-height: 40px;
    object-fit: contain;
    margin-left: 20px;
    margin-top: 20px;
  }

  /* Donation form container styling */
  #donation-form-container {
    width: 100%;
    height: 100%;
    min-height: 400px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
  }

  #donation-form-container.loading {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #donation-form-container.loaded {
    min-height: 400px;
  }

  #donation-form-container .donation-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    text-align: center;
    color: var(--ica-bg);
  }

  #donation-form-container .donation-loading .loader {
    width: 30px;
    height: 30px;
    border: 3px solid var(--ica-lime);
    border-top: 3px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
  }

  #donation-form-container .donation-loading p {
    font-family: var(--font-ui);
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.9;
    font-weight: 500;
    letter-spacing: 0.5px;
  }

  #mc-donation {
    width: 100% !important;
    height: 100% !important;
    min-height: 400px;
    border: none !important;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    background: white;
  }

  /* ========================================
     NEWSLETTER POPUP SPECIFIC STYLES
     ======================================== */
  
  #newsletter-modal .popup-image {
    text-align: left;
    justify-content: flex-start;
    margin-bottom: 1rem;
  }

  #newsletter-modal .popup-hero-image {
    width: 120px;
    height: auto;
    max-height: 60px;
    min-height: 40px;
    object-fit: contain;
    margin-left: 20px;
    margin-top: 20px;
  }

  /* Newsletter form container styling */
  #newsletter-form-container {
    width: 100%;
    height: 100%;
    min-height: 300px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
  }

  #newsletter-form-container.loading {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #newsletter-form-container.loaded {
    min-height: 300px;
  }

  #newsletter-form-container .newsletter-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    text-align: center;
    color: var(--ica-bg);
  }

  #newsletter-form-container .newsletter-loading .loader {
    width: 30px;
    height: 30px;
    border: 3px solid var(--ica-lime);
    border-top: 3px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
  }

  #newsletter-form-container .newsletter-loading p {
    font-family: var(--font-ui);
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.9;
    font-weight: 500;
    letter-spacing: 0.5px;
  }

  #newsletter-form-content {
    width: 100%;
    height: 100%;
    min-height: 300px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
  }

  /* ========================================
     LOADER ANIMATION
     ======================================== */
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }

  /* ========================================
     MOBILE OPTIMIZATIONS
     ======================================== */
  
  /* Mobile optimization for donation form */
  @media (max-width: 768px) {
    #donation-form-container {
      min-height: 300px;
    }
    
    #mc-donation {
      min-height: 300px;
    }
  }

  /* Form loading states */
  .form-content:not(.loaded) {
    pointer-events: none;
  }

  .form-content.loaded {
    pointer-events: auto;
  }

  /* Ensure proper spacing in the popup */
  .popup-content-area {
    padding: 0;
    position: relative;
    overflow: hidden;
  }
}
