/* ================================================================
   Immobilienkaufkosten-Rechner — polished page UI
   Brand tokens from home.css; scoped under .sh-gbr
   ================================================================ */

.sh-gbr .screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Hero */
.sh-gbr-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 80% at 100% 0%, rgba(193, 154, 54, .12), transparent 55%),
    linear-gradient(180deg, var(--white) 0%, #fbf9f5 100%);
  border-bottom: 1px solid var(--border);
  padding: 32px 0 48px;
}

.sh-gbr-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, .75fr);
  gap: 36px;
  align-items: end;
}

.sh-gbr-hero .sh-service-hero__title {
  max-width: 16ch;
  margin-top: 10px;
}

.sh-gbr-hero .sh-service-hero__intro {
  max-width: 58ch;
}

.sh-gbr-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
}

.sh-gbr-pills li {
  padding: 8px 14px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--sh-sm);
}

.sh-gbr-hero__badge {
  position: relative;
  padding: 28px 26px;
  background: var(--primary);
  color: var(--white);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-md);
  overflow: hidden;
}

.sh-gbr-hero__badge::before {
  content: '';
  position: absolute;
  inset-inline-end: -40px;
  top: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(193, 154, 54, .35), transparent 70%);
  pointer-events: none;
}

.sh-gbr-hero__badge-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(193, 154, 54, .35);
  color: var(--accent);
}

.sh-gbr-hero__badge-kicker {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.sh-gbr-hero__badge-title {
  display: block;
  font-family: var(--font-h);
  font-size: 1.55rem;
  line-height: 1.2;
  margin-bottom: 8px;
}

.sh-gbr-hero__badge-meta {
  display: block;
  font-size: .88rem;
  color: rgba(255, 255, 255, .7);
  line-height: 1.5;
}

/* Body shell — equal padding above and below the section content */
.sh-gbr-body {
  padding-block: 48px;
  background:
    radial-gradient(ellipse 50% 40% at 0% 20%, rgba(193, 154, 54, .06), transparent 50%),
    var(--cream);
}

.sh-gbr-shell {
  background: transparent;
}

.sh-gbr-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 24px;
  align-items: stretch;
}

.sh-gbr-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-md);
  padding: 32px 34px;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.sh-gbr-panel--results {
  background:
    linear-gradient(165deg, #fffdf8 0%, var(--white) 42%, #faf8f3 100%);
  border-color: rgba(193, 154, 54, .28);
  position: relative;
}

.sh-gbr-panel--results::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 18px;
  bottom: 18px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--accent), rgba(193, 154, 54, .25));
}

.sh-gbr-panel__head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 26px;
}

.sh-gbr-step {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: .85rem;
  font-weight: 700;
  color: var(--white);
  background: var(--primary);
}

.sh-gbr-step--accent {
  background: var(--accent);
  color: var(--primary);
}

.sh-gbr-panel__title {
  font-family: var(--font-h);
  font-size: 1.35rem;
  color: var(--text-h);
  margin: 0 0 4px;
  line-height: 1.25;
}

.sh-gbr-panel__sub {
  margin: 0;
  font-size: .88rem;
  color: var(--text-m);
  line-height: 1.5;
}

.sh-gbr-form {
  display: grid;
  gap: 22px;
}

.sh-gbr-field {
  display: grid;
  gap: 8px;
}

.sh-gbr-field label,
.sh-gbr-fieldset > legend {
  font-size: .94rem;
  font-weight: 600;
  color: var(--text-h);
  line-height: 1.4;
}

.sh-gbr-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.sh-gbr-fieldset > legend {
  padding: 0;
  margin-bottom: 10px;
}

.sh-gbr-hint,
.sh-gbr-help {
  margin: 0;
  font-size: .84rem;
  line-height: 1.55;
  color: var(--text-m);
}

.sh-gbr-money {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--cream);
  overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.sh-gbr-money:focus-within {
  border-color: var(--accent);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(193, 154, 54, .18);
}

.sh-gbr-money__prefix {
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-weight: 700;
  color: var(--accent-dk);
  background: rgba(193, 154, 54, .08);
  border-inline-end: 1px solid var(--border);
}

