/* MOKKO UI system — 1.0.9
   Small visual layer for controls that do not use the theme's canonical .button class. */

:root {
  --mokko-accent: #A58B64;
  --mokko-accent-hover: #8C734D;
  --mokko-ink: #153D40;
  --mokko-border: #D7D7D7;
  --mokko-control-radius: 999px;
  --mokko-card-radius: 18px;
  --mokko-field-radius: 12px;
}

/* Contact Form 7 submit buttons cannot be given theme classes from PHP templates. */
.wpcf7-submit,
.form__submit input[type="submit"],
.register__submit input[type="submit"] {
  min-height: 46px;
  padding: 0 26px;
  border: 1px solid var(--mokko-accent);
  border-radius: var(--mokko-control-radius);
  background: var(--mokko-accent);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: .045em;
  cursor: pointer;
  transition: background-color .22s ease, border-color .22s ease, box-shadow .22s ease, transform .22s ease;
}

@media (hover: hover) and (pointer: fine) {
  .wpcf7-submit:hover,
  .form__submit input[type="submit"]:hover,
  .register__submit input[type="submit"]:hover {
    background: var(--mokko-accent-hover);
    border-color: var(--mokko-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(21, 61, 64, .12);
  }
}

.button:focus-visible,
.header__cta:focus-visible,
.wpcf7-submit:focus-visible,
.header__lang-toggle:focus-visible,
.catalog-filter__input:focus-visible {
  outline: 2px solid var(--mokko-ink);
  outline-offset: 3px;
}

.header__lang-toggle {
  min-width: 54px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(165, 139, 100, .55);
  border-radius: var(--mokko-control-radius);
  background: transparent;
}

.header__lang-list {
  overflow: hidden;
  border-radius: 14px;
}

.header__lang-list a {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  text-decoration: none;
  color: inherit;
}

/* Forms and catalog filters use the same softer geometry. */
.popup__content {
  border-radius: 24px;
}

.popup__field input,
.form__filter select,
.form__filter input,
.form__field input,
.register__field input,
.catalog-filter__input {
  border-radius: var(--mokko-field-radius);
}

.catalog-filter__input,
.catalog-filter__action .button {
  height: 44px;
}

.form__topic .wpcf7-list-item-label,
.popup__topic .wpcf7-list-item-label {
  border-radius: var(--mokko-control-radius);
}

/* Cards now share one radius system instead of 4/8/10px variations. */
.offers__item,
.news__item {
  border-radius: var(--mokko-card-radius);
}

.offers__image img {
  border-radius: 14px;
}

.news__image {
  overflow: hidden;
  border-radius: var(--mokko-card-radius) var(--mokko-card-radius) 0 0;
}

.offers__badge {
  padding: 7px 14px;
  border-radius: var(--mokko-control-radius);
}

@media (max-width: 29.99875em) {
  .wpcf7-submit,
  .form__submit input[type="submit"],
  .register__submit input[type="submit"] {
    min-height: 44px;
    padding-inline: 20px;
  }
}

/* 1.0.11 — glass is a contextual variant, not the default button style. */
.button,
.wpcf7-submit,
.form__submit input[type="submit"],
.register__submit input[type="submit"] {
  border-radius: var(--mokko-control-radius);
}

/* Glass belongs only on media/dark surfaces and navigation CTAs. */
.button.glass,
.hero .button,
.hero-fullscreen .button,
.photo-quote .button,
body.has-hero-header .header:not(.header--scrolled) .header__cta,
.header__mobile.is-open .header__cta {
  background: rgba(20, 20, 20, .38);
  -webkit-backdrop-filter: blur(14px) saturate(135%);
  backdrop-filter: blur(14px) saturate(135%);
  border: 1px solid rgba(165, 139, 100, .72);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 8px 24px rgba(0,0,0,.12);
}

@media (hover: hover) and (pointer: fine) {
  .button.glass:hover,
  .hero .button:hover,
  .hero-fullscreen .button:hover,
  .photo-quote .button:hover,
  body.has-hero-header .header:not(.header--scrolled) .header__cta:hover,
  .header__mobile.is-open .header__cta:hover {
    background: #A58B64;
    border-color: #A58B64;
    color: #153D40;
  }
}

/* All large image heroes follow the same full-screen media rule as Home/Sell. */
body.has-hero-header .hero.v2 {
  margin-bottom: 0;
}

body.has-hero-header .hero.v2 .hero__container {
  width: 100%;
  max-width: none;
  min-height: 100svh;
  padding-top: 92px;
  padding-bottom: 40px;
}

body.has-hero-header .hero.v2 .hero__image img {
  border-radius: 0;
}

body.has-hero-header .hero.v2 .hero__image::after {
  opacity: .34;
  background: linear-gradient(180deg, rgba(5, 22, 23, .22), rgba(5, 22, 23, .52));
}

body.has-hero-header .hero.v2 .hero__content {
  padding-block: 80px 48px;
}

/* The creditworthiness checkbox belongs only to the mortgage CTA popup. */
.mokko-mortgage-only,
.mokko-credit-check {
  display: none;
}

body.is-mortgage-page .mokko-mortgage-only,
body.is-mortgage-page .mokko-credit-check {
  display: block;
  margin: 12px 0 18px;
  color: #153D40;
}

.mokko-mortgage-only .wpcf7-list-item {
  margin: 0;
}

.mokko-mortgage-only label,
.mokko-credit-check label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.mokko-mortgage-only input[type="checkbox"],
.mokko-credit-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #A58B64;
}

