/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
 * or vendor/assets/stylesheets of plugins, if any, 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 top of the
 * compiled file, but it's generally better to create a new file per style scope.
 *


 */
* {
  font: 13px Verdana, Helvetica, Arial, sans-serif;
}

h1 {
  font-size: 15px;
  font-weight: bold;
}

h2, h3 {
  font-size: 14px;
  font-weight: bold;
}

th {
  text-align: left;
  font-weight: bold;
}

th p {
  text-align: center;
  font-weight: bold;
}

th a {
  font-weight: bold;
}

caption {
  text-align: left;
}

#errorExplanation {
  margin: 1em 0.5em;
  font-weight: bold;
  color: #dc2229;
}

#errorExplanation ul {
  list-style: square;
  padding-left: 2em;
}

.fieldWithErrors {
  border-top: 4px solid var(--color-red);
  border-bottom: 4px solid var(--color-red);
  border-left: 2px solid var(--color-red);
  border-right: 2px solid var(--color-red);
  display: inline;
}

#calendar tbody tr td ul li {
  text-align: center;
}

dl dt {
  font-weight: bold;
}

td.current {
  background: var(--color-red);
}

optgroup {
  font-weight: bold;
}

a:hover {
  color: #fff;
  text-shadow: 0px 1px 2px rgb(0 0 0), 0px -1px 2px rgb(0 0 0);
  background: var(--color-blue);
}

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

a.destructive,
a.non-scanning,
a.no-employee {
  color: var(--color-red);

  &:hover {
    color: #fff;
    background: var(--color-red);
  }
}

#calendar td.text {
  text-align: left;
}

table#calendar td {
   text-align: right;
}

p#flash {
  color: var(--color-red);
}

td.section-header,
th.section-header {
  text-align: center;
  font-weight: bold;
}

table#timesheet th {
  text-align: center;
}

tr.totals-row td {
  font-weight: bold;
}

table#timesheet td.approve {
  text-align: center;
}
:root {
  interpolate-size: allow-keywords;
}

* {
  padding: 0;
  margin: 0;
}

:root {
  --color-blue: #1d4ed8;
  --color-red: #be123c;
}

#wrapper {
  margin: 2em 5em;
}

form label {
  display: block;
}

ul {
 list-style: none;
}

ul li {
  margin: 0.5em 0;
}

@keyframes highlight-fade {
  0% { background-color: transparent; }
  20% { background-color: #b0e57ccc; }
  100% { background-color: transparent; }
}

:target {
  animation: highlight-fade 0.5s ease-in-out;
  scroll-margin-top: 121px;
}

thead {
  position: sticky;
  top: 0px;
  tr:last-child {
    th {
      border-bottom: 1px solid #CCC;
    }
  }
}

th {
  padding: 0.1em 1em;
  width: 10em;
  background: #fff;
}

td {
  padding: 0.5em;
  border-bottom: 1px solid #CCC;
}

caption {
  padding: 0.5em;
}

p {
  margin: 0.5em 0;
}

div#pager {
  margin: 1em 0;
}

#content {
  margin: 2em 0;
  clear: left;
}

#content h2 {
  margin: 1em 0;
}

ul.group-members {
  margin: 1em 0;
  list-style: square;
}

ul.group-members li {
  margin-left: 2em;
}

ul.occurrences {
  margin-left: 4em;
  list-style: revert;
}

h4 {
  margin: 0.5em 0 0 1em;
}

dl dd {
  margin-left: 1em;
  margin-bottom: 0.3em;
}

#navigation {
  margin: 0.8em 0 0 0;
}

#navigation,
#sub-navigation {
  float: left;
}

#navigation li,
#sub-navigation li {
  float: left;
  padding-right: 1.5em;
}

#sub-navigation {
  margin-bottom: 0.4em;
}

.time-navigation {
  max-width: 1020px;
  padding: 1em 0;
  a {
    font-weight: normal;
  }
}

#calendar {
  clear: left;
}

#calendar thead tr th {
  padding: 0 1em 1em 1em;
  text-align: center;
}

#calendar caption {
  padding: 2em 1em;
  text-align: center;
}

#calendar td {
   text-align: right;
   border: 1px solid #000;
}