.sh-gbr-input {
  width: 100%;
  box-sizing: border-box;
  padding: 15px 16px;
  font-family: var(--font-b);
  font-size: 1.05rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-h);
  background: transparent;
  border: 0;
  border-radius: 0;
  outline: none;
}

.sh-gbr-money .sh-gbr-input {
  border: 0;
  box-shadow: none;
  background: transparent;
}

.sh-gbr-input::placeholder {
  color: var(--text-m);
  font-weight: 500;
  opacity: .7;
}

.sh-gbr-money:has(.is-invalid),
.sh-gbr-money:has([aria-invalid="true"]) {
  border-color: #b42318;
  box-shadow: 0 0 0 3px rgba(180, 35, 24, .12);
}

.sh-gbr-error {
  margin: 0;
  font-size: .84rem;
  font-weight: 500;
  color: #b42318;
  line-height: 1.4;
}

.sh-gbr-error[hidden] {
  display: none !important;
}

.sh-gbr-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.sh-gbr-choice__option {
  position: relative;
}

.sh-gbr-choice__option input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.sh-gbr-choice__option span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 10px 16px;
  font-size: .95rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--r);
  transition: background .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease, transform .15s ease;
}

.sh-gbr-choice__option input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(193, 154, 54, .22);
}

.sh-gbr-choice__option input:checked + span {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(27, 42, 74, .16);
}

.sh-gbr-choice__option:hover span {
  border-color: rgba(27, 42, 74, .28);
  transform: translateY(-1px);
}

.sh-gbr-actions {
  padding-top: 6px;
}

.sh-gbr-actions .sh-btn {
  width: 100%;
  justify-content: center;
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  border: 2px solid transparent;
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 10px 24px rgba(193, 154, 54, .28);
}

.sh-gbr-actions .sh-btn:hover,
.sh-gbr-actions .sh-btn:focus-visible {
  background: var(--accent-dk);
  color: var(--white);
  transform: translateY(-1px);
}

/* Results */
.sh-gbr-placeholder {
  margin: auto 0;
  padding: 36px 18px;
  text-align: center;
  display: grid;
  gap: 14px;
  justify-items: center;
}

.sh-gbr-placeholder__icon {
  color: var(--accent);
  opacity: .85;
}

.sh-gbr-placeholder p {
  margin: 0;
  max-width: 34ch;
  font-size: .95rem;
  line-height: 1.7;
  color: var(--text-m);
}

.sh-gbr-result-card[hidden],
.sh-gbr-placeholder[hidden],
[data-gbr-mortgage-field][hidden],
[data-gbr-mortgage-row][hidden],
[data-gbr-broker-row][hidden] {
  display: none !important;
}

.sh-gbr-result-card {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.sh-gbr-result-card.is-entering {
  animation: sh-gbr-enter .45s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes sh-gbr-enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sh-gbr-rows {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sh-gbr-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(27, 42, 74, .08);
}

.sh-gbr-row:first-child {
  padding-top: 4px;
}

.sh-gbr-row__label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.sh-gbr-row__label strong {
  font-size: .94rem;
  font-weight: 600;
  color: var(--text-h);
}

.sh-gbr-row__title {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

/* Broker commission — one calculation block (net + VAT = total) */
.sh-gbr-broker {
  display: grid;
  gap: 0;
  margin: 4px 0 2px;
  padding: 12px 14px 14px;
  list-style: none;
  border: 1px solid rgba(27, 42, 74, .08);
  border-radius: var(--r);
  background: rgba(27, 42, 74, .025);
}

.sh-gbr-broker__line {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.sh-gbr-broker__label {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.sh-gbr-broker__label strong {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-m);
}

.sh-gbr-broker__label > span {
  font-size: .8rem;
  color: var(--text-m);
  line-height: 1.4;
}

.sh-gbr-broker__value {
  flex-shrink: 0;
  font-size: .95rem;
  font-weight: 600;
  color: var(--text-m);
  font-variant-numeric: tabular-nums;
  text-align: end;
}

.sh-gbr-broker__line--net {
  padding: 2px 0 6px;
}

.sh-gbr-broker__line--net .sh-gbr-broker__label strong {
  color: var(--text-h);
}

.sh-gbr-broker__line--vat {
  padding: 2px 0 8px;
  padding-inline-start: 14px;
}

.sh-gbr-broker__line--vat .sh-gbr-broker__label span {
  font-size: .84rem;
  font-weight: 500;
  color: var(--text-m);
}

.sh-gbr-broker__line--vat .sh-gbr-broker__value {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-m);
}

.sh-gbr-broker__line--total {
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px dashed rgba(27, 42, 74, .16);
}

.sh-gbr-broker__line--total .sh-gbr-broker__label strong {
  font-size: .96rem;
  font-weight: 700;
  color: var(--text-h);
}

.sh-gbr-broker__value--total {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--primary);
}

.sh-gbr-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  flex-shrink: 0;
}

.sh-gbr-tip__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  margin: 0;
  margin-inline-start: -4px;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  outline: none !important;
  color: var(--primary);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  vertical-align: middle;
}

