.blobs {
  .blob {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    grid-template-areas:
      "tag created-at sha none"
      "rollback rollback rollback rollback";

    gap: 10px;

    border-radius: var(--radius);
    box-shadow: var(--shadow);

    padding: 10px;
    margin: 10px 0;

    background-color: var(--color-bg);

    .tag {
      grid-area: tag;

      font-weight: bold;
    }

    .created_at {
      grid-area: created-at;
    }

    .sha {
      grid-area: sha;
    }

    .rollback {
      grid-area: rollback;

      padding: 10px;

      background-color: var(--color-bg-alt);
      border-radius: var(--radius);
      box-shadow: var(--shadow);

      font-size: small;
    }
  }
}
.Home {
  .projects {
    display: flex;
    flex-direction: row;
    gap: 20px;

    .project {
      display: grid;

      grid-template-columns: 30px 5fr;
      padding: 5px;
      gap: 5px;

      width: 30%;

      box-shadow: var(--shadow);

      a:first-child {
        text-decoration: none;
        text-align: center;

        font-weight: bold;
      }
    }
  }
}
.wrap.Payments {
  table {
    width: 100%;

    text-align: center;
  }
}
.wrap.PersonalAccessTokens {
  .token {
    display: grid;

    grid-template-columns: 3fr 1fr;

    gap: 10px;

    margin: 10px;
    padding: 5px;
  }

  .token:nth-of-type(odd) {
    background-color: var(--color-bg);
  }
}

.wrap.PersonalAccessToken--Form {
  .wrap-granular-permissions.disabled {
    opacity: .5;

    .disabled-note {
      display: block;
      font-weight: bold;
    }
  }

  .wrap-granular-permissions {
    .disabled-note {
      display: none;
    }
  }

  .granular-permissions {
    display: grid;
    grid-template-columns: 1fr 120px 120px;
    border: 1px solid #ddd;

    overflow: hidden;

    margin-bottom: 10px;
  }

  .granular-permissions > div {
    display: contents;
  }

  .granular-permissions > div > div {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    border-right: 1px solid #eee;
    display: flex;
  }

  .granular-permissions > div > div:last-child {
    border-right: none;
  }

  .granular-permissions > div:first-child > div {
    font-weight: bold;
    background: #f9f9f9;
    border-bottom: 2px solid #ccc;
  }
}
.ProjectRepositories {
  .repository-selection {
    list-style: none;

    li {
      display: inline-block;

      border: 3px solid var(--color-bg);
      box-shadow: var(--shadow);
      padding: 4px;
      height: 35px;

      background-color: var(--color-bg-interactable);
    }

    form {
      display: inline;

      select {
        width: auto;
      }

      input {
        font-weight: bold;
      }

      button, input {
        width: auto;

        border: none;
        border-left: 3px solid var(--color-bg);

        cursor: pointer;

        background-color: var(--color-bg-interactable);
      }
    }
  }
}
.wrap.Projects {
  .projects {
    display: flex;
    flex-direction: row;
    gap: 20px;

    .project {
      display: grid;

      grid-template-columns: 1fr 5fr;
      padding: 5px;
      gap: 5px;

      width: 200px;
      height: 50px;

      box-shadow: var(--shadow);

      a:first-child {
        text-decoration: none;
        text-align: center;
      }
    }
  }
}

.wrap.Project {
  .payment {
    border: 3px solid var(--color-bg);
    box-shadow: var(--shadow);
    padding: 20px;

    margin: 0 auto;

    width: 60%;

    text-align: center;

    font-size: 18px;
  }

  .side {
    .license-button {
      text-decoration: underline;
      cursor: pointer;
    }
  }

  .repositories {
    display: flex;
    flex-direction: row;
    gap: 20px;

    .repository {
      padding: 5px;

      width: 200px;

      box-shadow: var(--shadow);

      .name {
        font-weight: bold;
      }

      .tag {
        margin-left: 25px;
        font-size: small;
      }
    }
  }
}
.wrap.Repositories {
  .repositories {
    display: flex;
    flex-direction: row;
    gap: 20px;

    .repository {
      display: grid;

      grid-template-columns: 1fr 5fr;
      padding: 5px;
      gap: 5px;

      width: 200px;
      height: 50px;

      box-shadow: var(--shadow);

      a:first-child {
        text-decoration: none;
        text-align: center;
      }
    }
  }
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

:root {
  --color-bg: #dfeaf4;
  --color-bg-alt: #ffffff;
  --color-bg-interactable: #f5faff;

  --color-text: #1f2937;
  --color-text-light: #6b7280;

  --color-primary: #2563eb;
  --color-primary-dark: #1e40af;

  --color-text-warn: #950e40;
  --color-text-great-news: #117360;

  --radius: 0.75rem;
  --shadow: 0 2px 8px rgba(0,0,0,0.05);
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--color-bg-alt);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 10;

  .logo {
    font-size: 1.5rem;
    font-weight: 700;
  }

  nav a, form.link {
    margin-left: 1.5rem;
    text-decoration: none;
    color: var(--color-text);
    font-weight: 500;
  }

  nav a:hover {
    color: var(--color-primary);
  }
}


