/* !HERO */

.wp-block-post-excerpt__excerpt {
  margin-bottom: 0;
}

.wp-block-post-date {
  margin-bottom: 0.5rem !important;
}

/* !BREADCRUMBS */

.breadcrumb a {
  font-weight: normal !important;
  text-underline-offset: 3px;
}

.breadcrumb em {
  font-weight: normal !important;
  font-style: normal !important;
}

.single-guide .breadcrumb a {
  color: var(--guide-colour);
}

.single-guide .breadcrumb a:hover {
  color: var(--theme-palette-color-4);
}

/* !HEADINGS */

.single .wp-block-cover h1 {
  font-size: 5em;
  line-height: 1;
  margin-top: 0 !important;
}

.single .wp-block-post-excerpt {
  font-size: 1.4em;
}

.single-policy h2,
.single-guide h2 {
  font-size: 2.1em;
  position: relative;
}

.single-policy h2 {
  color: var(--theme-palette-color-1);
}

@media screen and (max-width: 1024px) {
  .single .wp-block-cover h1 {
    font-size: 4.2em;
  }

  .single .wp-block-post-excerpt {
    font-size: 1.3em;
  }

  .single-policy h2,
  .single-guide h2 {
    font-size: 1.8em;
  }
}

@media screen and (max-width: 767px) {
  .single .wp-block-cover h1 {
    font-size: 3.4em;
  }

  .single .wp-block-post-excerpt {
    font-size: 1.2em;
  }

  .single-policy h2,
  .single-guide h2 {
    font-size: 1.8em;
  }
}

.single .sidebar h3 {
  font-size: 1.4em;
  margin-top: 1.6em !important;
  margin-bottom: 0.4em !important;
  line-height: 1.1;
}

.sidebar .policy_overview h3 {
  margin-top: 0 !important;
}

.single_questions h2 {
  margin-bottom: 0 !important;
}

.single_questions #reply-title {
  padding-top: 0.5em;
}

/* !CONTENTS */

.single_contents a.active {
  background-color: var(--theme-palette-color-1) !important;
  color: var(--theme-palette-color-8) !important;
  font-weight: 900 !important;
  border-radius: 100px;
  padding: 0.1em 0.3em;
}

.single_contents {
  margin-bottom: 0;
}

.single_contents ol {
  padding-inline-start: 1.6rem;
}

.single_contents li {
  margin-bottom: 0.3rem;
}

.single_contents a {
  border-radius: 0.2em;
  color: var(--theme-palette-color-4) !important;
  display: block;
  line-height: 1.25;
  margin-inline-start: 0.1rem;
  padding: 0.3em 0.8rem;
}

.single_contents a:hover {
  font-weight: 700;
}

.single_contents a.active {
  background-color: var(--theme-palette-color-5) !important;
  color: var(--theme-palette-color-4) !important;
  font-weight: 700 !important;
}

.single_contents a.active::before {
  display: inline-block;
}

.single_contents li:has(> a.active)::marker {
  font-weight: 700 !important;
}

.single_contents a:hover,
.single_contents a.active {
  letter-spacing: -0.006rem;
}

/* Extra sections */

.toc-extra-sections {
  list-style-type: none !important;
  padding-left: 0;
  margin-left: 0;
}

.toc-extra-sections li a {
  margin-inline-start: -0.6em;
}

.toc-extra-sections li svg {
  height: 1.1rem;
  width: 1.1rem;
  margin-inline-end: 0.4rem;
  vertical-align: -13%;
}

.toc-extra-sections-link {
  display: flex;
  align-items: center;
  gap: 6px;
}

.toc-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
  margin-right: 1rem;
}

/* Contents changes for specific policies */

body.postid-3591 ol.simpletoc-list {
  list-style-type: square;
}

body.postid-3591 ol.simpletoc-list ol {
  list-style-type: disc;
}

body.postid-3591 ol.simpletoc-list ol ol {
  list-style-type: circle;
}

/* !POLICY */

.list-letters {
  list-style-type: lower-latin;
}

.dynamic-single-policy-layout > .stk-row {
  display: grid !important;
  grid-template-columns: 1fr !important;
  max-width: 2000px;
  margin: 0 auto;
}

@media (min-width: 770px) and (max-width: 1023px) {
  .dynamic-single-policy-layout > .stk-row {
    grid-template-columns: 1fr 2fr !important;
  }

  .dynamic-single-policy-layout > .stk-row .stk-column:nth-child(1) {
    grid-column: 1 !important;
    grid-row: 1 / 2;
  }

  .dynamic-single-policy-layout > .stk-row .stk-column:nth-child(2) {
    grid-column: 2 !important;
    grid-row: 1 / 4 !important;
  }

  .dynamic-single-policy-layout > .stk-row .stk-column:nth-child(3) {
    grid-column: 1 !important;
    grid-row: 2 / 3 !important;
    overflow-y: scroll;
    position: sticky;
    height: 100%;
  }
}

