/* ==============================================
   EMAIL SIGNUP COMPONENT
   Matches website design system & button styles
   ============================================== */

.email-signup-container {
  max-width: 500px;
  margin: 0 auto;
}

.email-signup-form {
  display: flex;
  gap: 12px;
  flex-direction: column;
  align-items: stretch;
}

@media (min-width: 640px) {
  .email-signup-form {
    flex-direction: row;
    align-items: center;
  }
}

/* ===== INPUT STYLES - Matching your design system ===== */
.email-signup-input {
  flex: 1;
  width: 100%;
  
  /* Match your input component */
  background-color: white;
  border: 1px solid #E3E3E3; /* --border-input equivalent */
  border-radius: 35px; /* Match your button radius */
  
  /* Typography - match your system */
  font-family: var(--font-family-brand, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  font-size: var(--font-size-lg, 16px);
  font-weight: 400;
  color: #3D3D3D;
  
  /* Spacing */
  padding: 12px 20px;
  min-height: 48px;
  
  /* Interaction */
  transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.email-signup-input:hover {
  border-color: #D5D5D5;
}

.email-signup-input:focus {
  outline: none;
  border-color: #3D3D3D;
  box-shadow: 0 0 0 2px rgba(61, 61, 61, 0.1);
}

.email-signup-input::placeholder {
  color: #A8A8A8;
  font-weight: 400;
}

.email-signup-input:disabled {
  background-color: #F7F7F7;
  border-color: #E3E3E3;
  color: #D5D5D5;
  cursor: not-allowed;
}

/* ===== BUTTON STYLES - Using your exact button system ===== */
.email-signup-button {
  /* Base button styles from your system */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  
  /* Layout */
  padding: 12px 24px;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 35px;
  
  /* Typography */
  font-family: var(--font-family-brand, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  font-weight: var(--font-weight-bold, 700);
  font-size: var(--font-size-lg);
  gap: 8px;
  
  /* Primary button colors from your system */
  background-color: #3D3D3D;
  color: #f7f7f7;
  border-color: #616161;
  
  /* Interaction */
  cursor: pointer;
  transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  text-decoration: none;
  user-select: none;
  white-space: nowrap;
}

.email-signup-button:hover:not(:disabled) {
  background-color: #494949;
  border-color: #6F6F6F;
}

.email-signup-button:active:not(:disabled) {
  background-color: #6F6F6F;
}

.email-signup-button:focus-visible {
  outline: 2px solid #A855F7;
  outline-offset: 2px;
}

.email-signup-button:disabled {
  background-color: #E3E3E3;
  color: #D5D5D5;
  cursor: not-allowed;
  opacity: 0.6;
}

.email-signup-button svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ===== MESSAGE STYLES ===== */
.email-signup-message {
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 35px; /* Match your button radius */
  font-size: 14px;
  font-family: var(--font-family-brand, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  text-align: center;
  animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.email-signup-message.success {
  background-color: #F0FDF4;
  color: #166534;
  border: 1px solid #BBF7D0;
}

.email-signup-message.error {
  background-color: #FEF2F2;
  color: #991B1B;
  border: 1px solid #FECACA;
}

/* ===== SUBTEXT ===== */
.email-signup-subtext {
  margin-top: 12px;
  font-size: 13px;
  font-family: var(--font-family-brand, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  color: #6B7280;
  text-align: center;
  line-height: 1.5;
}

.email-signup-subtext a {
  color: #3D3D3D;
  font-weight: 600;
  text-decoration: none;
  transition: color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.email-signup-subtext a:hover {
  color: #6F6F6F;
}

/* ===== SPOTS INDICATOR ===== */
.spots-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #FFFBEB;
  border: 1px solid #FCD34D;
  border-radius: 35px; /* Match your button radius */
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-family-brand, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  color: #92400E;
  margin-bottom: 16px;
}

.spots-indicator.limited {
  background: #FEF2F2;
  border-color: #FCA5A5;
  color: #991B1B;
}

.spots-indicator svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ===== ANIMATIONS ===== */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== LOADING STATE ===== */
.email-signup-button .loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #f7f7f7;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  .email-signup-input,
  .email-signup-button,
  .email-signup-message,
  .loading-spinner {
    transition: none;
    animation: none;
  }
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
  .email-signup-input {
    border-width: 2px;
  }
  
  .email-signup-button {
    border-width: 2px;
  }
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 639px) {
  .email-signup-input {
    min-height: 48px;
    font-size: 16px; /* Prevent iOS zoom */
  }
  
  .email-signup-button {
    min-height: 48px;
    width: 100%;
    justify-content: center;
  }
}