/* =========================================================
   GOODSTREAM DATA-SAFETY NOTICES
   Reusable warnings for imports, fields, notes, and files.
========================================================= */

.gs-data-safety-notice {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  width: 100%;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 102, 66, 0.36);
  border-left: 4px solid var(--gs-coral, #ff6642);
  border-radius: 12px;
  background: rgba(255, 102, 66, 0.08);
  color: var(--gs-text, #1c2329);
  line-height: 1.4;
}

.gs-data-safety-notice[data-variant="restricted"] {
  border-color: rgba(180, 83, 9, 0.34);
  border-left-color: #b45309;
  background: rgba(245, 158, 11, 0.10);
}

.gs-data-safety-notice__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--gs-coral, #ff6642);
  color: #ffffff;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

.gs-data-safety-notice[data-variant="restricted"]
  .gs-data-safety-notice__icon {
  background: #b45309;
}

.gs-data-safety-notice__content {
  min-width: 0;
}

.gs-data-safety-notice__title {
  margin: 0 0 3px;
  font-size: 13px;
  font-weight: 900;
  color: inherit;
}

.gs-data-safety-notice__text {
  margin: 0;
  font-size: 12px;
  color: inherit;
  opacity: 0.92;
}

.gs-data-safety-notice details {
  margin-top: 7px;
  font-size: 12px;
}

.gs-data-safety-notice summary {
  width: fit-content;
  color: inherit;
  font-weight: 800;
  cursor: pointer;
}

.gs-data-safety-notice ul {
  margin: 7px 0 0;
  padding-left: 18px;
}

.gs-data-safety-notice li + li {
  margin-top: 3px;
}

.gs-data-safety-notice strong {
  font-weight: 900;
}

/* Notices inserted in compact tab forms should not crowd the content. */
.gs-data-safety-notice[data-compact="true"] {
  margin-bottom: 10px;
  padding: 10px 12px;
}

@media (max-width: 600px) {
  .gs-data-safety-notice {
    grid-template-columns: 28px minmax(0, 1fr);
    padding: 10px 11px;
  }

  .gs-data-safety-notice__icon {
    width: 26px;
    height: 26px;
    font-size: 13px;
  }
}

/* =========================================================
   COLLAPSIBLE PRIVACY NOTICES
========================================================= */

/*
  The original notice used a two-column grid directly on the
  outer element. The collapsible version adds another wrapper,
  so the grid must now live on the expanded wrapper instead.
*/
.gs-data-safety-notice {
  display: block;
  min-width: 0;
}

/* -----------------------------
   Expanded notice
----------------------------- */

.gs-data-safety-notice__expanded {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 10px;

  width: 100%;
  min-width: 0;
}

.gs-data-safety-notice__expanded[hidden],
.gs-data-safety-notice__collapsed[hidden] {
  display: none !important;
}

.gs-data-safety-notice__content {
  min-width: 0;
  width: 100%;
}

.gs-data-safety-notice__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;

  width: 100%;
  min-width: 0;
}

.gs-data-safety-notice__title {
  min-width: 0;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}

.gs-data-safety-notice__text {
  width: 100%;
  min-width: 0;

  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}

/* -----------------------------
   Close button
----------------------------- */

.gs-data-safety-notice__close {
  appearance: none;
  flex: 0 0 30px;

  width: 30px;
  height: 30px;
  padding: 0;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid rgba(28, 35, 41, 0.16);
  border-radius: 999px;

  background: rgba(255, 255, 255, 0.78);
  color: var(--gs-charcoal, #1c2329);

  font-size: 20px;
  font-weight: 900;
  line-height: 1;

  cursor: pointer;
}

.gs-data-safety-notice__close:hover {
  background: rgba(255, 102, 66, 0.14);
  border-color: rgba(255, 102, 66, 0.45);
}

.gs-data-safety-notice__close:focus-visible,
.gs-data-safety-notice__restore:focus-visible {
  outline: 3px solid rgba(255, 102, 66, 0.28);
  outline-offset: 2px;
}

/* -----------------------------
   Collapsed notice
----------------------------- */

.gs-data-safety-notice__collapsed {
  width: fit-content;
}

/*
  Only show a round orange exclamation button.
*/
.gs-data-safety-notice__restore {
  appearance: none;

  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid rgba(255, 102, 66, 0.55);
  border-radius: 999px;

  background: var(--gs-coral, #ff6642);
  color: #ffffff;

  cursor: pointer;

  box-shadow: 0 4px 10px rgba(28, 35, 41, 0.12);
}

.gs-data-safety-notice__restore:hover {
  background: #e95836;
  border-color: #e95836;
  transform: translateY(-1px);
}

/*
  The first span contains the exclamation point.
*/
.gs-data-safety-notice__restore > span:first-child {
  width: auto;
  height: auto;

  display: inline;
  background: transparent;
  color: inherit;

  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

/*
  Keep "Data safety notice" available to screen readers,
  but do not show it visually.
*/
.gs-data-safety-notice__restore > span:nth-child(2) {
  position: absolute;

  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;

  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);

  white-space: nowrap;
  border: 0;
}

/*
  Remove the large notice container styling while collapsed.
*/
.gs-data-safety-notice[data-collapsed="true"] {
  width: fit-content;
  min-width: 0;

  margin-bottom: 10px;
  padding: 0;

  border: 0;
  background: transparent;
  box-shadow: none;
}

/* -----------------------------
   Mobile sizing
----------------------------- */

@media (max-width: 600px) {
  .gs-data-safety-notice__expanded {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 9px;
  }

  .gs-data-safety-notice__restore {
    width: 34px;
    height: 34px;
    min-width: 34px;
  }

  .gs-data-safety-notice__restore > span:first-child {
    font-size: 18px;
  }
}