

/* Background overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 4rem 2rem;
  overflow: auto;  /* Allows scrolling if modal content is larger than the screen */
}

#professionalInvestorsModal {
  background-color: white;
  padding: 3.2rem 2rem;
  border: 1px solid #888;
  width: 100%;
  max-width: 800px;
  box-sizing: border-box;
  display: block;
  position: relative;
  overflow: hidden;
  max-height: 90vh;
  overflow-y: auto;
}

@media screen and (min-width: 768px) {
  #professionalInvestorsModal {
    padding: 6.4rem 4.8rem;
    width: 80%;
    max-height: 80vh;
  }
}

#professionalInvestorsModal .richText p {
  font-size: 1.2rem;
}


/* Modal box */
#generalCountryModal,
#countryModal {
  background: white;
  padding: 3.2rem 2rem;
  border: 1px solid #888;
  width: 100%;
  max-width: 80rem;
  z-index: 1001;
  position: relative;
  max-height: 90vh;
  overflow: scroll;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

@media screen and (min-width: 768px) {
  #generalCountryModal,
  #countryModal {
    padding: 6.4rem 4.8rem;
    width: 80%;
    max-height: 80vh;
  }
}

#countryModal h4 {
  margin-bottom: 1.2rem;
}

.countryModal__options {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2.8rem;
  margin-top: 4.8rem;
}

@media screen and (min-width: 768px) {
  .countryModal__options {
    flex-direction: row;
  }
}

.countryModal__options > * {
  width: 100%;
}

/* Hide the modal by default */
.modal-overlay, #countryModal {
  display: none;
}


#countryModal label, legend {
  display: block;
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.03em;
  margin-bottom: 0.4rem;
}

fieldset {
  border-radius: 0.2rem;
  border: 1px solid var(--color-gray-lightest);
}

.error-message {
  color: darkred;
  font-size: 14px;
  margin-top: 10px;
}

/* Styles for the select and buttons */
#countrySelect {
  width: 100%;
}

.countryModal__options .language-selector__input,
#generalCountryInput,
#countryInput {
  width: 100%;
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--color-gray-lighter);
  padding: 1.8rem 1.6rem 1.6rem;
  border-radius: 0.2rem;
  border: 1px solid var(--color-gray-lightest);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11.25 4.24997L7 8.49994L2.75003 4.24997' stroke='%230F2D46'/%3E%3C/svg%3E%0A");
  background-size: 1.4rem;
  background-repeat: no-repeat;
  background-position: calc(100% - 20px) 50%;
}


.countryModal__options .language-selector__input:hover,
.countryModal__options .language-selector__input:focus {
  background-color: transparent;
}

#investorTypeInput {
  gap: 2rem;
  margin-top: 4.8rem;
  display: flex;
  flex-direction: column;
}

@media screen and (min-width: 768px) {
  #investorTypeInput {
    flex-direction: row;
    gap: 8rem;
  }
}
#investorTypeInput input {
  appearance: none;
  display: none;
}

#investorTypeInput label {
  position: relative;
  padding-left: 3.4rem;
}

#investorTypeInput label:before {
  content: '';
  display: block;
  position: absolute;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid var(--color-gray-lightest);
  top: -0.2rem;
  left: 0;
}

#investorTypeInput input:checked + label:after {
  content: '';
  display: block;
  position: absolute;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: var(--color-blue);
  top: 0.2rem;
  left: 0.4rem;
}

#otherCountriesDisclaimer,
#professionalInvestorDisclaimer,
#privateInvestorDisclaimer,
#noInvestorTypeDisclaimer {
  margin-top: 4rem;
}

#generalDisclaimer p:not(:first-of-type),
#otherCountriesDisclaimer p:not(:first-of-type),
#professionalInvestorDisclaimer p:not(:first-of-type),
#privateInvestorDisclaimer p:not(:first-of-type) {
  margin-top: 2.4rem;
}

#countryModal .language-selector__form,
#generalCountryModal .language-selector__form {
  display: block;
  padding: 0;
}

#generalCountryModal #generalDisclaimerValidText,
#generalCountryModal #generalDisclaimerInvalidText {
  margin-top: 4rem;
}

.disclaimer__buttons-wrapper {
  width: 100%;
  display: flex;
  gap: 2.8rem;
  margin-top: 4rem;
  flex-direction: column;
}

@media screen and (min-width: 768px) {
  .disclaimer__buttons-wrapper {
    flex-direction: row;
  }
}

.disclaimer__buttons-wrapper .button {
  flex-grow: 1;
}

#restrictedOverviewLink {
  margin: 4rem auto 0 auto;
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 2.4;
  letter-spacing: 0.08em;
  color: var(--color-gray-lighter);
  text-decoration: underline;
  text-underline-offset: 5px;
  text-align: center;
  text-transform: uppercase;
}

.logo-container {
  border-bottom: 1px solid var(--Stroke-light-Grey, #C0C9CF);
  width: 100%;
  padding: 2.5rem 2.4rem 1.8rem
}

.modal-content {
  padding: 2.7rem 2.4rem;
}

.modal-content p {
  font-size: 14px;
  font-weight: 400;
  line-height: 25.9px;
  letter-spacing: 0.03em;
}

@media screen and (min-width: 768px) {
  .modal-content p {
    font-size: 16px;
    font-weight: 400;
    line-height: 32px;
    letter-spacing: 0.03em;
  }

  .modal-content h5 {
    font-size: 22px;
    font-weight: 400;
    line-height: 35.2px;
    letter-spacing: 0.03em;
  }
}