/* Draft only. Load after edur-ui-v3.css. Native consent JS owns visibility.
   Evidence and render acceptance: COOKIE_CARD_NOTES.md. */

/* A. Floating shell; intentionally NO display/visibility override here. */
html body.template-13 .siteCookies {
  position: fixed;
  top: auto;
  right: auto;
  bottom: 21px;
  left: 21px;
  width: calc(100vw - 42px);
  max-width: 536px;
  min-width: 0;
  height: auto;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  background: none;
  border: 0;
  box-shadow: none;
  opacity: 1;
  transform: none;
  transition: none;
  z-index: 100000001;
  color: #2a353d;
  font-size: 14px;
  line-height: 1.45;
}

/* B. The actual card is a DIV, not a form element. */
html body.template-13 .siteCookies > .siteCookies__form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 13px;
  align-items: stretch;
  width: 100%;
  max-width: none;
  min-width: 0;
  min-height: 0;
  max-height: min(420px, calc(100vh - 42px));
  max-height: min(420px, calc(100dvh - 42px));
  margin: 0;
  padding: 21px;
  box-sizing: border-box;
  border: 1px solid #d4dde1;
  border-radius: 8px;
  background: #fff;
  opacity: 1;
  box-shadow: 0 8px 34px rgba(42, 53, 61, .22);
  color: #2a353d;
}

/* C. Flatten the native content wrapper so only the text row can scroll. */
html body.template-13 .siteCookies > .siteCookies__form > .siteCookies__content {
  display: contents;
}

html body.template-13 .siteCookies .siteCookies__text {
  grid-column: 1 / -1;
  grid-row: 1;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  overflow-wrap: anywhere;
  white-space: normal;
  color: #2a353d;
  font-size: 14px;
  line-height: 1.45;
}

html body.template-13 .siteCookies .siteCookies__text p {
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

html body.template-13 .siteCookies .siteCookies__text a {
  color: #2a353d;
  text-decoration: underline;
  text-underline-offset: 2px;
}

html body.template-13 .siteCookies .siteCookies__text a:hover {
  color: #2a8420;
}

/* D. Permanent second row: settings | reject | accept, in native DOM order. */
html body.template-13 .siteCookies .siteCookies__links {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  align-items: stretch;
  position: static;
  width: auto;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 0;
  text-align: center;
}

html body.template-13 .siteCookies .siteCookies__buttonWrap {
  grid-column: 2 / 4;
  grid-row: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  align-items: stretch;
  align-self: stretch;
  width: auto;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 0;
}

/* E. Identical three-way prominence; long labels can wrap rather than clip. */
html body.template-13 .siteCookies :is(.siteCookies__link, .siteCookies__button) {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  height: 100%;
  margin: 0;
  padding: 8px;
  border: 1px solid #2a353d;
  border-radius: 8px;
  background: #fff;
  color: #2a353d;
  opacity: 1;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  text-decoration: none;
  text-transform: none;
  white-space: normal;
  cursor: pointer;
  transition: none;
}

html body.template-13 .siteCookies :is(.siteCookies__link, .siteCookies__button):hover {
  background: #2a353d;
  color: #fff;
  opacity: 1;
}

html body.template-13 .siteCookies :is(.siteCookies__link, .siteCookies__button):focus-visible,
html body.template-13 .siteCookies .siteCookies__text a:focus-visible {
  outline: 2px solid #2a8420;
  outline-offset: 2px;
}

/* F. Match the existing phone breakpoint, including safe-area clearance.
   Plain vh declarations precede dvh; plain offsets precede env(). */
@media (max-width: 767px) {
  html body.template-13 .siteCookies {
    left: 13px;
    bottom: 13px;
    bottom: calc(13px + env(safe-area-inset-bottom, 0px));
    width: calc(100vw - 26px);
    max-width: none;
  }

  html body.template-13 .siteCookies > .siteCookies__form {
    gap: 8px;
    padding: 13px;
    max-height: min(360px, calc(100vh - 26px));
    max-height: min(360px, calc(100vh - 26px - env(safe-area-inset-bottom, 0px)));
    max-height: min(360px, calc(100dvh - 26px - env(safe-area-inset-bottom, 0px)));
  }

  html body.template-13 .siteCookies .siteCookies__buttonWrap {
    gap: 8px;
  }

  /* Claude fix after measured render: phone card was taller (242 px) than the 186 px baseline; match the existing compact 13px/1.3 text and tighter padding. */
  html body.template-13 .siteCookies > .siteCookies__form { padding: 8px 13px; }
  html body.template-13 .siteCookies .siteCookies__text,
  html body.template-13 .siteCookies .siteCookies__text p { font-size: 13px; line-height: 1.3; }
  html body.template-13 .siteCookies :is(.siteCookies__link, .siteCookies__button) { font-size: 13px; line-height: 1.3; padding: 8px 5px; }
}
