@import url("./modal.css");

/* Header logotype */
.govuk-header__logo {
  display: flex;
  align-items: center;
}

.govuk-header__link--homepage {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.govuk-header__logotype-crown {
  height: 32px;
  width: auto;
  vertical-align: middle;
  flex-shrink: 0;
}

.govuk-header__logotype-text {
  font-family: "GDS Transport", arial, sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.govuk-header__link--homepage:hover .govuk-header__logotype-text {
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 0.1em;
}

.govuk-header__link--homepage:focus {
  outline: 3px solid #fd0;
  outline-offset: 0;
  background-color: #fd0;
  box-shadow: 0 2px 0 #0b0c0c;
}

.govuk-header__link--homepage:focus .govuk-header__logotype-text {
  color: #0b0c0c;
}

.govuk-header__content .govuk-header__link.has-auth svg {
  display: none;
}

@media (max-width: 500px) {
  .govuk-header__content .govuk-header__link.no-auth span {
    display: none;
  }
}
@media (max-width: 700px) {
  .govuk-header__content .govuk-header__link.has-auth svg {
    display: block;
  }
  .govuk-header__content .govuk-header__link.has-auth span {
    display: none;
  }
}

@media (max-width: 48em) {
  .govuk-header__logotype-text {
    font-size: 19px;
  }
}

/* Header navigation */
.govuk-header__container {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
}

.govuk-header__content {
  margin-left: auto;
  align-self: stretch;
  display: flex;
  align-items: stretch;
  gap: 4px;
}

.govuk-header__content > nav {
  display: flex;
  align-items: stretch;
}

.govuk-header__navigation-list {
  display: flex;
  align-items: stretch;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 4px;
}

.govuk-header__navigation-item .govuk-header__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  font-family: "GDS Transport", arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
}

.govuk-header__navigation-item--login .govuk-header__link {
  padding-top: 0;
  padding-bottom: 0;
  height: 100%;
}

.govuk-header__navigation-item--login .govuk-header__link svg {
  flex-shrink: 0;
}

.govuk-header__navigation-item .govuk-header__link:hover {
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 0.1em;
}

.govuk-header__navigation-item .govuk-header__link:focus {
  outline: 3px solid #fd0;
  outline-offset: 0;
  color: #0b0c0c;
  background-color: #fd0;
  box-shadow: 0 2px 0 #0b0c0c;
  text-decoration: none;
}

/* Header dropdown menu */
.ghs-header__menu-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0 16px;
  height: 100%;
  align-self: stretch;
  background: transparent;
  border: 0;
  color: #ffffff;
  font-family: "GDS Transport", arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.ghs-header__menu-button::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  order: -1;
}

.ghs-header__menu-button:hover {
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 0.1em;
}

.ghs-header__menu-button:focus-visible {
  outline: 3px solid #fd0;
  outline-offset: 0;
  color: #0b0c0c;
  background-color: #fd0;
  box-shadow: 0 2px 0 #0b0c0c;
  text-decoration: none;
}

.ghs-header__menu-button--open::before {
  transform: translateY(2px) rotate(225deg);
}

.ghs-header__menu-button--open,
.ghs-header__menu-button--open:hover {
  background-color: #f3f2f1;
  color: #1d70b8;
  text-decoration: none;
}

.ghs-header__nav {
  background-color: #f3f2f1;
  padding: 40px 0 50px;
}

.ghs-header__nav-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.ghs-header__nav-heading {
  font-family: "GDS Transport", arial, sans-serif;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 700;
  color: #0b0c0c;
  margin: 0 0 10px;
  padding-top: 10px;
  border-top: 4px solid #1d70b8;
}

.ghs-header__nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ghs-header__nav-list li {
  margin: 0;
  border-top: 1px solid #b1b4b6;
}

.ghs-header__nav-list li:first-child {
  border-top: 0;
}

.ghs-header__nav-list a {
  position: relative;
  display: block;
  padding: 14px 32px 14px 0;
  font-family: "GDS Transport", arial, sans-serif;
  font-size: 19px;
  line-height: 1.3;
  font-weight: 700;
  color: #1d70b8;
  text-decoration: none;
}