/* Kill global .samaan-home button:focus-visible box; focus ring lives on the icon */
.samaan-home .sh-gbr-tip__btn:focus,
.samaan-home .sh-gbr-tip__btn:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.sh-gbr-tip__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font-family: var(--font-b), system-ui, sans-serif;
  font-size: 10px;
  font-weight: 700;
  font-style: normal;
  line-height: 1;
  color: var(--primary);
  background: transparent;
  pointer-events: none;
  transition: color .15s ease, border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.sh-gbr-tip__btn:hover .sh-gbr-tip__icon,
.sh-gbr-tip.is-open .sh-gbr-tip__icon {
  color: var(--accent-dk);
  border-color: var(--accent);
  background: var(--accent-lite);
}

.sh-gbr-tip__btn:focus-visible .sh-gbr-tip__icon {
  color: var(--accent-dk);
  border-color: var(--accent);
  background: var(--accent-lite);
  box-shadow: 0 0 0 2px rgba(193, 154, 54, .28);
}

.sh-gbr-tip__panel {
  position: absolute;
  z-index: 50;
  top: calc(100% + 8px);
  left: 0;
  width: min(300px, calc(100vw - 32px));
  padding: 12px 14px;
  font-family: var(--font-b), system-ui, sans-serif;
  font-size: .84rem !important;
  font-weight: 500 !important;
  font-style: normal;
  line-height: 1.55 !important;
  letter-spacing: .01em;
  color: #fff !important;
  background: var(--primary) !important;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--r);
  box-shadow: var(--sh-md);
  text-align: start;
  white-space: normal;
}

.sh-gbr-tip__panel[hidden] {
  display: none !important;
}

.sh-gbr-tip.is-open .sh-gbr-tip__panel {
  display: block;
}

.sh-gbr-tip__panel.is-flip-up {
  top: auto;
  bottom: calc(100% + 8px);
}

.sh-gbr-tip__panel.is-align-end {
  left: auto;
  right: 0;
}

.sh-gbr-row__label > span {
  font-size: .8rem;
  color: var(--text-m);
  line-height: 1.4;
}

.sh-gbr-row__value {
  flex-shrink: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.sh-gbr-total {
  margin-top: auto;
  padding: 22px 20px;
  background:
    linear-gradient(135deg, var(--primary) 0%, #24375f 100%);
  color: var(--white);
  border-radius: var(--r);
  box-shadow: 0 14px 30px rgba(27, 42, 74, .22);
  position: relative;
  overflow: hidden;
}

.sh-gbr-total::after {
  content: '';
  position: absolute;
  inset-inline-end: -20px;
  bottom: -30px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(193, 154, 54, .35), transparent 70%);
}

.sh-gbr-total__label {
  display: block;
  position: relative;
  z-index: 1;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .72);
  margin-bottom: 8px;
}

.sh-gbr-total__value {
  display: block;
  position: relative;
  z-index: 1;
  font-family: var(--font-h);
  font-size: clamp(1.85rem, 3.2vw, 2.35rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--white);
  font-variant-numeric: tabular-nums;
}

.sh-gbr-pdf {
  margin-top: 18px;
  padding: 14px;
  display: grid;
  gap: 8px;
  justify-items: stretch;
  background:
    linear-gradient(180deg, rgba(193, 154, 54, .08) 0%, rgba(255, 255, 255, .92) 100%);
  border: 1px solid rgba(193, 154, 54, .28);
  border-radius: var(--r);
}

.sh-gbr-pdf[hidden] {
  display: none !important;
}

