.rekenmodule {
  padding: 64px 16px;
  display: flex;
  justify-content: center;
}

.rekenmodule__card {
  width: 100%;
  max-width: 640px;
  background-color: #ffffff;
  padding: 56px 48px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.12);
  position: relative;
}

.rekenmodule__card::before {
  content: "";
  position: absolute;
  top: 0px;
  right: 0px;
  width: 48px;
  height: 48px;
  background-color: #000;
  z-index: 1;
}

.rekenmodule__header {
  margin-bottom: 32px;
}

.rekenmodule__title {
  font-size: clamp(2rem, 2.4vw, 2.375rem);
  line-height: 1.1;
  margin: 0 0 12px;
  color: #101010;
}

.rekenmodule__intro {
  margin: 0;
  font-size: 1rem;
  color: #3d3d3d;
}

.rekenmodule__form {
  display: grid;
  gap: 24px;
}

.rekenmodule__field {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rekenmodule__label {
  font-size: 0.95rem;
  color: #252525;
  font-weight: 500;
}

.rekenmodule__control {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid #e4e1dd;
  border-radius: 2px;
  font-size: 1rem;
  color: #171717;
  background-color: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rekenmodule__control:focus {
  outline: none;
  border-color: #c45815;
  box-shadow: 0 0 0 3px rgba(196, 88, 21, 0.2);
}

.rekenmodule__control::placeholder {
  color: #9c9c9c;
}

select.rekenmodule__control {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #c45815 50%), linear-gradient(135deg, #c45815 50%, transparent 50%);
  background-position: calc(100% - 22px) calc(50% - 4px), calc(100% - 16px) calc(50% - 4px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 44px;
}

.rekenmodule__submit {
  border: none;
  cursor: pointer;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px;
  background-color: #c45815;
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 600;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.rekenmodule__submit:hover,
.rekenmodule__submit:focus-visible {
  background-color: #ab4b12;
  outline: none;
}

.rekenmodule__submit-icon {
  font-size: 1.375rem;
  line-height: 1;
}

.rekenmodule__feedback {
  margin-top: 32px;
}

.rekenmodule__loader {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #252525;
}

.rekenmodule__loader[hidden] {
  display: none;
}

.rekenmodule__error {
  margin: 24px 0 0;
  color: #c0392b;
  font-weight: 500;
}

.rekenmodule__error[hidden] {
  display: none;
}

.rekenmodule__result {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid #f0ede8;
  background-color: #fbf8f4;
  color: #242323;
}

.rekenmodule__result[hidden] {
  display: none;
}

.rekenmodule__result-line {
  margin: 0 0 12px;
  font-size: 1rem;
}

.rekenmodule__result-line:last-child {
  margin-bottom: 0;
}

.rekenmodule__result-value {
  font-weight: 700;
  color: #c45815;
}

.rekenmodule__disclaimer {
  margin-top: 24px;
  font-size: 0.85rem;
  color: #6d6a66;
  line-height: 1.6;
}

.rekenmodule__hidden {
  display: none !important;
}

.lds-ring {
  display: inline-block;
  position: relative;
  width: 32px;
  height: 32px;
}

.lds-ring span {
  box-sizing: border-box;
  display: block;
  position: absolute;
  width: 26px;
  height: 26px;
  margin: 3px;
  border: 3px solid #c45815;
  border-radius: 50%;
  animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  border-color: #c45815 transparent transparent transparent;
}

.lds-ring span:nth-child(1) {
  animation-delay: -0.45s;
}

.lds-ring span:nth-child(2) {
  animation-delay: -0.3s;
}

.lds-ring span:nth-child(3) {
  animation-delay: -0.15s;
}

@keyframes lds-ring {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@media (max-width: 640px) {
  .rekenmodule__card {
    padding: 40px 28px;
  }

  .rekenmodule__card::before {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rekenmodule__control,
  .rekenmodule__submit {
    transition: none;
  }

  .lds-ring span {
    animation-duration: 1.6s;
  }
}