.ghs-header__nav-list a::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

.ghs-header__nav-list a:visited {
  color: #4c2c92;
}

.ghs-header__nav-list a:hover {
  color: #003078;
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 0.1em;
}

.ghs-header__nav-list a:focus {
  outline: 3px solid #fd0;
  outline-offset: 0;
  color: #0b0c0c;
  background-color: #fd0;
  box-shadow: 0 2px 0 #0b0c0c;
  text-decoration: none;
}

.ghs-header__nav-account {
  display: none;
}

.ghs-header__nav-account a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background-color: #ffffff;
  border-left: 5px solid #1d70b8;
  font-family: "GDS Transport", arial, sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #1d70b8;
  text-decoration: none;
  box-shadow: 0 2px 0 #b1b4b6;
}

.ghs-header__nav-account a:hover {
  color: #003078;
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 0.1em;
}

.ghs-header__nav-account a:focus {
  outline: 3px solid #fd0;
  outline-offset: 0;
  color: #0b0c0c;
  background-color: #fd0;
  box-shadow: 0 2px 0 #0b0c0c;
  text-decoration: none;
}

.ghs-header__nav-account a svg {
  flex-shrink: 0;
  width: 24px;
  height: 36px;
}

@media (max-width: 40em) {
  .ghs-header__nav-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .ghs-header__menu-button {
    padding: 10px 12px;
  }

  .ghs-header__nav-account {
    display: block;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #b1b4b6;
  }

  .govuk-header__navigation-item--login {
    display: none;
  }
}

@media (max-width: 450px) {
  .ghs-header__menu-button-text {
    display: none;
  }

  .ghs-header__menu-button {
    padding: 10px 22px;
  }
}



/* Related content sidebar */
.app-related-items {
  border-top: 2px solid #1d70b8;
  padding-top: 10px;
}

.app-related-items nav ul {
  margin-bottom: 0;
}

.app-related-items nav ul li {
  margin-bottom: 10px;
}

.unstyled-button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

/* Service cards */
.gem-c-cards__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
  }

  .gem-c-cards__list-item {
    border-top: 1px solid #b1b4b6;
    padding: 15px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    cursor: pointer;
  }

  .gem-c-cards__list-item:hover .gem-c-cards__link {
    text-decoration: underline;
  }

  .gem-c-cards__list-item::after {
    content: "";
    display: block;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-left: 15px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23505a5f' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18l6-6-6-6'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
  }

  .gem-c-cards__list-item:first-child {
    border-top: none;
    padding-top: 0;
  }

  .gem-c-cards__sub-heading {
    margin-bottom: 5px;
  }

  .gem-c-cards__link {
    text-decoration: none;
  }

  .gem-c-cards__link::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
  }

  .gem-c-cards__description {
    color: #505a5f;
    margin-bottom: 0;
  }

/* MoJ-style card */
.moj-card {
  position: relative;
  padding: 20px;
  border: 1px solid #b1b4b6;
  border-bottom-width: 5px;
  background: #ffffff;
  height: 100%;
  box-sizing: border-box;
}

.moj-card__heading {
  margin-top: 0;
  margin-bottom: 10px;
}

.moj-card__description {
  color: #505a5f;
  margin-bottom: 0;
}

.moj-card--clickable:hover {
  background: #f3f2f1;
  cursor: pointer;
}

.moj-card--clickable:focus-within {
  outline: 3px solid #fd0;
  outline-offset: 0;
}

.moj-card__main-link {
  text-decoration: underline;
}

.moj-card--clickable .moj-card__main-link::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.moj-card--clickable:hover .moj-card__main-link {
  text-decoration: underline;
}

.moj-card__main-link:focus {
  outline: none;
  background: transparent;
  box-shadow: none;
}

.moj-card-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 0 0 30px;
}

.moj-card-group__item {
  margin: 0;
}

/* Page header actions */
.page-header-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.page-header-actions__heading > :last-child {
  margin-bottom: 0;
}

.page-header-actions__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 5px;
}

.page-header-actions__actions .govuk-button {
  margin-bottom: 0;
}

