/* HL CMS info pages (Transport, Maksevõimalused, Tingimused, Järelmaks)
   + shared card chrome for module pages that reuse the same shell. */

body#cms .page-header {
  display: none !important;
}

body#module-hlwithdrawal-form .page-header {
  display: none !important;
}

/* Empty breadcrumb still reserved space under header — collapse it */
body#cms .breadcrumb__wrapper,
body#module-hlwithdrawal-form .breadcrumb__wrapper {
  margin-bottom: 0 !important;
  min-height: 0 !important;
}

body#cms #content.page-content--cms,
body#cms .page-content--cms {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

body#module-hlwithdrawal-form #content.page-content--general,
body#module-hlwithdrawal-form .page-content--general {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* Designed document cards — wider than inline 1040px */
body#cms #hl-makse,
body#cms #hl-tarne,
body#cms #hl-tingimused,
body#cms #hl-inbank {
  max-width: min(1280px, 100%) !important;
  width: 100% !important;
  border-radius: 14px !important;
  overflow: hidden;
  margin-top: 10px !important;
  margin-bottom: 28px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-shadow: 0 1px 2px rgba(24, 26, 28, 0.04);
  box-sizing: border-box;
}

/* Soften red section number chips */
body#cms #hl-makse [style*="background-color:#d71920"],
body#cms #hl-tarne [style*="background-color:#d71920"],
body#cms #hl-tingimused [style*="background-color:#d71920"],
body#cms #hl-inbank [style*="background-color:#d71920"] {
  border-radius: 6px;
  display: inline-block;
}

/* Match header/footer graphite (#30343b) — CMS inline uses darker #222629 */
body#cms #hl-makse [style*="background-color:#222629"],
body#cms #hl-tarne [style*="background-color:#222629"],
body#cms #hl-tingimused [style*="background-color:#222629"],
body#cms #hl-inbank [style*="background-color:#222629"] {
  background-color: #30343b !important;
}

/*
 * custom.css sets `a { color: var(--hl-black) !important }` which kills
 * designed CMS link colors (white on dark footers, red accent on body).
 */
body#cms #hl-makse [style*="background-color:#222629"] a,
body#cms #hl-tarne [style*="background-color:#222629"] a,
body#cms #hl-tingimused [style*="background-color:#222629"] a,
body#cms #hl-inbank [style*="background-color:#222629"] a,
body#cms #hl-makse a[style*="color:#ffffff"],
body#cms #hl-tarne a[style*="color:#ffffff"],
body#cms #hl-tingimused a[style*="color:#ffffff"],
body#cms #hl-inbank a[style*="color:#ffffff"],
body#cms #hl-makse a[style*="color:#fff"],
body#cms #hl-tarne a[style*="color:#fff"],
body#cms #hl-tingimused a[style*="color:#fff"],
body#cms #hl-inbank a[style*="color:#fff"] {
  color: #ffffff !important;
}

body#cms #hl-makse [style*="background-color:#222629"] a:hover,
body#cms #hl-tarne [style*="background-color:#222629"] a:hover,
body#cms #hl-tingimused [style*="background-color:#222629"] a:hover,
body#cms #hl-inbank [style*="background-color:#222629"] a:hover {
  color: #ffffff !important;
  opacity: 0.92;
}

body#cms #hl-makse a[style*="color:#c9141b"],
body#cms #hl-tarne a[style*="color:#c9141b"],
body#cms #hl-tingimused a[style*="color:#c9141b"],
body#cms #hl-inbank a[style*="color:#c9141b"],
body#cms #hl-makse a[style*="color:#d71920"],
body#cms #hl-tarne a[style*="color:#d71920"],
body#cms #hl-tingimused a[style*="color:#d71920"],
body#cms #hl-inbank a[style*="color:#d71920"] {
  color: #c9141b !important;
}

/* Desktop: thinner dark hero (was inline 42px) */
body#cms #hl-makse > div[style*="background-color:#222629"],
body#cms #hl-tarne > div[style*="background-color:#222629"],
body#cms #hl-tingimused > div[style*="background-color:#222629"],
body#cms #hl-inbank > div[style*="background-color:#222629"] {
  padding-top: 26px !important;
  padding-bottom: 22px !important;
}

body#cms #hl-makse > div[style*="background-color:#222629"] > div[style*="font-size:31px"],
body#cms #hl-tarne > div[style*="background-color:#222629"] > div[style*="font-size:31px"],
body#cms #hl-tingimused > div[style*="background-color:#222629"] > div[style*="font-size:31px"],
body#cms #hl-inbank > div[style*="background-color:#222629"] > div[style*="font-size:31px"] {
  margin-bottom: 8px !important;
}