.sh-gbr-pdf__btn {
  width: 100%;
  justify-content: center;
  gap: 10px;
  border: 1.5px solid var(--accent) !important;
  color: var(--primary) !important;
  background: var(--white) !important;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(193, 154, 54, .14);
}

.sh-gbr-pdf__btn:hover,
.sh-gbr-pdf__btn:focus-visible {
  border-color: var(--accent-dk) !important;
  color: var(--primary) !important;
  background: var(--accent-lite) !important;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(193, 154, 54, .2);
}

.sh-gbr-pdf__btn:disabled {
  opacity: .7;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

.sh-gbr-pdf__btn svg {
  flex-shrink: 0;
  color: var(--accent-dk);
}

.sh-gbr-pdf__error {
  margin: 0;
  font-size: .82rem;
  line-height: 1.45;
  color: #8a2f3a;
  text-align: center;
}

.sh-gbr-pdf__error[hidden] {
  display: none !important;
}

.sh-gbr-footer-meta {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sh-gbr-disclaimer {
  margin: 0;
  padding: 18px 20px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-size: .86rem;
  line-height: 1.65;
  color: var(--text-m);
}

.sh-gbr-related {
  margin: 0;
  padding: 14px 18px;
  background: rgba(255, 255, 255, .85);
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--accent);
  border-radius: var(--r);
}

.sh-gbr-related .sh-practice__link {
  font-size: .88rem;
  letter-spacing: .04em;
}

.sh-gbr-explain {
  padding-block: 72px;
  background:
    linear-gradient(180deg, rgba(248, 245, 239, .92) 0%, var(--cream) 100%);
  border-top: 1px solid rgba(26, 43, 74, .06);
}

.sh-gbr-explain .sh-section-header {
  margin-bottom: 40px;
}

.sh-gbr-explain .sh-section-header p {
  max-width: 640px;
}

.sh-gbr-explain__list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  max-width: 1180px;
  background: rgba(193, 154, 54, .35);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  overflow: hidden;
}

.sh-gbr-explain__item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  padding: 28px 24px 30px;
  background: var(--white);
  border: 0;
}

.sh-gbr-explain__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 4px;
  border-radius: 14px;
  color: var(--accent-dk);
  background: rgba(193, 154, 54, .12);
  border: 1px solid rgba(193, 154, 54, .22);
}

.sh-gbr-explain__index {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
}

.sh-gbr-explain__title {
  display: block;
  margin: 0;
  font-family: var(--font-h);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-h);
}

.sh-gbr-explain__item p {
  margin: 0;
  font-size: .92rem;
  line-height: 1.65;
  color: var(--text-m);
}

.sh-gbr-faq {
  padding-block: 72px;
  border-bottom: 1px solid rgba(26, 43, 74, .06);
}

@media (max-width: 1100px) {
  .sh-gbr-explain__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .sh-gbr-hero__grid {
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: start;
  }

  .sh-gbr-hero__aside {
    max-width: 360px;
  }
}

@media (max-width: 900px) {
  .sh-gbr-layout {
    grid-template-columns: 1fr;
  }

  .sh-gbr-panel {
    padding: 26px 22px;
  }

  .sh-gbr-panel--results::before {
    display: none;
  }
}

@media (max-width: 600px) {
  .sh-gbr-body {
    padding-block: 36px;
  }

  .sh-gbr-footer-meta {
    margin-top: 20px;
    gap: 20px;
  }

  .sh-gbr-hero {
    padding-bottom: 36px;
  }

  .sh-gbr-pills li {
    font-size: .72rem;
    padding: 7px 12px;
  }

  .sh-gbr-row {
    flex-direction: column;
    gap: 6px;
  }

  .sh-gbr-row__value {
    font-size: 1.1rem;
  }

  .sh-gbr-explain {
    padding-block: 56px;
  }

  .sh-gbr-faq {
    padding-block: 56px;
  }

  .sh-gbr-explain__list {
    grid-template-columns: 1fr;
  }

  .sh-gbr-explain__item {
    padding: 22px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sh-gbr-result-card.is-entering,
  .sh-gbr-choice__option:hover span,
  .sh-gbr-actions .sh-btn:hover {
    animation: none;
    transform: none;
  }
}
