/* ===== School Interest List Popup Styles ===== */
/* This file handles popup styling for the school interest list popup */

/* Popup Modal Base */
.school-interest-popup-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Popup Overlay */
.school-interest-popup-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

/* Popup Content Container */
.school-interest-popup-content {
  position: relative;
  background: #fff;
  border-radius: 12px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  z-index: 1001;
}

.school-interest-popup-modal[style*="opacity: 1"] .school-interest-popup-content {
  transform: scale(1);
}

/* Close Button */
.school-interest-popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: background-color 0.2s ease;
  color: #6b7280;
  line-height: 1;
  z-index: 1002;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.school-interest-popup-close:hover {
  background-color: #f3f4f6;
  color: #374151;
}

.school-interest-close-icon {
  width: 24px;
  height: 24px;
}

/* Popup Body */
.school-interest-popup-body {
  padding: 2rem;
  text-align: center;
}

/* Logo Row */
.school-interest-popup-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.school-interest-popup-primary-logo {
  max-width: 200px;
  height: auto;
  object-fit: contain;
}

.school-interest-popup-school-icon {
  max-width: 120px;
  height: auto;
  object-fit: contain;
}

/* Popup Header */
.school-interest-popup-header {
  margin-bottom: 1.5rem;
}

.school-interest-popup-title {
  font-family: var(--font-ui);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--ica-green-deep);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.2;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 50%, #C6D62B7A 50%);
  padding: 0.5rem 1rem;
  border-radius: 4px;
}

/* Popup Subheader */
.school-interest-popup-subheader {
  margin-bottom: 1.5rem;
}

.school-interest-popup-subtitle {
  font-family: var(--font-ui);
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 600;
  color: var(--ica-green-deep);
  margin: 0;
  line-height: 1.3;
}

/* Popup Description */
.school-interest-popup-description {
  margin-bottom: 2rem;
}

.school-interest-popup-description p {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 1rem;
  color: #374151;
  margin: 0;
  line-height: 1.6;
}

/* Content Area */
.school-interest-popup-content-area {
  margin-top: 2rem;
}

.school-interest-iframe-container {
  position: relative;
  min-height: 200px;
}

/* Loading Bar */
.school-interest-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
}

.school-interest-loading-bar {
  width: 100%;
  max-width: 300px;
  height: 4px;
  background-color: #e5e7eb;
  border-radius: 2px;
  overflow: hidden;
}

.school-interest-loading-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--ica-green-deep), var(--ica-teal));
  border-radius: 2px;
  animation: school-interest-loading-animation 2s ease-in-out infinite;
}

@keyframes school-interest-loading-animation {
  0% {
    width: 0%;
    transform: translateX(-100%);
  }
  50% {
    width: 100%;
    transform: translateX(0%);
  }
  100% {
    width: 0%;
    transform: translateX(100%);
  }
}

.school-interest-loading-text {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: #6b7280;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Form Container */
#school-interest-form-container {
  width: 100%;
  min-height: 200px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .school-interest-popup-modal {
    padding: 0.5rem;
  }
  
  .school-interest-popup-content {
    max-height: calc(100vh - 1rem);
  }
  
  .school-interest-popup-body {
    padding: 1.5rem;
  }
  
  .school-interest-popup-logos {
    gap: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .school-interest-popup-primary-logo {
    max-width: 150px;
  }
  
  .school-interest-popup-school-icon {
    max-width: 80px;
  }
  
  .school-interest-popup-title {
    font-size: clamp(1.3rem, 4vw, 1.8rem);
  }
  
  .school-interest-popup-subtitle {
    font-size: clamp(1rem, 3vw, 1.2rem);
  }
  
  .school-interest-popup-description p {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .school-interest-popup-body {
    padding: 1rem;
  }
  
  .school-interest-popup-logos {
    flex-direction: column;
    gap: 1rem;
  }
  
  .school-interest-popup-primary-logo {
    max-width: 120px;
  }
  
  .school-interest-popup-school-icon {
    max-width: 60px;
  }
  
  .school-interest-popup-title {
    font-size: clamp(1.2rem, 5vw, 1.5rem);
  }
  
  .school-interest-popup-subtitle {
    font-size: clamp(0.9rem, 4vw, 1.1rem);
  }
  
  .school-interest-popup-description p {
    font-size: 0.85rem;
  }
}

/* Accessibility & Motion Preferences */
@media (prefers-reduced-motion: reduce) {
  .school-interest-popup-modal,
  .school-interest-popup-content {
    transition: none;
  }
  
  .school-interest-popup-modal[style*="opacity: 1"] .school-interest-popup-content {
    transform: none;
  }
  
  .school-interest-loading-progress {
    animation: none;
    width: 100%;
    transform: none;
  }
}

/* Focus Management */
.school-interest-popup-modal:focus {
  outline: none;
}

.school-interest-popup-close:focus {
  outline: 2px solid var(--ica-green-deep);
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .school-interest-popup-modal {
    display: none !important;
  }
}
