* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
main {
  background-color: var(--neutral);
}
main .textContainer {
  color: var(--tertiary);
}
.authMainTitle {
  color: var(--primary);
  font-family: var(--font-family);
  font-size: 32px;
  text-align: center;
  font-weight: 400;
  margin-top: 80px;
}
.formContainer {
  position: relative;
}
.authForm {
  width: 100%;
  padding: 1rem;
  margin: 1rem auto;
}

.formGroup {
  margin-bottom: 1.5rem;
}

.formGroup > label {
  display: none;
}

.inputWithIcon {
  position: relative;
  width: 100%;
  color: var(--text-regular);
}

.inputWithIcon > svg,
.inputWithIcon > .textIcon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--lightgray);
}
.inlineInputsContainer {
  width: 100%;
  display: flex;
  flex-flow: row wrap;
  justify-content: space-evenly;
  align-items: flex-start;
  gap: 0 20px;
}

.formGroup input {
  width: 100%;
  max-width: 100%;
  height: 40px;
  padding: 0.75rem 0.75rem 0.75rem 40px;
  border: 1px solid var(--lightgray);
  background-color: transparent;
  color: var(--text-regular);
  font-family: var(--font-family);
  font-size: 20px;
  transition: all 0.3s ease;
}
.inlineInputsContainer .formGroup {
  width: 100%;
}
.inputWithIcon > input {
  padding-left: 50px;
}
input[type="date"]::-webkit-calendar-picker-indicator {
  position: absolute;
  left: 10px;
  font-size: 28px;
  cursor: pointer;
}
.radioContainer {
  display: flex;
  flex-flow: row nowrap;
  justify-content: flex-start;
  align-items: center;
  gap: 20px;
  border: none;
  margin-bottom: 20px;
}
.radioLabel {
  display: flex;
  flex-flow: row nowrap;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.formGroup input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(42, 46, 116, 0.2);
}

.formGroup input.error {
  border-color: var(--secondary);
}

.formGroup input.valid {
  border-color: #28a745;
}

.errorMessage {
  color: var(--secondary);
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: none;
  min-height: 20px;
}

.passwordRequirements {
  margin-top: 0.5rem;
  font-size: 12px;
  color: var(--neutral);
}

.passwordRequirements ul {
  list-style: none;
  padding-left: 1rem;
  margin: 0.5rem 0;
}

.passwordRequirements li {
  margin: 0.25rem 0;
  font-size: 12px;
  color: var(--secondary);
}

.passwordRequirements li.valid {
  color: #28a745;
}

.passwordRequirements li::before {
  content: "×";
  margin-right: 0.5rem;
}

.passwordRequirements li.valid::before {
  content: "✓";
}

main .buttonLink {
  display: block;
  margin: 0 auto;
  width: 100%;
  max-width: 240px;
}

.authMessage {
  text-align: center;
  margin: 2rem auto;
  max-width: 600px;
}

.authMessage p {
  margin-bottom: 2rem;
  font-size: 1.1rem;
  line-height: 1.5;
}

.authMessage .buttonLink {
  display: inline-block;
  margin: 1rem auto;
}

.successOverlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 4, 9, 0.9);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.successMessage {
  background: var(--tertiary);
  border: 1px solid var(--neutral);
  padding: 2rem;
  max-width: 500px;
  margin: 1rem;
  text-align: center;
}

.successMessage h4 {
  color: var(--neutral);
  font-family: var(--font-family);
  margin-bottom: 1rem;
}

.successMessage p {
  margin-bottom: 2rem;
  line-height: 1.5;
}

.profileInfo {
  background-color: var(--primary);
  border: 1px solid var(--tertiary);
  padding: 2rem;
  margin: 2rem auto;
  width: 100%;
  max-width: 550px;
  color: var(--neutral);
}

.profileInfo p {
  margin: 1rem 0;
}

.profileInfo strong {
  color: var(--secondary);
}

.formMessage {
  padding: 10px;
  margin-bottom: 1rem;
  display: none;
}

.formMessage.error {
  display: block;
  background: rgba(163, 25, 36, 0.1);
  border: 1px solid var(--secondary);
  color: var(--secondary);
}

.formMessage.success {
  display: block;
  background: rgba(40, 167, 69, 0.1);
  border: 1px solid #28a745;
  color: #28a745;
}
.bottomLink {
  display: block;
  text-align: center;
  margin: 20px auto 0 auto;
  color: var(--tertiary);
  font-size: 14px;
  transition: color 0.3s ease;
}
.middleLink {
  display: block;
  margin: -10px auto 20px auto;
  color: var(--tertiary);
  font-size: 14px;
  transition: color 0.3s ease;
}
.bottomLink:hover,
.middleLink:hover {
  color: var(--tertiary);
}
main .altBottomLink {
  margin-bottom: 20px;
}
main h4 {
  color: var(--tertiary);
  margin-bottom: 20px;
  font-weight: 400;
}
.profileSection {
  max-height: 0;
  max-width: 550px;
  overflow: hidden;
  margin: 0 auto;
  transition: max-height 0.5s ease-in-out;
}
.profileSection > .profileSubSection {
  max-height: 0;
  width: 100%;
  overflow: hidden;
  padding: 0;
  margin: 0;
  transition: max-height 0.5s ease-in-out;
}

