.contact {
  display: flex;
  justify-content: space-between;
  gap: 4rem;
}

.contact .left {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  min-width: 38.8rem;
}

.contact .section {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  width: 100%;
  padding: 1.5rem;
  border-radius: 1.2rem;
  outline: 1px solid rgb(241 241 241);
  box-shadow: 1px 1px 5px rgb(235, 235, 235), inset -1px -1px 5px rgb(251 251 251);
}

.contact .title {
  font-size: 1.8rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.contact .title span {
  font-weight: 600;
  font-size: 1.7rem;
}

.contact .item {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.7rem;
}

.contact img {
  height: 2.5rem;
}

.contact .right {
  display: flex;
  flex-direction: column;
  max-width: 75rem;
}

.displayn {
  display: none;
}

.contact .alert {
  color: var(--white);
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  border-radius: 1rem;
  padding: 0.2rem 0.5rem;
  min-height: 4rem;
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: 2px;
  box-shadow: 1px 1px 4px rgb(200, 200, 200);
  margin-bottom: 2rem;
}

.contact .alert-error {
  background-color: rgb(177, 0, 0);
}

.contact .alert-error-1 {
  background-color: var(--white);
  color: var(--black);
  border: solid 0.3rem rgb(177, 0, 0);
  min-height: 3.4rem;
}

.contact .alert-success {
  background-color: rgb(0, 177, 0);
}

.contact form span.error {
  display: block;
  margin: 0.6rem 0 0 0.5rem;
  font-size: 1.2rem;
  color: rgb(255, 0, 0);
}

.contact .form-title {
  font-size: 2rem;
  font-weight: 500;
  margin-bottom: 2rem;
}

.contact form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: 2.7rem;
}

.contact .user-data,
.contact .select-div,
.contact .message {
  height: 4.5rem;
  width: 100%;
  position: relative;
  background-color: transparent;
}

.contact .user-data:has(span),
.contact .select-div:has(span) {
  margin-bottom: 1.3rem;
}

.contact .message {
  height: auto;
  min-height: 8rem;
}

.contact .txt-input,
.contact select,
.contact textarea {
  box-sizing: border-box;
  color: var(--black-sw);
  background-color: transparent;
  outline: 1px solid rgb(229 229 229);
  box-shadow: 1px 1px 5px rgb(233 233 233), inset -1px -1px 5px rgb(251 251 251);
  font-family: inherit;
  height: 100%;
  width: 100%;
  font-size: 1.6rem;
  padding: 0 0 0 1rem;
  margin: 0;
  border: none;
  border-radius: 0.5rem;
}

.contact textarea {
  resize: none;
  overflow: hidden;
  min-height: 10rem;
  height: auto;
  padding: 1rem;
}

.contact .txt-input:focus,
.contact select:focus,
.contact textarea:focus {
  border: none;
  outline: 2px solid rgb(233, 233, 233);
}

.contact .after-text:nth-child(1)::after {
  content: 'Twoje imię i nazwisko';
}

.contact .after-text:nth-child(2)::after {
  content: 'Twój adres email';
}

.contact .after-text:nth-child(3)::after {
  content: 'Twój numer telefonu (opcjonalnie)';
}

.contact .after-text:nth-child(4)::after {
  content: 'Wybierz odbiorcę';
}

.contact .after-text:nth-child(5)::after {
  content: 'Twoja wiadomość';
}

.contact .after-text::after {
  position: absolute;
  overflow: hidden;
  pointer-events: none;
  color: rgb(93 93 93);
  background-color: var(--white);
  font-size: 1.6rem;
  top: 1.2rem;
  left: 1rem;
  transition: top 0.2s ease, font-size 0.2s ease, padding 0.2s ease;
}

.contact .user-data:has(input:focus)::after,
.contact .user-data:not(:has(input:placeholder-shown))::after,
.contact .select-div:has(select:focus)::after,
.contact .select-div:has(select option:checked:not([value=""]))::after,
.contact .message:has(textarea:focus)::after,
.contact .message:not(:has(textarea:placeholder-shown))::after {
  top: -1.3rem;
  font-size: 1.4rem;
  padding: 0 0.8rem;
}

.contact .rules-div {
  display: flex;
  gap: 1.2rem;
}

.contact .toggler-wrapper {
  width: 5rem;
  height: 2.5rem;
  cursor: pointer;
  position: relative;
}

.contact .toggler-wrapper input[type="checkbox"] {
  display: none;
}

.contact .toggler-wrapper .toggler-slider {
  background-color: rgb(213 213 213);
  ;
  position: absolute;
  border-radius: 10rem;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  -webkit-transition: background-color 300ms ease;
  transition: background-color 300ms ease;
  box-shadow: 1px 1px 5px 0px rgb(179 179 179);
  outline: 1px solid rgb(215 215 215);
}

