/* Login Modal */
.modal-overlay {
  display: flex;
  justify-content: center;
  align-items: center;

  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;

  z-index: 1000;

  background-color: rgb(0, 0, 0, 0.1);
}

/* General password input */

.password-input-wrapper {
    position: relative;;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    width: 100%;
    padding-right: 3rem;
}

.password-input-wrapper .toggle-password {
    position: absolute;
    right: 1rem;
    background: none;
    color: #9CA3AF;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.password-input-wrapper .toggle-password:hover {
    color: var(--clr-primary);
}

/* Login modal */

.login-modal {
  display: flex;
  flex-direction: column;

  width: 20rem;
  padding: 1rem 1.5rem;

  border-radius: 20px;

  box-shadow: 0 0 10px 2px rgb(0, 0, 0, 0.25);

  background-color: white;
}

.login-modal span {
  align-self: flex-end;
  cursor: pointer;
  padding: 0.5rem;
}

.login-modal h3 {
  align-self: center;
  margin: 0.5rem 0 1.5rem;
}

.login-modal form {
  display: flex;
  flex-direction: column;
}

.login-modal .email,
.login-modal .password {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.login-modal .email-input,
.login-modal .password-input {
  padding: 0.6rem 0.5rem;

  border: none;
  border-radius: 5px;
  background-color: var(--clr-secondary);
}

.login-modal .email-input:focus,
.login-modal .password-input:focus {
  outline: none;
  border: 1px solid var(--clr-primary);
}

.login-modal .password {
  margin: 1rem 0;
}

.login-modal .password-input {
  width: 100%;
}

.login-options-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.forgot-password-link {
  color: var(--clr-primary);
  text-decoration: none;
  font-weight: 600;
}

.login-modal .submit-login-btn {
  padding: 0.8rem 1rem;

  background-color: var(--clr-primary);
  color: white;
  font-weight: 600;

  border: none;
  border-radius: 30px;

  cursor: pointer;
}

.modal-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1rem 0;
  color: #737373;
}

.modal-divider::before,
.modal-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #737373;
}

.modal-divider::before { margin-right: 1rem; }
.modal-divider::after { margin-left: 1rem; }

.oauth-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.8rem;
  border-radius: 20px;
  font-weight: 600;
  cursor: pointer;
  background-color: transparent;
  border: 1px solid var(--clr-border);
  text-decoration: none;
}

.oauth-btn:hover {
  text-decoration: none;
}

.oauth-btn img {
  width: 20px;
  height: 20px;
}

.google-btn {
  color: #1b1b1b
}

.apple-btn {
  background-color: #1B1B1B;
  color: white;
  border-color: #1B1B1B;
}

.login-modal .modal-optional-option {
  margin: 2rem 0 1.5rem;

  text-align: center;
  font-size: var(--fs-3);
}

/* Status message */
.status-message {
    display: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: var(--fs-3);
}

.status-message.error {
    display: block;
    background-color: #F8D7DA;
    color: #721C24;
    border: 1px solid #F5C6CB;
}

.status-message.success {
    display: block;
    background-color: #D4EDDA;
    color: #155724;
    border: 1px solid #C3E6CB;
}

@keyframes modalZoomIn {
  from {
    transform: scale(0.5);
    opacity: 0;
  } to {
    transform: scale(1);
    opacity: 1;
  }
}

.login-modal {
  animation: modalZoomIn 0.4s cubic-bezier(0.24, -0.07, 0, 1.66) forwards;
}

@media (min-width: 860px) {
  .login-modal {
    width: 23rem;
  }
}