$govuk-page-width: 1140px;

@import "govuk_publishing_components/all_components";
@import "user_research_recruitment_banner";

// Components from this application
@import "components/accessible-autocomplete";
@import "components/contact-details";
@import "components/table";

$applications-table-actions-gap: 10px;

// TODO: move into component
.gem-c-success-alert,
.gem-c-error-alert {
  margin: 0 0 30px;
}

.gem-c-success-alert__message,
.gem-c-error-alert__message {
  margin: 0;
}

.app-application-list__item {
  border-top: 1px solid #cccccc;
  padding-top: 20px;
}

.app-dashboard-side {
  border-top: 2px solid #005ea5;
  padding-top: 20px;
}

.govuk-footer__heading {
  display: none;
}

.govuk-input[disabled] {
  background: #dee0e2;
}

.app-button--no-margin {
  margin: 0;
}

.app-link--inline {
  display: inline-block;
  padding: 7px 10px;
}

.app-bottom-separator {
  border-bottom: 1px solid $govuk-border-colour;
}

.govuk-error-message p {
  margin: 0;
}

.govuk-error-summary {
  li {
    color: #b10e1e;
    font-weight: bold;
  }
}

.qr-code-container {
  @include govuk-responsive-margin(3, "bottom");

  svg {
    @include govuk-responsive-margin(2, "left");
    @include govuk-responsive-margin(2, "right");
  }
}

.govuk-table__cell--event-log-date {
  white-space: nowrap;
}

.govuk-table__cell--email {
  white-space: nowrap;
}

.govuk-table__cell--line-through {
  text-decoration: line-through;
}

.users-index-button-group {
  @include govuk-media-query($from: tablet) {
    float: right;
  }
}

.govuk-table__actions {
  @include govuk-media-query($until: $vertical-on-smallscreen-breakpoint) {
    .govuk-button, .govuk-link {
      display: block;

      &:not(:last-child) {
        margin-bottom: $applications-table-actions-gap;
      }
    }
  }

  @include govuk-media-query($from: $vertical-on-smallscreen-breakpoint) {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: $applications-table-actions-gap;
  }
}

$show-button-em-size: 19px;
$show-button-em-multiplier: 5;
$show-button-width: calc($show-button-em-size * $show-button-em-multiplier);
$show-button-left-margin: 5px;
$show-button-space: calc($show-button-width + $show-button-left-margin);

@include govuk-media-query($from: mobile) {
  form[action="/users/sign_in"] .govuk-form-group:has(input[name="user[email]"]) {
    padding-right: $show-button-space;
  }
}

.applications-table__remove_access_link {
  width: auto;
  min-width: 90px;
}

.applications-table__permissions-action-links a {
  display: inline-block;

  &:not(:last-child) {
    margin-right: 1rem;
  }
}
