/* stylelint-disable max-line-length */
main > .section.warranty-container-container {
  --background-color: white;
  --light-color: #f8f8f8;
  --dark-color: #505050;
  --text-color: #131313;
  --link-color: #3b63fb;
  --link-hover-color: #1d3ecf;

  /* the source's font (asianpaints.com: apFontBold/Medium/Light are Manrope weights); the host
     site's Manrope @font-face supplies it */
  --body-font-size-m: 22px;
  --body-font-size-s: 19px;
  --body-font-size-xs: 17px;
  --heading-font-size-xxl: 55px;
  --heading-font-size-xl: 44px;
  --heading-font-size-l: 34px;
  --heading-font-size-m: 27px;
  --heading-font-size-s: 24px;
  --heading-font-size-xs: 22px;
  --nav-height: 64px;

  color: var(--text-color);
  font-size: var(--body-font-size-m);
  line-height: 1.6;
}

@media (width >= 900px) {
  main > .section.warranty-container-container {
    --body-font-size-m: 18px;
    --body-font-size-s: 16px;
    --body-font-size-xs: 14px;
    --heading-font-size-xxl: 45px;
    --heading-font-size-xl: 36px;
    --heading-font-size-l: 28px;
    --heading-font-size-m: 22px;
    --heading-font-size-s: 20px;
    --heading-font-size-xs: 18px;
  }
}

/* the browser's box model, in case the host site sets box-sizing on everything */
:where(main > .section.warranty-container-container), :where(main > .section.warranty-container-container) *, :where(main > .section.warranty-container-container) ::before, :where(main > .section.warranty-container-container) ::after {
  box-sizing: revert;
}

:where(main > .section.warranty-container-container) :is(h1, h2, h3, h4, h5, h6) {
  margin-top: 0.8em;
  margin-bottom: 0.25em;
  font-weight: 600;
  line-height: 1.25;
  color: inherit;
  scroll-margin: 40px;
}

:where(main > .section.warranty-container-container) h1 { font-size: var(--heading-font-size-xxl); }
:where(main > .section.warranty-container-container) h2 { font-size: var(--heading-font-size-xl); }
:where(main > .section.warranty-container-container) h3 { font-size: var(--heading-font-size-l); }
:where(main > .section.warranty-container-container) h4 { font-size: var(--heading-font-size-m); }
:where(main > .section.warranty-container-container) h5 { font-size: var(--heading-font-size-s); }
:where(main > .section.warranty-container-container) h6 { font-size: var(--heading-font-size-xs); }

:where(main > .section.warranty-container-container) :is(p, dl, ol, ul, pre, blockquote) {
  margin-top: 0.8em;
  margin-bottom: 0.25em;
}

:where(main > .section.warranty-container-container) a:where(:any-link) {
  color: var(--link-color);
  text-decoration: none;
  overflow-wrap: break-word;
}

:where(main > .section.warranty-container-container) a:where(:hover) {
  color: var(--link-hover-color);
  text-decoration: underline;
}

:where(main > .section.warranty-container-container) img {
  max-width: 100%;
  width: auto;
  height: auto;
  vertical-align: baseline;
}

:where(main > .section.warranty-container-container) :is(input, textarea, select, button) {
  font: inherit;
}

/* stylelint-enable max-line-length */

/* ---- end of self-contained base ---- */

/* warranty documents list beside a promo banner; values from the source
   (asianpaints.com/more/warranty.html, .offline-warranty-container), all in Manrope */
.warranty-container {
  /* source colours */
  --warranty-container-accent: #fcaf17;
  --warranty-container-accent-hover: #fdbf45;
  --warranty-container-heading: #373737;
  --warranty-container-text: #222;
  --warranty-container-cta-text: #1e1e1e;
  --warranty-container-rule: #e9e9e9;
  --warranty-container-guide-rule: #8839ff;
  --warranty-container-list-height: 575px;

  display: grid;
  grid-template-areas:
    'banner'
    'header'
    'list';
  grid-template-columns: minmax(0, 1fr);
  font-family: var(--body-font-family);
  font-size: 14px;
  line-height: 22px;
  color: var(--warranty-container-text);
}

/* list title */
.warranty-container .warranty-container-header {
  grid-area: header;
  padding-top: 25px;
}

.warranty-container .warranty-container-header > * {
  margin: 0;
}

.warranty-container .warranty-container-header > :is(h1, h2, h3, h4, h5, h6) {
  font-size: 16px;
  font-weight: 700;
  line-height: 28.8px;
  color: var(--warranty-container-heading);
}

/* scrolling list */
.warranty-container .warranty-container-scroller {
  grid-area: list;
  height: var(--warranty-container-list-height);
  overflow-y: scroll;
  overscroll-behavior: contain;

  /* a host page's scrollbar-color (inherited, e.g. the stage project's body rule) or
     scrollbar-width makes Chrome ignore the ::-webkit-scrollbar styles below; reset them */
  scrollbar-color: auto;
  scrollbar-width: auto;
  position: relative;
}

