/* "Instrukcje" page: list of manuals and the single-manual view (templates/cms/page-9.tpl). */

.page-cms-9 {
  color: #30413a;
  font-size: 16px;
  line-height: 1.7;
}

/* The header's category menu stays collapsed here, as on product pages; without this rule the
   full-width layout shows it open on top of the page content. It still opens on click. */
body.cms-id-9 #header #cp_vertical_menu_top #top-menu {
  display: none;
}

/* ---------- List of manuals ---------- */

.allevet-manuals {
  max-width: 1180px;
  margin: 0 auto;
}

.allevet-manuals__lead {
  max-width: 760px;
  margin: 0 0 24px;
  font-size: 17px;
}

.allevet-manuals__search {
  display: block;
  max-width: 460px;
  margin: 0 0 36px;
}

.allevet-manuals__search span {
  display: block;
  margin-bottom: 6px;
  color: #147248;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.allevet-manuals__search input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid #c5d9ce;
  border-radius: 10px;
  background: #fff;
  color: #1f3029;
  font-size: 16px;
}

.allevet-manuals__search input:focus {
  border-color: #147248;
  outline: 2px solid rgba(20, 114, 72, .25);
  outline-offset: 1px;
}

.allevet-manuals__group {
  margin: 0 0 40px;
}

.allevet-manuals__group h2 {
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #d6e6dd;
  color: #1f3029;
  font-size: clamp(1.25rem, 1.6vw, 1.5rem);
  line-height: 1.3;
}

.allevet-manuals__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.allevet-manuals__card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  padding: 20px 22px;
  border: 1px solid #d6e6dd;
  border-radius: 14px;
  background: #fff;
  color: #30413a;
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.allevet-manuals__card:hover,
.allevet-manuals__card:focus {
  border-color: #147248;
  box-shadow: 0 8px 24px rgba(31, 48, 41, .08);
  color: #30413a;
  text-decoration: none;
  transform: translateY(-1px);
}

.allevet-manuals__title {
  color: #1f3029;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.allevet-manuals__summary {
  flex: 1;
  font-size: 15px;
  line-height: 1.55;
}

.allevet-manuals__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #147248;
  font-size: 14px;
  font-weight: 700;
}

.allevet-manuals__more .material-icons {
  font-size: 18px;
}

.allevet-manuals__empty,
.allevet-manuals__help {
  margin: 0 0 16px;
}

.allevet-manuals__help a,
.allevet-manual__footer a,
.allevet-manual__content a:not(.manual-zoom) {
  color: #16764d;
  text-decoration: underline;
  text-underline-offset: .16em;
}

/* ---------- Single manual ---------- */

.allevet-manual {
  max-width: 1240px;
  margin: 0 auto;
}

.allevet-manual__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}

.allevet-manual__back,
.allevet-manual__print {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid #c5d9ce;
  border-radius: 999px;
  background: #fff;
  color: #147248;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.allevet-manual__back:hover,
.allevet-manual__print:hover {
  border-color: #147248;
  background: #f5faf7;
  color: #147248;
  text-decoration: none;
}

.allevet-manual__back .material-icons,
.allevet-manual__print .material-icons {
  font-size: 18px;
}

.allevet-manual__meta {
  margin: 0 0 24px;
  color: #5b6b63;
  font-size: 14px;
}

.allevet-manual__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}

.allevet-manual__toc {
  border: 1px solid #d6e6dd;
  border-radius: 14px;
  background: #f5faf7;
  font-size: 14px;
  line-height: 1.45;
}

.allevet-manual__toc summary {
  padding: 14px 18px;
  color: #1f3029;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.allevet-manual__toc ol {
  margin: 0;
  padding: 0 18px 16px;
  list-style: none;
}

.allevet-manual__toc ol ol {
  margin: 4px 0 6px;
  padding: 0 0 0 12px;
  border-left: 2px solid #d6e6dd;
  font-size: 13px;
}

.allevet-manual__toc li {
  margin: 0 0 6px;
}

.allevet-manual__toc a {
  color: #30413a;
  text-decoration: none;
}

.allevet-manual__toc a:hover {
  color: #147248;
  text-decoration: underline;
}

.allevet-manual__content {
  min-width: 0;
  max-width: 880px;
}

@media (min-width: 992px) {
  .allevet-manual__layout {
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 48px;
    align-items: start;
  }

  .allevet-manual__toc {
    position: sticky;
    top: 110px;
    max-height: calc(100vh - 130px);
    overflow-y: auto;
  }
}

.allevet-manual__content h2,
.allevet-manual__content h3,
.allevet-manual__content h4 {
  color: #1f3029;
  line-height: 1.3;
  scroll-margin-top: 120px;
}

.allevet-manual__content h2 {
  margin: 2.6rem 0 1rem;
  padding-top: 1.4rem;
  border-top: 1px solid #d6e6dd;
  font-size: clamp(1.35rem, 1.9vw, 1.7rem);
}

