@import url("https://cdn.jsdelivr.net/npm/bulma@1.0.2/css/bulma.min.css")
layer(framework);

:root {
  --bulma-family-code:
    "CascadiaMono", "Cascadia Mono", "CaskaydiaMono Nerd Font", "IBM Plex Mono",
    monospace;
  --bulma-text-strong: black;
  --bulma-scheme-main-bis-l: 95%;
  --bulma-border-l: 72%;
  --bulma-input-placeholder-color: hsl(221 14% 60%);
  --topbar-height: 53px;
  --pagination-bar-height: 53px;
}

.text-mono {
  font-family: var(--bulma-family-code) !important;
}

.title {
  font-weight: 700;
}

body > main {
  padding: calc(1.25rem + var(--topbar-height)) 1.25rem
    var(--pagination-bar-height);
}

.clickable-table,
.data-table {
  table-layout: fixed;

  tbody tr[data-url] {
    cursor: pointer;
  }
}

tbody b,
.title b {
  background: hsl(from var(--bulma-warning) h s calc(l + 20));
  text-decoration: underline;
  font-weight: inherit;
}

.data-table {
  tbody tr {
    vertical-align: middle;
  }

  th[scope="row"] {
    width: 15rem;
  }

  .copy-button-group {
    display: inline-flex;
    align-items: center;
  }
}

.clickable-table {
  thead th {
    position: relative;
    height: 41px;

    > a {
      position: absolute;
      display: flex;
      align-items: center;
      padding-inline: 12px;
      gap: 0.25em;
      inset: 0;
      color: inherit;
    }

    svg {
      height: 1em;
      fill: currentColor;
    }
  }
}

.table.listings {
  [data-for="allegro_id"],
  [data-for="ean"] {
    width: 10rem;
    text-align: center;
  }

  [data-for="sku"] {
    width: 16rem;
    text-align: center;
  }

  [data-for="allegro_id"],
  [data-for="ean"],
  [data-for="sku"] {
    a {
      text-align: center;
      justify-content: center;
    }

    td& {
      font-family: var(--bulma-family-code);

      b {
        font-weight: normal;
      }
    }
  }
}

.pagination-page-sizes,
.pagination-bar {
  display: flex;
  gap: 0.75em;
  align-items: center;

  .pagination {
    margin-bottom: 0;
  }
}

.pagination-page-sizes {
  margin-left: auto;
}

.pagination-bar {
  position: fixed;
  inset: 0;
  top: unset;
  padding: 0 1.25rem;
  height: var(--pagination-bar-height);
  background: white;
  border-top: 1px solid var(--bulma-border);
  display: flex;
}

@media screen and (max-width: 1149px) {
  .lg-only {
    display: none;
  }

  .pagination-bar {
    justify-content: center;
  }
}

@media screen and (min-width: 1150px) {
  .sm-only {
    display: none;
  }
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.25rem;

  .title {
    margin: 0;
  }
}

.search-form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-left: 0.75rem;
}

@media screen and (max-width: 1024px) {
  .search-form {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
}

.icon.is-small {
  svg {
    height: 1em;
    width: auto;
    fill: currentColor;
  }
}

.copy-button {
  display: inline-flex;
  gap: 0.5em;
  margin: 0 0.75rem;
  padding: 0;
}

.input {
  color: black;
  &::placeholder {
    color: hsl(221 14% 60%);
  }
}

.topbar {
  position: fixed;
  inset: 0;
  bottom: unset;
  height: var(--topbar-height);
  background: white;
  z-index: 10;
  padding-inline: 1.25rem;
  border-bottom: 1px solid var(--bulma-border);
  display: flex;
  justify-content: space-between;

  nav {
    display: flex;
    align-items: center;
  }

  .navbar-item {
    height: calc(var(--topbar-height) - 1px);
    padding-block: 0;
    line-height: var(--topbar-height);
    &:hover {
      background: hsla(0 0% 91%);
    }
  }
}

pre {
  white-space: pre-wrap;
}

.user-section {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.avatar {
  height: 2rem;
  width: 2rem;
  border-radius: 50%;
}

.dimensions {
  header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;

    h3 {
      margin: 0;
    }
  }

  margin-bottom: 2rem;
  ol li {
    line-height: 1.3125rem;
    font-size: 1rem;
  }
}