@media (min-width: 1023px) {
  .dynamic-single-policy-layout > .stk-row {
    grid-template-columns: 1fr 2fr 1fr !important;
  }

  .dynamic-single-policy-layout > .stk-row .stk-column:nth-child(2) {
    grid-column: 2 !important;
  }

  .dynamic-single-policy-layout > .stk-row .stk-column:nth-child(3) {
    grid-column: 3 !important;
  }

  .dynamic-single-policy-layout > .stk-row .stk-column:nth-child(1) {
    position: sticky;
    overflow-y: scroll;
    top: 100px;
  }
}

/* !POLICY ACTIONS */

.policy-actions {
  display: flex;
  gap: 0.6rem;
}

.policy-action {
  border: 2px solid var(--theme-palette-color-5) !important;
  background-color: transparent;
  color: var(--theme-palette-color-4);
  border-radius: 6px;
  padding: 0.15rem 0.6rem;
  transition: all ease 200ms;
  cursor: pointer;
  display: flex;
  gap: 0.35rem;
  justify-content: center;
  align-items: center;
  font-size: 0.9em;
}

.policy-action:hover {
  background-color: var(--theme-palette-color-4);
  color: var(--theme-palette-color-8);
  border-color: var(--theme-palette-color-4) !important;
}

.policy-action-icon {
  width: 1rem;
  height: 1rem;
  fill: var(--theme-palette-color-4);
  cursor: pointer;
  transition: fill ease 200ms;
}

.policy-action:hover .policy-action-icon {
  fill: var(--theme-palette-color-8);
}

@media (max-width: 1240px) {
  .policy-action {
    padding: 0.4em;
    border: 0;
  }

  .policy-action span {
    display: none;
  }
}

/* !INFO SIDEBAR */

.sidebar p {
  margin-bottom: 0.3rem;
}

/* Policy Info */

.sidebar dl {
  display: grid;
  grid-template-columns: 40% auto;
  margin: 0;
  line-height: 1.3;
}

.sidebar dt {
  grid-column: 1;
  font-weight: 700;
  margin: 0.6rem 0 0;
}

.sidebar dd {
  grid-column: 2;
  margin: 0.6rem 0 0;
}

/* Policy Overview */

.sidebar .policy_overview p {
  font-size: 1.2rem;
}

.label {
  background-color: #ffe16a;
  text-transform: lowercase;
}

/* Policy Details */

dd.single_policy_categories {
  padding-left: 21px;
  position: relative;
}

dd.single_policy_categories:before {
  content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M464 96h-192l-64-64h-160C21.5 32 0 53.5 0 80V160h512V144C512 117.5 490.5 96 464 96zM0 432C0 458.5 21.5 480 48 480h416c26.5 0 48-21.5 48-48V192H0V432z'/%3E%3C/svg%3E");
  opacity: 30%;
  display: inline-block;
  position: absolute;
  top: 2px;
  left: 0;
  width: 20px !important;
  height: 20px !important;
  padding-right: 5px;
}

.single_policy_legal_advice,
.single_policy_related {
  grid-column: 1 / span 2 !important;
}

dd.single_policy_legal_advice {
  font-style: italic;
}

/* Organisation Info */

.organisation_info dd a {
  text-decoration: underline;
}

/* !DOWNLOADS */

.single_downloads ul {
  padding-left: 0;
  margin: 0;
}

.single_downloads li {
  list-style: none;
}

.single_downloads li a {
  background: var(--theme-palette-color-5);
  color: var(--theme-palette-color-4);
  display: block;
  margin: 0.5rem 0 0 0;
  padding: 1rem 2rem 1rem 1rem;
  position: relative;
  width: 100%;
}

.single_downloads li a:hover {
  background: var(--theme-palette-color-1);
  color: var(--theme-palette-color-8);
}

.single_downloads li a:after {
  content: url("");
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 1rem;
  width: 20px !important;
  height: 20px !important;
  content: url("data:image/svg+xml,%3Csvg  xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M374.6 310.6l-160 160C208.4 476.9 200.2 480 192 480s-16.38-3.125-22.62-9.375l-160-160c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L160 370.8V64c0-17.69 14.33-31.1 31.1-31.1S224 46.31 224 64v306.8l105.4-105.4c12.5-12.5 32.75-12.5 45.25 0S387.1 298.1 374.6 310.6z'/%3E%3C/svg%3E");
}

/* !LICENCE */

.single_licence li:not(:last-child) {
  margin-bottom: var(--wp--preset--spacing--20);
}

/* !RELATED GUIDES */

.related-guide-container a {
  background: var(--guide-colour);
  border-radius: var(--wp--preset--spacing--20);
  color: var(--theme-palette-color-8);
  padding: calc(var(--wp--preset--spacing--20) + 0.1rem)
    var(--wp--preset--spacing--50) var(--wp--preset--spacing--30);
}

.related-guide-container a:hover {
  background: var(--theme-palette-color-4);
}

.related-guide-container img {
  margin-right: var(--wp--preset--spacing--20);
  width: 1rem;
  height: 1rem;
}

/* Hide empty related guides container */
.single_guides {
  display: none;
}

.single_guides:has(.related-guide-container) {
  display: block;
}

/* !NOTES */

.single-policy .review_text {
  background-color: var(--theme-palette-color-5);
  padding: 1rem;
}

/* !DISCUSSION */

/* See comments.css */

/* !FEEDBACK FORM */

/* See feedback.css */