/* the source's thin scrollbar (WebKit/Blink; see the reset above) */
.warranty-container .warranty-container-scroller::-webkit-scrollbar {
  width: 5px;
  height: auto;
  border-radius: 5px;
  background-color: transparent;
}

.warranty-container .warranty-container-scroller::-webkit-scrollbar-thumb {
  height: 2px;
  border-radius: 5px;
  background-color: #75787b;
}

/* browsers without ::-webkit-scrollbar (Firefox): the closest standard equivalent */
@supports not selector(::-webkit-scrollbar) {
  .warranty-container .warranty-container-scroller {
    scrollbar-color: #75787b transparent;
    scrollbar-width: thin;
  }
}

.warranty-container .warranty-container-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.warranty-container .warranty-container-item {
  margin: 0 5px 0 0;
  padding: 10px 8px;
  border-bottom: 1px solid var(--warranty-container-rule);
}

.warranty-container .warranty-container-item > * {
  margin: 0;
}

/* product name and the +/- toggle */
.warranty-container .warranty-container-item-heading {
  font-size: 16px;
  font-weight: 700;
  line-height: 28.8px;
  color: var(--warranty-container-heading);
  text-transform: capitalize;
}

.warranty-container .warranty-container-item-heading button {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: start;
  text-transform: inherit;
  cursor: pointer;
}

/* the source's "+" / "-" glyph, floated after the name: long names use the full width and the
   glyph sits beside their last line, as on the source */
.warranty-container .warranty-container-icon {
  float: right;
  margin: 5px 5px 0 0;
  font-size: 30px;
  font-weight: 400;
  line-height: 22px;
}

.warranty-container .warranty-container-icon::before {
  content: '+';
}

.warranty-container [aria-expanded='true'] .warranty-container-icon::before {
  content: '-';
  font-size: 35px;
}

/* "performance warranty : 15 years" */
.warranty-container .warranty-container-terms {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;

  /* the source's labels are inline blocks, a space (0.2em of Manrope) apart */
  column-gap: 0.2em;
}

.warranty-container .warranty-container-terms > div {
  display: flex;
  gap: 0.25em;
  font-size: 14px;
  font-weight: 700;
  line-height: 28px;
}

.warranty-container .warranty-container-terms dt {
  text-transform: lowercase;
}

.warranty-container .warranty-container-terms dt::after {
  content: ' :';
}

.warranty-container .warranty-container-terms dd {
  margin: 0;

  /* the source sets the value in Manrope Medium inside a bold label, so the browser fakes the bold:
     the Medium glyph widths with a thin outline (about 1/25 of the font size, as Chrome draws it) */
  font-weight: 500;
  -webkit-text-stroke: 0.04em currentcolor;
}

/* two labels wrap onto two lines on mobile; the source has 4px more below the second */
.warranty-container .warranty-container-terms > div:nth-child(2) {
  margin-bottom: 4px;
}

.warranty-container .warranty-container-guide {
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 22px;
}

.warranty-container .warranty-container-guide a {
  padding-top: 15px;
  border-bottom: 2px solid var(--warranty-container-guide-rule);
  color: var(--warranty-container-text);
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  letter-spacing: 0.92px;
  text-decoration: none;
  text-transform: uppercase;
}

/* the description, shown when the item is open */
.warranty-container .warranty-container-panel {
  padding-top: 15px;
}

.warranty-container .warranty-container-panel > * {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 300;
  line-height: 28px;
  letter-spacing: 0.5px;
}

.warranty-container .warranty-container-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* banner with CTA laid over the image; edge to edge on mobile, as on the source */
.warranty-container .warranty-container-banner {
  grid-area: banner;
  position: relative;
  align-self: start;
  margin: 0 -15px;
}

.warranty-container .warranty-container-banner picture {
  display: block;
}

.warranty-container .warranty-container-banner img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 500 / 630;
  object-fit: cover;
}

.warranty-container .warranty-container-cta {
  position: absolute;
  top: 53%;
  left: 8%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  margin: 0;
  padding: 0 30px;
  border: 0;
  border-radius: 45px;
  background-color: var(--warranty-container-accent);
  color: var(--warranty-container-cta-text);
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  text-decoration: none;
  cursor: pointer;
}

.warranty-container .warranty-container-cta:hover {
  background-color: var(--warranty-container-accent-hover);
  color: var(--warranty-container-cta-text);
  text-decoration: none;
}

.warranty-container .warranty-container-item-heading button:focus-visible,
.warranty-container .warranty-container-guide a:focus-visible,
.warranty-container .warranty-container-cta:focus-visible {
  outline: 2px solid var(--warranty-container-guide-rule);
  outline-offset: 2px;
}