/* CF7 success state: replace the form with a clean confirmation instead of appending text below it. */
.wpcf7-form.mokko-form-success > :not(.wpcf7-response-output) {
  display: none !important;
}

.wpcf7-form.mokko-form-success .wpcf7-response-output {
  display: flex !important;
  min-height: 170px;
  margin: 0 !important;
  padding: 34px 22px !important;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1px solid rgba(165, 139, 100, .45) !important;
  border-radius: 18px;
  background: rgba(255, 255, 255, .72);
  color: #153D40;
  font-size: 18px;
  line-height: 1.45;
  animation: mokko-success-in .32s ease both;
}

@keyframes mokko-success-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 47.99875em) {
  body.has-hero-header .hero.v2 .hero__container {
    min-height: 100svh;
    padding-top: 74px;
    padding-bottom: 24px;
  }
  body.has-hero-header .hero.v2 .hero__content {
    padding-block: 56px 36px;
  }
}

/* Accessible page H1 for layouts whose visual heading is intentionally elsewhere. */
.mokko-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ==========================================================================
   1.0.15 — consistency pass
   ========================================================================== */

/* Base typography lives on <body> too: popups, the mobile tab bar and plugin
   output (WPML, CF7) render outside .wrapper and fell back to the browser serif. */
body {
  font-family: "Source Sans 3", sans-serif;
  color: #505050;
  font-size: 14px;
  line-height: 1.7;
  letter-spacing: .078em;
  background-color: #fff;
}

.popups,
.tabbar {
  font-family: "Source Sans 3", sans-serif;
}

.wpml-ls,
.wpml-ls a {
  font-family: "Source Sans 3", sans-serif;
  color: #153D40;
}

/* Hero CTAs: <button> and <a> share one size (a generic `.hero button` rule enlarged only buttons). */
.hero__actions .button {
  min-height: 50px;
  padding: 0 32px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  box-shadow: none;
}

/* Text over photographic heroes stays legible on bright images. */
.hero.v2 .hero__title,
.hero.v2 .hero__subtitle {
  text-shadow: 0 1px 3px rgba(0, 0, 0, .45), 0 4px 22px rgba(0, 0, 0, .35);
}

body.has-hero-header .hero.v2.webinar .hero__image::after {
  opacity: .78;
}

/* Secondary metadata on property cards: readable grey instead of #b4b4b4. */
.offers__meta,
.offers__city,
.offers__price-per {
  color: #8a8a8a;
}

/* Catalog cards: price and area chip never break mid-value. */
.catalog__item .offers__info {
  flex-wrap: wrap;
  row-gap: 10px;
}

.catalog__item .offers__price p,
.offers__area {
  white-space: nowrap;
}

.catalog-filter__action .button--reset {
  background-color: transparent;
  border-color: #A58B64;
  color: #A58B64;
}

.catalog-filter__action .button--reset:hover {
  background-color: #A58B64;
  color: #fff;
}

/* News / publication cards: equal heights, meta row pinned to the bottom. */
.news__item {
  height: 100%;
  border-radius: var(--mokko-card-radius);
}

.news__meta {
  margin-top: auto;
  padding-top: 6px;
}

@media (min-width: 62em) {
  /* Fewer cards than slots: centre them instead of leaving a gap on the right. */
  .news__slider:not(:has(.swiper-slide:nth-child(4))) .swiper-wrapper {
    justify-content: center;
  }
}

/* The creditworthiness question belongs to mortgage pages only (general form too). */
.form__checkbox:has([name^="credit_check"]) {
  display: none;
}

