/* Customization
https://github.com/picocss/pico/blob/master/css/themes/default.css
----------------------------------------------------------------------------- */
:root {
  --spacing: 0.8rem;
  --grid-spacing-horizontal: calc(var(--spacing) * 2);

}
@media (min-width: 576px) {
  :root {
    --font-size: 16px;
  }
}
@media (min-width: 768px) {
  :root {
    --font-size: 16px;
  }
}
@media (min-width: 992px) {
  :root {
    --font-size: 16px;
  }
}
@media (min-width: 1200px) {
  :root {
    --font-size: 16px;
  }
}

.container-fluid {
  max-width: 2048px;
}

/* General
----------------------------------------------------------------------------- */
a.active {
  color: #bbc6ce;
}

/* Utils
----------------------------------------------------------------------------- */

.no-margin {
  margin: 0;
}

.danger {
  color: var(--del-color);
}

.success {
  color: var(--ins-color)
}

.text-secondary {
  color: var(--secondary);
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

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

.flex-center {
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  justify-content: center;
}

.grid-1-2 {
  display: block
}

@media (min-width: 992px) {
  .grid-2x-1x {
    grid-template-columns: 2fr 1fr;
  }

  .grid-1-2-3 {
    grid-template-columns: repeat(2, minmax(0%, 1fr));
  }
}

@media (min-width: 1200px) {
  .grid-1-2-3 {
    grid-template-columns: repeat(3, minmax(0%, 1fr));
  }
}

@media (min-width: 1600px) {
  .grid-1-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0%, 1fr));
  }
}

/* Buttons
----------------------------------------------------------------------------- */

a.btn-sm,
button.btn-sm {
  display: inline-block;
  width: auto;
  padding: 4px 8px;
  font-size: 14px;
  height: 32px;
  margin: 0;
}

.btn-sm img {
  display: inline-block;
  height: 20px;
  width: auto;
  margin: 0;
  padding: 0;
}

/* Form
----------------------------------------------------------------------------- */

.errors {
  display: flex;
  justify-content: space-between;
  color: var(--del-color);
}

form.button_to {
  display: inline-block;
  margin: 0;
}
form.button_to button {
  margin: 0;
}


.switch {
  margin-bottom: var(--spacing);
}

.form-actions a,
.form-actions input,
.form-actions button {
  margin-top: 6px;
  margin-bottom: 6px;
}


/* Table
----------------------------------------------------------------------------- */

table .actions {
  text-align: right;
}

/* Card
----------------------------------------------------------------------------- */

article.card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

article.card header > .title {
  margin: 0;
}

article.card header > .actions {
  text-align: right;
}

article.past {
  opacity: 0.5;
}

article.today {
  border: 2px solid var(--primary);
}

article.weekend {
  background-color: var(--primary-focus);
}

/* Profile
----------------------------------------------------------------------------- */

.profile-details {
  display: flex;
  align-items: flex-start;
}

.profile-details .image {
  border-radius: 50%;
  overflow: hidden;
  margin-right: var(--spacing);
}

/* Invoice Items
----------------------------------------------------------------------------- */

.table-grid {
  display: grid;
  grid-template-columns: 50px 7fr 90px 120px repeat(2, 2fr) 100px;
  grid-column-gap: 0px;
  grid-row-gap: 0px;
  text-align: right;
}

.table-grid > div {
  border-bottom: 1px solid var(--table-border-color);
  padding: 6px 4px;
}

.table-header > div,
.table-grid > .double-line,
.items > turbo-frame:last-child > .table-grid > div {
  border-bottom-width: 2px;
  border-color: var(--secondary);
}

.invoice-table h1 {
  font-size:1.2em;
  margin-bottom: 0.5em;
}

.invoice-table h2 {
  font-size:1.1em;
  margin-block: 0.5em;
}

.invoice-table .description > :last-child {
  margin-bottom: 0;
}

.invoice-table .description > :first-child {
  margin-top: 0;
}

/* Form inline
----------------------------------------------------------------------------- */

.form-inline {
  margin: 0;
}

.form-inline select,
.form-inline input {
  padding: 4px 6px;
  margin: 0;
  height: 2em;
  font-size: 16px;
}

.form-inline .actions button:last-child {
  margin-right: 0;
}

/* Other
----------------------------------------------------------------------------- */
.no-loader[aria-busy=true]::before,
html[aria-busy=true]::before {
  display: none;
}

#flash-notice {
  color: var( --ins-color);
  height: 40px;
  text-align: center;
}

.label {
  padding: 2px 4px;
  border-radius: 4px;
  color: var(--primary);
  margin: 2px 0;
  display: inline-block;
}

nav li > * {
  white-space: nowrap;
}

sl-dropdown {
  button {
    all: unset;
  }

  a, button {
    margin:0;
    padding: 0;
    display: block;
  }
}

sl-badge,
sl-tooltip,
sl-dropdown {
  &:not(:defined) {
    display: none;
  }
}


lit-chart {
  display: block;
  margin-bottom: 1rem;
  min-height: 300px;
}

form[aria-busy=true]::before {
  display: none;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.pulse {
  animation: pulse 2s infinite ease-in-out;
}

/* Authentication
----------------------------------------------------------------------------- */

.authentication {
  height: 100%;
  overflow: hidden;

  main {
    display: flex;
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 0;

    &.summer1 {
      background-image: url("/assets/summer1-f1bb0802.jpg");
    }

    &.winter1 {
      background-image: url("/assets/winter1-30d7f6fc.jpg");
    }

    &.winter2 {
      background-image: url("/assets/winter2-afaac109.jpg");
    }

    &.winter3 {
      background-image: url("/assets/winter3-cdd23eea.jpg");
    }
  }

  .left {
    flex: 1;
    display: flex;
    height: 100vh;
    align-items: end;
  }

  .right {
    position: relative;
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    width: 600px;
    height: 100vh;
    margin: 0;
    border-radius: 0;
    overflow-y: auto;

    #flash-notice {
      position: absolute;
      top: 10px;
      left: 10px;
      right: 10px;
    }
  }

  .dev-login {
    display: none;
    margin: 50px;
    background: rgba(0, 0, 0, 0.5);
    width: 100%;

    .button_to {
      margin: 0 10px 10px 0;
    }
  }

  @media (min-width: 992px) {
    .dev-login {
      display: block;
    }
}