.profileSection.open {
  max-height: 1000px;
}
.profileSubSection.open {
  max-height: 1000px;
  padding: 10px;
  margin: 10px auto;
}

main .topButton {
  margin-top: 20px;
}
main .largeButton {
  max-width: calc(100% - 20px);
}
.forgottenForm {
  padding-top: 4rem;
}
.forgottenPasswordText {
  color: var(--tertiary);
  width: 700px;
  max-width: 100vw;
  margin-bottom: 20px;
  display: block;
  text-align: center;
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
}

.addressItem {
  width: 100%;
  border: 1px solid var(--tertiary);
  padding: 10px;
  color: var(--tertiary);
  margin-bottom: 20px;
  position: relative;
}
.addressItem h5 {
  font-size: 22px;
  font-weight: 500;
  color: var(--secondary);
}
.addressItem p {
  font-size: 20px;
}
.mainAddress {
  background-color: var(--primary);
  color: var(--neutral);
}
.mainAddressText {
  text-align: right;
}
.addressHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 10px;
}

.addressContent {
  margin-top: 10px;
}

.addressItem .toggleContainer {
  display: flex;
  align-items: center;
  min-width: 0;
  flex-shrink: 0;
}

.addressItem .toggleInput {
  display: none;
}

.addressItem .toggleLabel {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: inherit;
  font-family: var(--font-family);
  font-size: 14px;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.addressItem .toggleText {
  font-size: 14px;
}

.addressItem .toggleSwitch {
  position: relative;
  width: 50px;
  height: 24px;
  background-color: var(--lightgray);
  border: 1px solid var(--lightgray);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.addressItem .toggleSlider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background-color: var(--neutral);
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.addressItem .toggleInput:checked + .toggleLabel .toggleSwitch {
  background-color: var(--secondary);
  border-color: var(--neutral);
}

.addressItem .toggleInput:checked + .toggleLabel .toggleSlider {
  transform: translateX(26px);
}

.addressItem .toggleLabel:hover .toggleSwitch {
  box-shadow: 0 0 0 2px rgba(42, 46, 116, 0.2);
}

.addressItem .toggleInput:focus + .toggleLabel .toggleSwitch {
  box-shadow: 0 0 0 2px rgba(42, 46, 116, 0.2);
}

.addressItem .toggleInput:checked + .toggleLabel .toggleText {
  color: var(--secondary);
  font-weight: 500;
}
.addressItem .removeItem {
  top: 80%;
}

.otherErrorMessage {
  color: var(--secondary);
  font-size: 0.875rem;
  margin-top: 0.25rem;
  min-height: 20px;
  width: 100%;
  text-align: center;
  margin-bottom: 10px;
  height: 25px;
}

.otherErrorMessage a {
  cursor: pointer;
  font-weight: bold;
}

.otherErrorMessage a:hover {
  text-decoration: underline;
}

@keyframes fadeout {
  from {
    bottom: 10px;
    opacity: 1;
  }
  to {
    bottom: -20px;
    opacity: 0;
  }
}

@keyframes fadein {
  from {
    bottom: -20px;
    opacity: 0;
  }
  to {
    bottom: 10px;
    opacity: 1;
  }
}

#cardsInfo {
  padding: 0 10px;
}

.cardInfoContainer {
  box-sizing: border-box;
  width: 100%;
  background-color: var(--secondary);
  border: none;
  box-sizing: border-box;
  padding: 10px;
  margin-bottom: 10px;
  display: flex;
  flex-flow: row nowrap;
  justify-content: flex-start;
  align-items: flex-start;
}
.cardInfoContainer > .iconContainer {
  height: 100px;
  width: 100px;
  display: flex;
  flex-flow: row nowrap;
  justify-content: center;
  align-items: center;
  color: var(--primary);
}
.cardInfoContainer > .iconContainer > svg {
  transform: scale(1.5);
}
.cardInfoContainer > .cardTextContainer {
  height: 100px;
  display: flex;
  flex-flow: column nowrap;
  justify-content: flex-start;
  align-items: flex-start;
}
.cardBeneficiaryName {
  font-size: 20px;
  font-weight: 400;
}
.cardBeneficiaryName > span {
  font-weight: 600;
  color: var(--primary);
}
.cardLink {
  margin-top: 10px;
  text-decoration: none;
  color: var(--primary);
}
@media screen and (min-width: 800px) {
  .authMainTitle {
    font-size: 62px;
  }
  .authForm {
    margin: 2rem auto;
    padding: 2rem 0;
  }
  main .buttonLink {
    max-width: 320px;
  }
  main .largeButton {
    max-width: 550px;
  }
  .forgottenForm {
    padding-top: 4rem;
  }
  .addressHeader {
    flex-direction: column;
    align-items: flex-start;
  }

  .addressItem .toggleText {
    font-size: 16px;
  }
  .inlineInputsContainer > .formGroup {
    flex: 1;
  }
}