body.is-mortgage-page .form__checkbox:has([name^="credit_check"]) {
  display: block;
}

/* Pills everywhere: tags and the webinar registration card follow the shared radii. */
.about__tag {
  border-radius: var(--mokko-control-radius);
  padding: 7px 16px;
}

.register__card {
  border-radius: var(--mokko-card-radius);
}

/* Team grid: an incomplete last row is centred. */
.team__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.team__list > .team__item {
  flex: 0 0 calc((100% - 120px) / 4);
  width: auto;
}

@media (max-width: 61.99875em) {
  .team__list > .team__item {
    flex-basis: calc((100% - 24px) / 2);
  }
}

@media (max-width: 29.99875em) {
  .team__list > .team__item {
    flex-basis: 100%;
  }
}

/* Mortgage calculator. */
.calculator select {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.calculator__cta-action .button {
  min-height: 50px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

/* WIBOR panel uses the brand palette and never wraps its labels. */
.mokko-wibor-tag,
.mokko-wibor-label {
  color: #153D40;
}

.mokko-wibor-sync-info,
.mokko-wibor-margin-note,
.mokko-wibor-divider-dot {
  color: #8a8a8a;
}

.mokko-wibor-green-dot {
  background-color: #A58B64;
  box-shadow: 0 0 6px rgba(165, 139, 100, .5);
}

.mokko-wibor-bar-values {
  flex-wrap: wrap;
  gap: 6px 14px;
}

.mokko-wibor-val-item,
.mokko-wibor-label,
.mokko-wibor-margin-note {
  white-space: nowrap;
  letter-spacing: .04em;
}

.mokko-wibor-rate-num {
  color: #153D40;
}

/* Blog articles: reading typography instead of section-scale headings. */
.article__header h1 {
  font-size: 44px;
}

.article__body {
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: .02em;
}

.article__body h1,
.article__body h2 {
  margin-top: 16px;
  font-size: 30px;
  line-height: 1.25;
}

.article__body h3 {
  margin-top: 8px;
  font-size: 23px;
  line-height: 1.3;
  color: #153D40;
}

.article__body a {
  color: #153D40;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article__body table {
  width: 100%;
  font-size: 14px;
  letter-spacing: .02em;
}

.article__body .article__table {
  overflow-x: auto;
}

.article__body th,
.article__body td {
  padding: 10px 14px;
  border-bottom: 1px solid #e5e5e5;
  text-align: left;
}

.article__body th {
  color: #153D40;
  font-weight: 700;
  background-color: #f7f7f7;
}

@media (max-width: 47.99875em) {
  .article__header h1 {
    font-size: 28px;
  }

  .article__body {
    font-size: 15px;
  }

  .article__body h1,
  .article__body h2 {
    font-size: 23px;
  }

  .article__body h3 {
    font-size: 19px;
  }
}

/* Lead form shared by the Sell popup and the Valuation page
   (its styles used to live in the CF7 form body and leaked onto every form). */
.mokko-popup-form .form-group {
  margin-bottom: 18px;
}

.mokko-popup-form .form-group p,
.mokko-popup-form .form-submit-row p {
  margin: 0;
}

/* CF7 autop puts a <br> between each label and its control. */
.mokko-popup-form .form-group br {
  display: none;
}

.mokko-popup-form .popup__field-label,
.mokko-owner-name label {
  display: block;
  margin-bottom: 2px;
  color: #153D40;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
}

.mokko-popup-form input[type="text"],
.mokko-popup-form input[type="tel"],
.mokko-popup-form input[type="email"],
.mokko-popup-form select,
.mokko-owner-name input {
  width: 100%;
  height: 40px;
  padding: 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(21, 61, 64, .3);
  border-radius: 0;
  color: #153D40;
  font-family: "Source Sans 3", sans-serif;
  font-size: 14px;
  letter-spacing: .04em;
}

.mokko-popup-form input:focus,
.mokko-popup-form select:focus,
.mokko-owner-name input:focus {
  outline: none;
  border-bottom-color: #A58B64;
}

.mokko-popup-form .iti {
  width: 100%;
}

.mokko-popup-form .form-submit-row {
  margin-top: 28px;
}

.mokko-popup-form .wpcf7-submit {
  width: 100%;
}

.mokko-owner-name {
  margin-bottom: 18px;
}

.v-form__body .form__heading {
  margin-bottom: 24px;
}

.v-form__body .form__heading h3 {
  font-size: 26px;
  color: #153D40;
}