footer {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--color-bg-alt);
  border-top: 1px solid #e5e7eb;
  color: var(--color-text-light);
  font-size: 0.875rem;
  margin-top: 1rem;
}

form.link {
  display: inline-block;

  button {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
  }

  button:hover {
    color: var(--color-primary)
  }
}

.btn-primary {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  border-top: 1px solid var(--color-bg-alt);
  color: #fff;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s ease;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
}

body .wrap {
  margin: 2rem auto;
  max-width: 72rem;
  padding: 2rem;

  background-color: var(--color-bg-alt);
}

pre {
  background: #111827;
  color: #f3f4f6;
  padding: 1rem;
  border-radius: var(--radius);
  overflow-x: auto;
}

.global {
  &.alert,
  &.notice,
  &.success {
    text-align: center;
    padding: 1.5rem;
    background: var(--color-bg-alt);
    border-top: 1px solid var(--color-bg-alt);
    color: var(--color-text);
    margin-top: 1rem;
  }

  &.alert {
    color: var(--color-text-warn);
  }

  &.notice {
    color: var(--color-text-great-news);
  }
}

.breadcrumbs {
  width: 80%;
  margin: 0 auto;

  padding: 10px;

  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-bg-alt);
  box-shadow: var(--shadow);

  color: var(--color-text);
  font-size: small;

  a {
    color: var(--color-text);
  }

  ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  ul li {
    display: inline;
  }

  ul li+li:before {
    content: " → ";
    padding: 0 5px;
  }
}

form {
  label {
    font-weight: bold;
  }

  input, button, textarea, select {
    font-family: system-ui, -apple-system, sans-serif;
    color: var(--color-text);
    line-height: 1.6;
    padding: 5px;
    font-size: inherit;
    margin-bottom: 10px;

    width: 100%;
  }

  textarea {
    resize: vertical;
  }

  textarea.short {
    height: 100px;
  }

  textarea.medium {
    height: 200px;
  }

  textarea.long {
    height: 500px;
  }

  input[type=checkbox] {
    width: auto;
  }

  .main button, input[type=submit] {
    width: calc(100% + 14px);
  }

  .note {
    font-size: small;
  }

  .prepended-input {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: center;

    margin-bottom: 10px;

    select {
      text-align: center;
      margin-bottom: 0;
    }

    input {
      margin-bottom: 0;
    }
  }
}

.form-full-errors {
  color: var(--color-text-warn);

  border-left: 3px solid var(--color-text-warn);
  padding: 10px;
  box-shadow: var(--shadow);

  margin: 10px 0;

  p {
    font-weight: bold;
  }
}

.labelled-checkbox {
  display: inline-grid;
  grid-template-columns: 100px 1fr 100px;
  grid-template-areas: "off checkbox on";
  align-items: baseline;

  gap: 10px;

  margin: 10px;

  border: 2px solid var(--color-bg);

  text-align: center;

  &:has(input:checked) {
    background-color: var(--color-bg);
  }

  .off {
    grid-area: off;
    font-weight: bold;
    padding: 4px;
  }

  input[type=checkbox] {
    grid-area: checkbox;
    width: 21px;
  }

  .on {
    grid-area: on;
    background-color: var(--color-bg);
    padding: 4px;
    color: color-mix(in srgb, var(--color-bg), white 30%);
  }

  input:checked ~ .off {
    font-weight: initial;

    background-color: white;
    color: color-mix(in srgb, var(--color-bg), white 30%);
  }

  input:checked ~ .on {
    font-weight: bold;

    background-color: var(--color-bg);
    color: black;
  }
}

.wrap:has(>.main):has(>.side) {
  display: grid;

  grid-template-columns: 5fr 1fr;
  gap: 30px;

  .main {
    border-right: 3px solid var(--color-bg);
    padding-right: 30px;
  }

  .side {
    font-size: small;
  }
}

.wrap.wide-side:has(>.main):has(>.side) {
  grid-template-columns: 5fr 2fr;
}

.fyi {
  border-left: 3px solid var(--color-text-great-news);
  padding: 10px;
  box-shadow: var(--shadow);
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  margin: 2rem 0;
  font-size: 0.95rem;
}

.pagination .page,
.pagination .next,
.pagination .last {
  display: inline-block;
}

.pagination a {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  text-decoration: none;
  background-color: var(--color-bg, #f2f2f2);
  color: var(--color-text, #333);
  transition: background-color 0.2s, color 0.2s;
}

.pagination a:hover {
  background-color: var(--color-accent, #007bff);
  color: white;
}

.pagination .current {
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-weight: bold;
  background-color: var(--color-accent, #007bff);
  color: white;
}