@media (max-width: 40em) {
  .page-header-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Datatable */
.datatable__search {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.datatable__search-field {
  flex: 1 1 280px;
  min-width: 0;
}

.datatable__search-field .govuk-input {
  margin-bottom: 0;
}

.datatable__search-submit.govuk-button {
  margin-bottom: 2px;
  flex-shrink: 0;
}

.datatable__search-clear {
  flex-shrink: 0;
  align-self: center;
  white-space: nowrap;
}

.datatable__scroll {
  overflow-x: auto;
  margin-bottom: 20px;
  -webkit-overflow-scrolling: touch;
}

.datatable__table {
  margin-bottom: 0;
  min-width: 100%;
}

.datatable__table .govuk-table__header,
.datatable__table .govuk-table__cell {
  vertical-align: middle;
  white-space: nowrap;
}

.datatable__table .govuk-table__row:hover .govuk-table__cell {
  background-color: #f3f2f1;
}

.datatable__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 20px;
}

.datatable__count {
  color: #505a5f;
}

.datatable__pagination {
  margin: 0;
}

.datatable__tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}

.datatable__tags .govuk-tag {
  margin: 0;
}

@media (max-width: 40em) {
  .datatable__search {
    flex-direction: column;
    align-items: stretch;
  }
  .datatable__search-field {
    flex: 0 0 auto;
  }
  .datatable__search-clear {
    padding-bottom: 0;
    text-align: center;
  }
  .datatable__footer {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .datatable__pagination {
    align-items: center;
    width: 100%;
  }
  .datatable__pagination .govuk-pagination__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0;
  }

  .datatable__scroll {
    overflow-x: visible;
  }
  .datatable__table {
    border-collapse: collapse;
  }
  .datatable__table thead {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    white-space: nowrap;
  }
  .datatable__table .govuk-table__row {
    display: block;
    margin-bottom: 15px;
    border: 1px solid #b1b4b6;
    padding: 10px;
    background: #fff;
  }
  .datatable__table .govuk-table__cell {
    display: block;
    white-space: normal;
    padding: 8px 0;
    border-bottom: 1px solid #f3f2f1;
    text-align: left;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .datatable__table .govuk-table__cell:last-child {
    border-bottom: 0;
  }
  .datatable__table .govuk-table__cell::before {
    content: attr(data-label);
    display: block;
    font-weight: 700;
    font-size: 0.875rem;
    color: #505a5f;
    margin-bottom: 2px;
  }
  .datatable__table .govuk-table__row:hover .govuk-table__cell {
    background-color: transparent;
  }
  .datatable__tags {
    justify-content: flex-start;
  }
}

/* Userbadge */
a.userbadge {

}
a.userbadge img {
  width: 88px;
  height: 31px;
  object-fit: contain;
}

.userbadge-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 31px;
  border: 1px dashed #b1b4b6;
  background: #f3f2f1;
  color: #505a5f;
  font-family: "GDS Transport", arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-sizing: border-box;
  user-select: none;
}

/* Attendees list */
.ghs-attendees {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  border-top: 1px solid #b1b4b6;
}

.ghs-attendees__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "badge main status";
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #b1b4b6;
}

.ghs-attendees__badge {
  grid-area: badge;
  width: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ghs-attendees__badge img {
  width: 88px;
  height: 31px;
  object-fit: contain;
}

.ghs-attendees__main {
  grid-area: main;
  min-width: 0;
}

.ghs-attendees__name-wrap {
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.ghs-attendees__meta {
  margin: 4px 0 0;
  color: #505a5f;
}

.ghs-attendees__notes {
  margin: 4px 0 0;
  padding-left: 10px;
  border-left: 3px solid #b1b4b6;
  color: #505a5f;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ghs-attendees__item--declined > :not(.ghs-attendees__status) {
  opacity: 0.55;
}

.ghs-attendees__item--declined .ghs-attendees__name {
  text-decoration: line-through;
}

.ghs-attendees__status {
  grid-area: status;
  justify-self: end;
}

.ghs-attendees__status .govuk-tag {
  margin: 0;
}

@media (max-width: 40em) {
  .ghs-attendees__item {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "badge status"
      "main  main";
    gap: 8px 12px;
  }
}