optgroup option {
  padding: 0 0.2em;
}

td.current {
  cursor: pointer;
}

div.column {
  float: left;
  margin-right: 8em;
}

p.alphabet {
  margin: 1em 0;
}

p.alphabet a {
  padding: 0 0.2em;
}

#sub-header {
  clear: left;
  margin-top: 1em;
}

div.options,
div#occurrence-options {
  padding: 0.5em 0;
}

#employee-info,
#location-info,
#machine-info {
  float: left;
  width: 30%;
}

#employee-calendar,
#location-calendar,
#machine-calendar {
  float: right;
  width: 68%;
}

#calendar {
  width: 100%;
}

#employee-calendar #calendar caption,
#location-calendar #calendar caption,
#machine-calendar #calendar caption {
  padding-top: 0.5em;
}

table#timesheet {
  margin: 1em 0;
}

table#timesheet th {
  padding: 0.2em;
  width: 100%;
  border-left: 1px solid #000;
  border-right: 1px solid #000;
}

table#timesheet td {
  padding: 0.2em 0.9em;
  border: 1px solid #ccc;
}

table#timesheet .section-header,
table#timesheet th.timesheet-week {
  padding: 0.5em 0;
}

table#timesheet .section-start {
  border-left: 1px solid #000;
}

table#timesheet .section-end {
  border-right: 1px solid #000;
}

table#timesheet td.time {
  white-space: nowrap;
}

table#timesheet tbody tr.totals-row td {
  border: 1px solid #000;
  padding: 0.4em;
}

td > .machine-assignment {
  padding: 0.4em;
  border-left: 1px solid #CCC;
  border-top-left-radius: 0.4em;
  border-bottom-left-radius: 0.4em;
}

td > .machine-assignment:has(+ .machine-assignment) {
  border-bottom: 0.5px solid #CCC;
}

td > .machine-assignment + .machine-assignment {
  border-top: 0.5px solid #CCC;
}

.detailed-occurrence {
  padding: 0.4em;
  border-left: 1px solid #333;
  border-right: 1px solid #333;
  border-radius: 0.5em;
}

.detailed-occurrence div {
  text-align: left;
}

textarea {
  width: 100%;
  max-width: 500px;
  height: 10em;
}

.notification-badge {
  background-color: var(--color-red);
  border-radius: 0.5em;
  color: white;
  font-size: 0.8em;
  padding: 2px 6px;
  vertical-align: top;
}

input[type="checkbox"] {
  height: 18px;
  width: 18px;
  margin-right: 4px;
}

input[type="radio"] {
  height: 18px;
  width: 18px;
}

input {
  min-height: 20px;
}

select {
  min-height: 24px;
  padding: 2px 4px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar {
  float: left;
  padding-right: 2em;
  width: 300px;
}

strong {
  font-weight: bold;
}

details {
  margin: 1em 0em;

  summary {
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
  }

  &::details-content {
    height: 0;
    overflow: hidden;
    transition: all 0.3s;
    transition-behavior: allow-discrete;
  }

  &:open {
    &::details-content {
      height: auto;
    }
  }
}

.flex-bar {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.navlist {
  position: sticky;
  top: 12px;
  align-self: start;
  width: 15em;
  min-width: 5em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  max-height: 100vh;

  li {
    font-size: 3pt;
    @media (height >= 650px) {
      font-size: 6pt;
    }
    @media (height >= 800px) {
      font-size: 10pt;
    }
  }
  li::first-letter {
    font-weight: bold;
  }
}

td.day {
  cursor: pointer;
  transition: background-color 0.5s ease-out;
  &:hover:not(:has(ul:hover)) { /* ul onclick="event.stopPropagation();" */
    background: #b4d8e7;
  }
}

td.day ul li {
  cursor: default;
  border-radius: 0.5em;
  padding: 4px;
  margin: 4px 0;
}

li.started {
  background-color: #ffaeae;
}

li.employee-only {
  background-color: #d6e3b5;
}

li.machine-only {
  background-color: #fff0aa;
}

li.completed {
  background-color: #b0e57c;
}

li.non-job {
  background-color: #c3c3e5;
}