.contact .toggler-wrapper .toggler-knob {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  left: 0.3rem;
  top: 0.3rem;
  background-color: rgb(255, 255, 255);
  position: absolute;
  -webkit-transition: left 300ms ease;
  transition: left 300ms ease;
}

.contact .rules-div:has(.rules-text .error) .toggler-slider {
  background-color: rgb(203, 111, 111);
}

.contact .toggler-wrapper input[type="checkbox"]:checked+.toggler-slider .toggler-knob {
  left: calc(100% - 1.9rem - 0.3rem);
}

.contact .toggler-wrapper input[type="checkbox"]:checked+.toggler-slider {
  background-color: rgb(0, 177, 0);
}

.contact .rules-text {
  flex: 1;
  font-size: 1.4rem;
  font-weight: 300;
  text-align: justify;
}


.contact .submit-button {
  box-sizing: content-box;
  position: relative;
  background-color: var(--blue);
  color: var(--white);
  border: none;
  margin: 0;
  font-family: inherit;
  cursor: pointer;
  border-radius: 5rem;
  height: 2rem;
  padding: 0.8rem 0;
  font-size: 1.5rem;
  letter-spacing: 2px;
  font-weight: 500;
  box-shadow: 0 3px 3px rgb(147 141 141), inset -1px -1px 5px rgb(0 53 109);
  transition: font-weight 0.2s ease, box-shadow 0.05s ease, transform 0.05s ease;
}

.contact .submit-button:hover {
  font-weight: 600;
}

.contact .submit-button:active {
  transform: translateY(0.2rem);
  box-shadow: 0 0 3px rgb(147 141 141), inset -1px -1px 5px rgb(0 53 109);
}

.contact .submit-button::after {
  content: '';
  position: absolute;
  background-color: rgba(165, 165, 165, 0.1);
  left: 50%;
  top: 0;
  height: 100%;
  width: 0;
  border-radius: 2rem;
  transition: width 0.3s ease, left 0.3s ease;
}

.contact .submit-button:hover::after {
  width: 100%;
  left: 0;
}

.contact .map {
  position: relative;
  width: 100%;
  height: 45rem;
  border-radius: 1.2rem;
  box-shadow: 1px 1px 5px rgb(219 219 219);
  overflow: hidden;
  margin: 8rem 0 0 0;
}

.contact .map::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0px 0px 3px rgb(211 211 211);
  z-index: 101;
}

.contact .map-button {
  box-sizing: content-box;
  position: relative;
  background-color: rgb(250, 250, 250);
  color: var(--black);
  border: none;
  margin: 1rem 0 0 0;
  font-family: inherit;
  cursor: pointer;
  border-radius: 1.2rem;
  height: 2rem;
  padding: 0.8rem 0;
  font-size: 1.6rem;
  letter-spacing: 1px;
  font-weight: 500;
  outline: 1px solid rgb(241 241 241);
  box-shadow: 1px 1px 5px rgb(235, 235, 235), inset -1px -1px 5px rgb(251 251 251);
  transition: font-weight 0.2s ease, box-shadow 0.05s ease, transform 0.05s ease, opacity 0.25s ease;
}

.map-label {
  box-sizing: content-box;
  background-color: rgba(250, 250, 250, 0.95);
  text-align: center;
  color: rgba(0, 0, 0, 0.8);
  border: none;
  font-family: inherit;
  border-radius: 10px;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 500;
  outline: 1px solid rgb(229 229 229);
  box-shadow: 1px 1px 5px rgb(185 185 185), inset -1px -1px 5px rgb(237 237 237);
}

@media screen and (max-width: 900px) {
  .contact {
    flex-direction: column-reverse;
    gap: 6rem;
  }

  .contact .left {
    min-width: 0;
  }

  .contact .right {
    max-width: none;
  }

  .contact .form-title {
    margin-left: 0.5rem;
  }

  .contact .after-text::after {
    font-size: 1.3rem;
    top: 1.3rem;
  }

  .contact .user-data:has(input:focus)::after,
  .contact .user-data:not(:has(input:placeholder-shown))::after,
  .contact .select-div:has(select:focus)::after,
  .contact .select-div:has(select option:checked:not([value=""]))::after,
  .contact .message:has(textarea:focus)::after,
  .contact .message:not(:has(textarea:placeholder-shown))::after {
    top: -1.2rem;
    font-size: 1.2rem;
  }

  .contact .map {
    margin: 4.5rem 0 0 0;
    height: 40rem;
  }
}