/* Global */
* {
  box-sizing: border-box;
}

body {
  font-family: Open Sans, sans-serif;
  color: #000;
  margin: 0;
}

.green-text {
  color: #5D782F;
}

.header {
  background: #F5F5F5;
  padding: 10px;
  display: flex;
  justify-content: center;
}

h1 {
  font-size: 32px;
  font-weight: normal;
}

@media screen and (min-width: 900px) {
  h1 {
    font-size: 48px;
  }
}

h2 {
  font-size: 16px;
  font-weight: normal;
}

@media screen and (min-width: 900px) {
  h2 {
    font-size: 26px;
  }
}

.content {
  display: flex;
  max-width: 1200px;
  margin: auto;
  padding: 20px 30px;
}

@media screen and (min-width: 1260px) {
  .content {
    padding: 20px 0;
  }
}

.footer {
  max-width: 1200px;
  margin: auto;
}

.main-content {
  flex: 1;
}

.footer-content {
  margin: auto;
  text-align: left;
  max-width: 1200px;
  font-size: 12px;
  padding-bottom: 20px;
}

/* Agreements page */
.title {
  text-align: center;
}

.title h2 {
  max-width: 800px;
  margin: 20px auto;
  padding: 0 20px;
}

#print-link {
  width: 100%;
  max-width: 1200px;
  margin: auto;
  padding: 0 30px;
  text-align: right;
}


#print-link a {
  text-decoration: none;
  color: grey;
}

@media screen and (min-width: 1260px) {
  #print-link {
    padding: 0 10px;
  }
}

/* Buttons Section */
.agreement-buttons {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media screen and (min-width: 900px) {
  .agreement-buttons {
    display: flex;
    width: 33%;
    align-items: flex-end;
    position: relative;
    margin-right: 30px;
  }
}

.agreement-button {
  padding: 18px 26px;
  font-size: 16px;
  border-radius: 32px;
  font-weight: bold;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  width: 100%;
  min-width: 300px;
  max-width: 365px;
  position: relative;
  cursor: pointer;
  transition: all .2s;
  border: 2px solid #fff;
}

.agreement-button.active {
  background: #fff !important;
  border: 2px solid #95C93D !important;
}

.agreement-button.incomplete {
  background: #F5F5F5;
  border-color: #F5F5F5;
}

.agreement-button.incomplete .agreement-button__status-complete {
  display: none;
}

.agreement-button.complete {
  background: #BABABA;
  border-color: #BABABA;
}

.agreement-button.complete .agreement-button__status-incomplete {
  display: none;
}

.agreement-button:hover, .agreement-button.incomplete:hover, .agreement-button.complete:hover {
  background: #95C93D;
  border: 2px solid #95C93D;
}

.agreement-button__title {
  font-size: 14px;
  font-weight: 700;
}

@media screen and (min-width: 450px) {
  .agreement-button__title {
    font-size: 16px;
    font-weight: 700;
  }
}

@media screen and (min-width: 900px) {
  .agreement-button__title {
    font-size: 14px;
  }
}

@media screen and (min-width: 1200px) {
  .agreement-button__title {
    font-size: 16px;
  }
}

.agreement-button__badge {
  font-size: 14px;
  padding-right: 40px;
  font-weight: 400;
}

.agreement-button__badge img {
  position: absolute;
  top: 12px;
  right: 26px;
  z-index: 1;
}

.agreement-button__badge img.complete {
  width: 0;
  transition: width .2s;
  z-index: 2;
}

.agreement-button.complete img.complete {
  width: 32px;
}

.submit-master {
  align-self: center;
  text-align: center;
}

.submit-master__title, .submit-agreement__title {
  width: 100%;
  text-align: center;
}

.submit-master.incomplete, .submit-master.incomplete:hover {
  background: #BABABA;
  cursor: not-allowed;
}


/* Agreement text section */
.agreement-text {
  display: none;
  width: 100%;
  flex-direction: column;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
  background: #fff;
  z-index: -1;
}

.agreement-text.active {
  pointer-events: all;
  z-index: 10;
  display: flex;
}

@media screen and (min-width: 900px) {
  .agreement-text {
    display: flex;
    width: 66%;
    align-items: flex-end;
    position: relative;
  }
}

.agreement-text__content {
  display: none;
  width: 100%;
}

.agreement-text__content.active {
  display: block;
}

.agreement-text__scroll {
  padding: 30px;
  border-radius: 10px;
  overflow: auto;
  height: 100vh;
  padding-bottom: 15vh;
}

@media screen and (min-width: 900px) {
  .agreement-text__scroll {
    border: 1px solid #BABABA;
    height: 768px;
    padding-bottom: 0;
  }
}

.agreement-text__scroll h2 {
  font-size: 30px;
  font-weight: 700;
}

.agreement-close {
  position: fixed;
  top: 30px;
  right: 30px;
}

@media screen and (min-width: 900px) {
  .agreement-close {
    display: none;
  }
}

.submit-button {
  cursor: pointer;
  color: #fff;
  padding: 12px 24px;
  font-size: 16px;
  background: #95C93D;
  border-radius: 32px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  width: 100%;
  position: relative;
  margin-top: 20px;
  font-weight: 400;
  width: 200px;
  transition: all .2s;
}

.submit-button:hover {
  background: #7FA241;
}

.submit-button__icon, .submit-button__image {
  display: none;
  background: #fff;
  position: absolute;
  top: 7px;
  right: 10px;
  z-index: 1;
  width: 32px;
  height: 32px;
  border-radius: 16px;
}

@media screen and (min-width: 900px) {
  .submit-button__icon, .submit-button__image {
    display: block;
  }
}

.submit-button.incomplete .submit-button__image {
  display: none;
}

.submit-button.complete .submit-button__icon {
  display: none;
}

.submit-agreement__container {
  background: #fff;
  position: fixed;
  z-index: 20;
  bottom: 0;
}

.submit-agreement {
  margin: 20px 25vw;
  width: 50vw;
}

@media screen and (min-width: 900px) {
  .submit-agreement__container {
    position: static;
  }

  .submit-agreement {
    position: static;
    margin: 20px auto;
    float: right;
    width: auto;
  }
}

.errors {
  color: #f1513f;
  font-size: 16px;
  max-width: 365px;
  margin-top: 16px;
}

.errors p {
  margin-top: 0;
}

.reference-field {
  display: none;
}

/* Loading spinner -- https://loading.io/css/ */
.loading-spinner {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
}
.loading-spinner div {
  box-sizing: border-box;
  display: block;
  position: absolute;
  width: 64px;
  height: 64px;
  margin: 8px;
  border: 8px solid #95c940;
  border-radius: 50%;
  animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  border-color: #95c940 transparent transparent transparent;
}
.loading-spinner div:nth-child(1) {
  animation-delay: -0.45s;
}
.loading-spinner div:nth-child(2) {
  animation-delay: -0.3s;
}
.loading-spinner div:nth-child(3) {
  animation-delay: -0.15s;
}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.loading-wrapper {
  align-items: center;
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.loading-wrapper.hidden {
  display: none;
}

.loading-wrapper h3 {
  margin-right: 20px;
}

.loading-screen-content {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
}