body#cms #hl-makse > div[style*="background-color:#222629"] > div[style*="font-size:15px"],
body#cms #hl-tarne > div[style*="background-color:#222629"] > div[style*="font-size:15px"],
body#cms #hl-tingimused > div[style*="background-color:#222629"] > div[style*="font-size:15px"],
body#cms #hl-inbank > div[style*="background-color:#222629"] > div[style*="font-size:15px"] {
  line-height: 1.6 !important;
  max-width: 54rem !important;
}

@media (max-width: 767px) {
  /* Outer shell: less side gutter so card sits closer to screen edge */
  body#cms #wrapper .columns-container.container,
  body#cms .columns-container.container,
  body#cms #content-wrapper,
  body#cms .container,
  body#module-hlwithdrawal-form #wrapper .columns-container.container,
  body#module-hlwithdrawal-form .columns-container.container {
    padding-left: 6px !important;
    padding-right: 6px !important;
  }

  body#cms #hl-makse,
  body#cms #hl-tarne,
  body#cms #hl-tingimused,
  body#cms #hl-inbank {
    border-radius: 10px !important;
    margin-top: 4px !important;
    margin-bottom: 16px !important;
  }

  /* All direct card sections: tighter horizontal padding (was 38px inline) */
  body#cms #hl-makse > div,
  body#cms #hl-tarne > div,
  body#cms #hl-tingimused > div,
  body#cms #hl-inbank > div {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  /* Dark hero: thinner + calmer lead under title */
  body#cms #hl-makse > div[style*="background-color:#222629"],
  body#cms #hl-tarne > div[style*="background-color:#222629"],
  body#cms #hl-tingimused > div[style*="background-color:#222629"],
  body#cms #hl-inbank > div[style*="background-color:#222629"] {
    padding-top: 14px !important;
    padding-bottom: 14px !important;
  }

  body#cms #hl-makse > div[style*="background-color:#222629"] > div[style*="font-size:31px"],
  body#cms #hl-tarne > div[style*="background-color:#222629"] > div[style*="font-size:31px"],
  body#cms #hl-tingimused > div[style*="background-color:#222629"] > div[style*="font-size:31px"],
  body#cms #hl-inbank > div[style*="background-color:#222629"] > div[style*="font-size:31px"] {
    font-size: 21px !important;
    margin-bottom: 6px !important;
    line-height: 1.25 !important;
  }

  body#cms #hl-makse > div[style*="background-color:#222629"] > div[style*="font-size:12px"],
  body#cms #hl-tarne > div[style*="background-color:#222629"] > div[style*="font-size:12px"],
  body#cms #hl-tingimused > div[style*="background-color:#222629"] > div[style*="font-size:12px"],
  body#cms #hl-inbank > div[style*="background-color:#222629"] > div[style*="font-size:12px"] {
    margin-bottom: 5px !important;
    letter-spacing: 1.4px !important;
  }

  /* Lead under title: smaller + airier (was aggressive 14–15px dense) */
  body#cms #hl-makse > div[style*="background-color:#222629"] > div[style*="font-size:15px"],
  body#cms #hl-tarne > div[style*="background-color:#222629"] > div[style*="font-size:15px"],
  body#cms #hl-tingimused > div[style*="background-color:#222629"] > div[style*="font-size:15px"],
  body#cms #hl-inbank > div[style*="background-color:#222629"] > div[style*="font-size:15px"] {
    font-size: 12.5px !important;
    line-height: 1.7 !important;
    font-weight: 400 !important;
    color: #b8bcc0 !important;
    max-width: none !important;
  }

  /* Info strip */
  body#cms #hl-makse > div[style*="background-color:#f2f3f4"],
  body#cms #hl-tarne > div[style*="background-color:#f2f3f4"],
  body#cms #hl-tingimused > div[style*="background-color:#f2f3f4"],
  body#cms #hl-inbank > div[style*="background-color:#f2f3f4"] {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }

  /* Soften note/callout boxes */
  body#cms #hl-makse [style*="border-left:"],
  body#cms #hl-tarne [style*="border-left:"],
  body#cms #hl-tingimused [style*="border-left:"],
  body#cms #hl-inbank [style*="border-left:"] {
    border-radius: 8px;
  }
}