@media (width >= 992px) {
  .warranty-container {
    --warranty-container-list-height: 490px;

    grid-template:
      'header banner' auto
      'list banner' 1fr / minmax(0, 6fr) minmax(0, 5fr);
    column-gap: 7%;
  }

  .warranty-container .warranty-container-header {
    padding-top: 0;
  }

  .warranty-container .warranty-container-header > :is(h1, h2, h3, h4, h5, h6) {
    font-size: 24px;
    font-weight: 800;
    line-height: 43.2px;
  }

  .warranty-container .warranty-container-item {
    padding: 15px 6px;
  }

  .warranty-container .warranty-container-item-heading {
    font-size: 20px;
    line-height: 36px;
  }

  .warranty-container .warranty-container-terms > div {
    margin-bottom: 7px;
  }

  .warranty-container .warranty-container-terms > div:first-child {
    padding-right: 8px;
  }

  .warranty-container .warranty-container-terms > div:nth-child(2) {
    margin-bottom: 7px;
    padding-left: 8px;
    border-left: 1px solid rgb(0 0 0 / 20%);
  }

  .warranty-container .warranty-container-guide {
    margin-bottom: 0;
  }

  .warranty-container .warranty-container-guide a {
    font-size: 13px;
    line-height: 22px;
    letter-spacing: normal;
  }

  .warranty-container .warranty-container-panel {
    padding-top: 20px;
  }

  .warranty-container .warranty-container-banner {
    margin: 0;
  }

  .warranty-container .warranty-container-cta {
    min-height: 46px;
    font-size: 18px;
    font-weight: 800;
    line-height: 27px;
  }
}

/* the source's column widths (list : banner, both shrunk to fit beside the 7% gap):
   60% : 50% up to 1199px, 51% : 48% to 1280px, 55% : 45% to 1333px, then 60% : 40% */
@media (width >= 1200px) {
  .warranty-container {
    --warranty-container-list-height: 550px;

    grid-template-columns: minmax(0, 51fr) minmax(0, 48fr);
  }
}

@media (width > 1200px) {
  .warranty-container .warranty-container-cta {
    padding: 0 40px;
    font-size: 24px;
    line-height: 36px;
  }
}

@media (width > 1280px) {
  .warranty-container {
    grid-template-columns: minmax(0, 55fr) minmax(0, 45fr);
  }
}

@media (width > 1333px) {
  .warranty-container {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  }
}

@media (width > 1366px) {
  .warranty-container {
    --warranty-container-list-height: 630px;
  }
}

@media (width > 1440px) {
  .warranty-container .warranty-container-cta {
    padding: 0 50px;
  }
}

@media (width >= 1800px) {
  .warranty-container {
    --warranty-container-list-height: 730px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .warranty-container * {
    transition: none;
  }
}

/* stylelint-disable max-line-length, no-duplicate-selectors, no-descending-specificity */

/* section layout: full width with the source's padding (10px 15px, 0 80px on desktop, 0 100px from
   1366px), instead of the site's centred column */
main > .section.warranty-container-container > div {
  max-width: none;
  padding: 10px 15px;
}

/* the source's space between the header and the block, and below it (its wrapper's topGap50-10 and
   baseCTSpace50): 10px above and 25px below on mobile, 50px each from 992px */
main > .section.warranty-container-container {
  margin-bottom: 25px;
  padding-top: 10px;
}

@media (width >= 992px) {
  main > .section.warranty-container-container {
    margin-bottom: 50px;
    padding-top: 50px;
  }

  main > .section.warranty-container-container > div {
    padding: 0 80px;
  }
}

@media (width >= 1366px) {
  main > .section.warranty-container-container > div {
    padding: 0 100px;
  }
}

/* the source zooms the whole page below 1440px; scale the section the same way (by less when the
   host page already zooms the body and sets --body-zoom) */
@media (width >= 992px) and (width < 1100px) {
  main > .section.warranty-container-container {
    zoom: calc(0.7 / var(--body-zoom, 1));
  }
}

@media (width >= 1100px) and (width < 1200px) {
  main > .section.warranty-container-container {
    zoom: calc(0.75 / var(--body-zoom, 1));
  }
}

@media (width >= 1200px) and (width < 1280px) {
  main > .section.warranty-container-container {
    zoom: calc(0.8 / var(--body-zoom, 1));
  }
}

@media (width >= 1280px) and (width < 1366px) {
  main > .section.warranty-container-container {
    zoom: calc(0.85 / var(--body-zoom, 1));
  }
}

@media (width >= 1366px) and (width < 1440px) {
  main > .section.warranty-container-container {
    zoom: calc(0.9 / var(--body-zoom, 1));
  }
}

/* stylelint-enable max-line-length, no-duplicate-selectors, no-descending-specificity */

/* ---- end of section layout ---- */