.allevet-manual__content > h2:first-child,
.allevet-manual__content > .manual-lead + h2 {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.allevet-manual__content h3 {
  margin: 2rem 0 .8rem;
  font-size: clamp(1.12rem, 1.4vw, 1.28rem);
}

.allevet-manual__content h4 {
  margin: 1.5rem 0 .6rem;
  font-size: 1.05rem;
}

.allevet-manual__content p {
  margin: 0 0 .9rem;
}

.allevet-manual__content ul,
.allevet-manual__content ol {
  margin: 0 0 1.2rem;
  padding-left: 1.6rem;
}

.allevet-manual__content ul {
  list-style: disc;
}

.allevet-manual__content ol {
  list-style: decimal;
}

.allevet-manual__content ol[type="a"] {
  list-style: lower-alpha;
}

.allevet-manual__content li {
  margin-bottom: .45rem;
}

.allevet-manual__content li > ul,
.allevet-manual__content li > ol {
  margin: .45rem 0 0;
}

.allevet-manual__content .manual-lead {
  margin-bottom: 1.6rem;
  color: #1f3029;
  font-size: 18px;
  line-height: 1.6;
}

.allevet-manual__content ol.manual-steps {
  padding-left: 0;
  list-style: none;
  counter-reset: manual-step;
}

.allevet-manual__content ol.manual-steps > li {
  position: relative;
  min-height: 30px;
  margin-bottom: .8rem;
  padding-left: 44px;
  counter-increment: manual-step;
}

.allevet-manual__content ol.manual-steps > li::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #147248;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 30px;
  text-align: center;
  content: counter(manual-step);
}

/* Notes and warnings */

.allevet-manual__content .manual-note {
  margin: 1.2rem 0 1.4rem;
  padding: 14px 18px;
  border: 1px solid #d6e6dd;
  border-left: 5px solid #147248;
  border-radius: 10px;
  background: #f5faf7;
}

.allevet-manual__content .manual-note > :last-child {
  margin-bottom: 0;
}

.allevet-manual__content .manual-note--caution {
  border-color: #f0dfb4;
  border-left-color: #c98a00;
  background: #fffaf0;
}

.allevet-manual__content .manual-note--warning {
  border-color: #f3d2b8;
  border-left-color: #d9660a;
  background: #fff6ee;
}

.allevet-manual__content .manual-note--danger {
  border-color: #f1c4c4;
  border-left-color: #c62828;
  background: #fff3f3;
}

/* Tables */

.allevet-manual__content .manual-table-wrap {
  margin: 1.2rem 0 1.6rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.allevet-manual__content table.manual-table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.5;
}

.allevet-manual__content table.manual-table th,
.allevet-manual__content table.manual-table td {
  padding: 9px 12px;
  border: 1px solid #d6e6dd;
  text-align: left;
  vertical-align: top;
}

.allevet-manual__content table.manual-table thead th {
  background: #eaf4ee;
  color: #1f3029;
  font-weight: 700;
}

.allevet-manual__content table.manual-table tbody th {
  background: #f5faf7;
  font-weight: 700;
}

.allevet-manual__content table.manual-table td p:last-child,
.allevet-manual__content table.manual-table td ul:last-child,
.allevet-manual__content table.manual-table td ol:last-child {
  margin-bottom: 0;
}

.allevet-manual__content table.manual-table img {
  max-width: 180px;
  max-height: 160px;
}

/* Figures */

.allevet-manual__content figure {
  margin: 1.4rem 0 1.6rem;
  text-align: center;
}

.allevet-manual__content .manual-zoom {
  display: inline-block;
  max-width: 100%;
}

.allevet-manual__content img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 620px;
  border-radius: 6px;
}

.allevet-manual__content figcaption {
  margin-top: 8px;
  color: #5b6b63;
  font-size: 14px;
  line-height: 1.45;
}

.allevet-manual__content .manual-figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  align-items: end;
  margin: 1.4rem 0 1.6rem;
}

.allevet-manual__content .manual-figures figure {
  margin: 0;
}

.allevet-manual__content .manual-figures img {
  max-height: 360px;
}

.allevet-manual__content ul.manual-legend {
  margin: -0.4rem 0 1.6rem;
  padding: 14px 18px;
  border: 1px solid #d6e6dd;
  border-radius: 10px;
  background: #fbfdfc;
  font-size: 15px;
  list-style: none;
  columns: 2 260px;
  column-gap: 28px;
}

.allevet-manual__content ul.manual-legend li {
  break-inside: avoid;
}

.allevet-manual__footer {
  margin-top: 3rem;
  padding: 18px 20px;
  border: 1px solid #d6e6dd;
  border-radius: 12px;
  background: #f5faf7;
  color: #5b6b63;
  font-size: 14px;
  line-height: 1.6;
}

.allevet-manual__footer p {
  margin: 0 0 .5rem;
}

.allevet-manual__footer p:last-child {
  margin-bottom: 0;
}

@media (max-width: 767px) {
  .page-cms-9 {
    font-size: 15px;
    line-height: 1.65;
  }

  .allevet-manuals__list {
    grid-template-columns: minmax(0, 1fr);
  }

  .allevet-manual__content table.manual-table {
    font-size: 14px;
  }

  .allevet-manual__content table.manual-table th,
  .allevet-manual__content table.manual-table td {
    padding: 7px 9px;
  }
}

/* Printing a manual: only the manual itself, on white. */

@media print {
  body.cms-id-9 #header,
  body.cms-id-9 #footer,
  body.cms-id-9 #breadcrumb_wrapper,
  body.cms-id-9 #notifications,
  body.cms-id-9 .allevet-manual__bar,
  body.cms-id-9 .allevet-manual__toc,
  body.cms-id-9 .allevet-manual__footer p:last-child {
    display: none !important;
  }

  body.cms-id-9 .allevet-manual__layout {
    display: block;
  }

  body.cms-id-9 .allevet-manual__content {
    max-width: none;
    font-size: 11pt;
  }

  body.cms-id-9 .allevet-manual__content h2,
  body.cms-id-9 .allevet-manual__content h3,
  body.cms-id-9 .allevet-manual__content h4 {
    break-after: avoid;
  }

  body.cms-id-9 .allevet-manual__content figure,
  body.cms-id-9 .allevet-manual__content .manual-note,
  body.cms-id-9 .allevet-manual__content tr {
    break-inside: avoid;
  }

  body.cms-id-9 .allevet-manual__content img {
    max-height: 420px;
  }
}
