/* Modal styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal.hidden {
  display: none;
}

.modal-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.75);
  cursor: pointer;
}

.modal-content {
  position: relative;
  background-color: white;
  border-radius: 8px;
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 4rem 4rem 4rem 3rem;
  display: flex;
  flex-direction: column;
  z-index: 2001;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

@media (min-width: 768px) {
  .modal-content {
    flex-direction: row;
  }
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #333;
  padding: 0.25rem 0.5rem;
  line-height: 1;
}

.modal-member-photo {
  flex: 0 0 auto;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .modal-member-photo {
    margin-right: 2rem;
    margin-bottom: 0;
    width: 200px;
  }
}

.modal-member-photo img {
  width: 100%;
  max-width: 200px;
  border-radius: 4px;
}

.modal-member-info {
  flex: 1 1 auto;
  text-align: left !important;
}

.modal-member-info h2 {
  margin-top: 0;
  margin-bottom: 0.25rem;
  font-size: 2rem;
}

.modal-member-info .title {
  font-size: 1.125rem;
  margin-top: 0;
  margin-bottom: 1.5rem;
  color: #666;
}

.modal-member-info .bio {
  line-height: 1.6;
}

/* Simple team member styles that don't overwrite existing layout */
.team-members-list {
  list-style: none;
  padding: 0;
}

.team-members-list li {
  cursor: pointer;
}

.team-members-list .view-profile {
  display: inline-block;
  transition: background-color 0.2s;
}

/* When modal is open, prevent scrolling */
body.modal-open {
  overflow: hidden;
}

#modal-email-signup .modal-content {
  /* width: 750px; */
}

/* Email signup message styles */
.signup-message {
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 4px;
  font-weight: 500;
}

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

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

.donate-buttons-modal {
  text-align: center !important;
  a {
    margin: 0 auto;
    border: 1px solid var(--color-brand-orange);
    background: white;
    color: var(--color-brand-orange) !important;

    &:hover {
      color: white !important;
    }
  }
}

/* Email signup form styles */
#email_signup {
  text-align: left;
  padding: 0 1rem;
  max-width: 100%;
}

#email_signup h2 {
  margin: 0 0 1.5rem;
  font-size: 2rem;
}

#email_signup .field {
  display: flex;
  gap: 0.5rem;
  max-width: 400px;
  margin: 0 auto 1em;
}

#email_signup input[type="email"] {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

#email_signup input[type="submit"] {
  background-color: var(--color-brand-orange);
  cursor: pointer;
  transition: background-color 0.2s;
}

#email_signup input[type="submit"]:hover {
  background-color: #0056b3;
}

#email_signup input[type="submit"]:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
}

#email_signup ul {
  margin-top; 1em;

  li {
    a {
      white-space: nowrap;
      padding-right: 5em;
      width: 90%
    }
  }
}

@media (max-width: 480px) {
  #email_signup .field {
    flex-direction: column;
  }

  #email_signup input[type="submit"] {
    margin-top: 0.5rem;
  }
}
