/**
 * Custom Newsletter Signup Popup Styles
 */

/* Overlay */
.bi-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

/* Prevent body scroll when popup is open */
body.bi-popup-open {
  overflow: hidden;
}

/* Popup container */
.bi-popup {
  position: relative;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: popupSlideIn 0.3s ease-out;
}

@keyframes popupSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Close button */
.bi-popup-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: #999;
  cursor: pointer;
  padding: 5px;
  z-index: 1;
  transition: color 0.2s ease;
}

.bi-popup-close:hover {
  color: #333;
}

/* Content */
.bi-popup-content {
  padding: 40px 30px 30px;
  text-align: center;
}

.bi-popup-content h2 {
  color: #333;
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 15px 0;
  font-family: "brandon-grotesque", sans-serif;
}

.bi-popup-content p {
  color: #666;
  font-size: 1.4em;
  line-height: 1.5;
  margin: 0 0 25px 0;
  font-family: "adobe-caslon-pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* Form */
.bi-newsletter-form {
  margin-bottom: 20px;
}

.bi-form-group {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 15px;
}

#bi-name,
#bi-email {
  padding: 15px;
  border: 2px solid #e1e1e1;
  border-radius: 4px;
  font-size: 16px;
  font-family: "adobe-caslon-pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
  transition: border-color 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

#bi-name:focus,
#bi-email:focus {
  outline: none;
  border-color: #0091BC;
}

.bi-submit-btn {
  background-color: #0091BC;
  color: white;
  border: none;
  padding: 3% 5%;
  font-size: 16px;
  font-weight: 600;
  font-family: "brandon-grotesque", sans-serif;
  border-radius: 1px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  width: 100%;
  text-shadow: none;
}

.bi-submit-btn:hover {
  background-color: #005a87;
}

.bi-submit-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

/* Form messages */
.bi-form-message {
  padding: 10px 15px;
  border-radius: 4px;
  font-size: 14px;
  margin-top: 10px;
  text-align: center;
}

.bi-form-message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.bi-form-message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Privacy note */
.bi-privacy-note {
  font-size: 12px !important;
  color: #999 !important;
  margin: 0 !important;
  font-style: italic;
  font-family: "adobe-caslon-pro", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
}

/* Responsive design */
@media (max-width: 600px) {
  .bi-popup {
    margin: 10px;
    max-width: none;
  }
  
  .bi-popup-content {
    padding: 30px 20px 20px;
  }
  
  .bi-popup-content h2 {
    font-size: 24px;
  }
  
  .bi-form-group {
    gap: 12px;
  }
  
  #bi-name,
  #bi-email,
  .bi-submit-btn {
    padding: 12px 15px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .bi-popup-overlay {
    padding: 10px;
  }
  
  .bi-popup-content {
    padding: 25px 15px 15px;
  }
  
  .bi-popup-content h2 {
    font-size: 22px;
  }
  
  .bi-popup-content p {
    font-size: 14px;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .bi-popup {
    border: 2px solid #000;
  }
  
  #bi-email {
    border: 2px solid #000;
  }
  
  .bi-submit-btn {
    border: 2px solid #000;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .bi-popup {
    animation: none;
  }
  
  .bi-popup-overlay {
    transition: none;
  }
  
  .bi-submit-btn,
  #bi-email,
  .bi-popup-close {
    transition: none;
  }
}