/*
* 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.
*
*= require_self
*/

:root {
  --default-font:
    Inter var, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue,
    Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
  --brightloop-font: Montserrat, sans-serif;
}

.fa {
  display: inline-block;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@view-transition {
  navigation: auto;
}

body {
  margin: 0;
  display: grid;

  grid-template-areas:
    "header header"
    "nav    main";
  grid-template-rows: 1rem 1fr;
  grid-template-columns: 12rem auto;
  gap: 1vh 3%;

  background: var(--bg-neutral-50);
  font-family: var(--default-font);
}

header {
  grid-area: header;
}

#main_nav {
  grid-area: nav;
}

main {
  grid-area: main;
  position: relative;
  margin-top: 5px;
  padding-bottom: 2rem;
}

bl-contents {
  margin-top: 1.4rem;
}

.masquerade {
  margin-top: 0;
  background: white;
  color: red;
  font-weight: bold;
  text-align: center;

  a {
    text-decoration: none;
    border-radius: 5px;
    display: inline-block;
    padding: 0.5rem;
    border: 1px solid gray;
    color: white;
    background: var(--color-green);
  }
  a:hover {
    background: green;
  }
}

h1,
h2,
h3,
summary {
  color: var(--color-blue);
}

h1 {
  font-size: 1.5rem;
}

h2 {
  font-size: 1.2rem;
}

h3 {
  margin-right: 1rem;
}

:lang(fr) {
  :is(
    p,
    h1,
    h2,
    nav,
    legend,
    label,
    .label,
    dialog label.boolean,
    .breadcrumbs,
    bl-state-tracker,
    .show .dt,
    caption,
    row.head,
    bl-row.head
  )::first-letter {
    text-transform: capitalize;
  }
}

/* HTML custom elements */
modal-button-wrapper {
  display: block;
}

:lang(en) {
  h1,
  h2,
  nav,
  legend,
  label,
  .label,
  dialog label.boolean,
  .breadcrumbs,
  bl-state-tracker,
  .show dt,
  caption,
  bl-row.head {
    text-transform: capitalize;
  }

  bl-sign-in-out {
    text-transform: initial;
  }
}

h2,
.legend,
summary {
  font-weight: bold;
  padding: 0.5em 0;
}

.legend {
  margin: 0;
}

h3,
summary {
  font-size: 1.2rem;
}

summary {
  margin: 1rem 0 0.5rem;
  cursor: pointer;
}

section {
  margin-top: 2rem;
}

*,
::after,
::before {
  border: 0 solid #e5e7eb;
  box-sizing: border-box;
}

img.logo {
  width: 11rem;
  transform: scale(1.25);
}

a {
  color: inherit;
  text-decoration: inherit;
  cursor: pointer;
}

a:hover {
  text-decoration: underline;
}

a.fa:hover,
a.main-button:hover,
#power_path_preview a:hover {
  text-decoration: none;
}

.action a {
  width: 2rem;

  bl-icon-text {
    visibility: hidden;
  }
}

button,
input[type="submit"] {
  cursor: pointer;
}

.text-and-icon {
  text-wrap: nowrap;
}

.erp-data {
  color: #007000;
}

.erp_connection_error {
  color: red;
}

.show {
  width: max-content;
  padding: 2vh 2vw 1vh 1vw;
  border: 1px solid #ddd;
  text-align: left;
  color: #555;
  max-width: fit-content;

  p {
    margin: 0;
  }

  dl {
    display: grid;
    grid-template-columns: 11em 1fr;
    gap: 0.5vw;

    dt {
      text-align: right;
      font-weight: bold;
      &::first-letter {
        text-transform: capitalize;
      }
    }

    dd {
      margin-left: 0;
    }
  }
}

.uppercase {
  text-transform: uppercase;
}

.justify-content-left {
  justify-content: left;
}

.align-items-center {
  align-items: center;
}

.grid {
  display: grid;
}

.center {
  text-align: center;
}

.left {
  text-align: left;
}

.right {
  text-align: right;
}

.hidden {
  visibility: hidden;
}

.list {
  margin-right: 1rem;

  a {
    padding: 1rem;
  }
}

.fa-check {
  color: var(--check-green);
}

.fa-xmark {
  color: red;
}

.error {
  margin-left: 1em;
  color: red;
}

#power_path-channels {
  display: flex;
}

#assembly_channels {
  padding: 1rem 0;
}

#powered_by {
  margin-right: 1em;
  padding: 0.25rem 1em;
  color: #444;
  background: white;

  p {
    margin: 0.5rem 0;
  }
}

.no_display {
  display: none;
}

.icon {
  display: inline-block;
  width: 25px;
  height: 1em;
  padding: 0 1rem;
  color: #555;
  text-indent: -9999px;
  background-repeat: no-repeat;
  background-position: center center;
}

.to_erp {
  background-image: url("/assets/link-b4d02a51.svg");
}

.broken-link {
  background-image: url("/assets/unlink-eb9f737a.svg");
}

.eye {
  background-image: url("/assets/eye-3e0b6d6f.svg");
}

.cog {
  margin-right: 0.2em;
}

.stat-charts {
  display: flex;

  .stat-chart {
    height: 350px;
    border: 1px solid #ddd;
    margin: 1rem;
    padding: 1rem;
    background: #f0f4f4;
  }
}

.warning {
  &:before {
    display: inline-block;
    content: "";
    background: url("/assets/triangle-exclamation-a0254be9.svg") no-repeat;
    width: 28px;
    height: 20px;
    margin-bottom: -5px;
  }
}

bl-image-and-upload {
  display: flex;

  bl-upload-and-purge {
    margin-left: 1rem;
  }
}

bl-legend-add-link {
  display: flex;
  align-items: baseline;
}

@media (min-width: 1200px) {
  .show {
    dl {
      grid-template-columns: 11em 11em 11em 1fr;
    }
  }
}
