/******* MAIN STYLES & GENERAL LAYOUT **********/

/* DIN 1451 font */
/* Used for headers */
@font-face {
  font-family: "Alte DIN";
  src: url(/assets/din1451alt-069c05ecca82df9980b30aac58d405a1d6dff19fadd19de0bb30be26cfcc21a8.ttf) format("woff");
}

/* ~Body
-----------------------------------*/

body {
  font-family: verdana, arial, sans-serif;
  font-size: 62.5%;
  margin: 0;
  padding: 0;
  text-align: center;
  color: #666;
  height: 100%;
}

/* ~divs
-----------------------------------*/

div {
  border: 0px solid #0f0;
}

#form_error {
  color: red;
}

.right {
  float: right;
}

span#msg {
  background: #fefbea url(/../images/layout/error.gif) no-repeat 3px 2px;
  border: 1px solid #edc55c;
  padding: 3px 7px 4px 25px;
  text-align: left;
}

div.msg {
  margin: 10px 0 20px 0;
}

div.hr {
  height: 2px;
  margin: 0;
  padding: 0;
  background: #fff url(/../images/hr.gif) repeat-x;
}

div.spacer {
  clear: both;
}

.preload {
  display: none;
}

#container {
  margin: 0 45px 0 45px;
  border: 0px solid #000;
  display: grid;
  /* 200px menu on the left, 20px gap, then the main page content */
  grid-template-columns: 220px 1fr;
}

#menu,
#content {
  text-align: left;
}

#menu {
  width: 200px;
}

#login #content {
  width: 100%;
  left: 0px;
}

header {
  /* This gradient matches the gradient in the logo image */
  background: rgb(250, 222, 36);
  background: linear-gradient(
    180deg,
    rgba(250, 222, 36, 1) 0%,
    rgba(248, 213, 95, 1) 100%
  );
  padding: 17px 45px 17px 45px;
  text-align: right;
  border-bottom: 2px solid #ffffff;
  box-shadow: 0px 2px 3px #b2b2b2;
}

#breadcrumbs {
  text-align: left;
  position: relative;
  top: 30px;
  margin: 2px 0 0 1px;
}

#footer {
  height: 50px;
  margin-top: 20px;
  clear: both;
}

/* _____Menu______ */

#menu ul {
  margin: 0px 0 0 0;
  padding: 0;
}

#menu ul li {
  list-style: none;
  margin: 0;
  padding: 4px 0 6px 0;
  border: 1px solid #ddd;
  border-width: 0 0 1px 0;
}

#menu ul li a {
  text-decoration: none;
  text-transform: none;
  font-weight: bold;
  color: #a7a7a6;
  font-size: 1.3em;
}

#menu ul li a:hover,
#menu ul li a.selected,
body.home #menu ul li a.home,
body.clients #menu ul li a.clients,
body.company_documents #menu ul li a.company_documents,
body.contracts #menu ul li a.contracts,
body.photos #menu ul li a.photos,
body.subcontractors #menu ul li a.subcontractors,
body.suppliers #menu ul li a.suppliers,
body.upload_photos #menu ul li a.upload_photos,
body.users #menu ul li a.users,
body.user_history #menu ul li a.user_history {
  color: #000;
}

form.menu-logout {
  display: inline;
  margin: 0;
  padding: 0;
}

.menu-logout-btn {
  all: unset;
  cursor: pointer;
  text-decoration: none;
  font-weight: bold;
  color: #a7a7a6;
  font-size: 1.3em;
}

.menu-logout-btn:hover {
  color: #000;
}

#menu ul li ul {
  margin-left: 7px;
}

#menu ul li ul li {
  font: normal 0.8em arial;
  padding: 2px 0;
  border-width: 0;
}

#menu ul li ul li.sel a {
  color: #000;
}

/* Main HTML Elements
-----------------------------------*/

a img {
  border-width: 0;
}

a,
a:visited {
  color: #000;
}

a:hover {
  color: #ffd438;
  text-decoration: none;
}

/* Headings */
h1 {
  color: #000;
  margin: 0 0 15px 0;
}

h2,
h3 {
  font-family: "Alte DIN";
  color: #2f2f2f;
  margin: 20px 0 15px 0;
  text-transform: uppercase;
}

h4 {
  font: 1.2em "Alte DIN";
  color: #909090;
  margin: 0;
}

.manage p {
  width: 217px;
}

hr {
  margin-bottom: 13px;
}

h5 {
  font: normal 1.4em verdana;
  margin: 0 0 0px;
  padding: 0;
}

/* Filter links */
a.sel,
a.sel-d,
a.sel-a {
  color: #ffd438;
}

a.sel-d,
a.sel-a {
  padding-right: 14px;
}

a.sel-d,
a.sel-a:hover {
  background: url(/../images/icons/filter-d.gif) no-repeat right center;
}

a.sel-a,
a.sel-d:hover {
  background: url(/../images/icons/filter-a.gif) no-repeat right center;
}

/* Form elements */
label {
  width: 15em;
  display: block;
  float: left;
  border: 0px solid #666;
  padding-top: 4px;
}

input,
textarea,
select {
  border: 1px solid #666;
  margin-bottom: 11px;
}

textarea {
  width: 520px;
}

input:focus {
  background: #ededed;
}

.button {
  font-size: 1em;
  display: inline-block;
  background: #000;
  color: #ffd438;
  border: 1px solid #bababa;
  text-decoration: none;
  margin: 5px 0 10px;
  padding: 4px 10px 4px;
  border-color: #bababa;
  border-bottom-color: #6f6f6f;
}

/*
  Tries to target forms which wrap single buttons via button_to,
  and make then display:inline-block so they behave like links.
  All you need is to add .button to the inner button via the `class` kwarg.
 */
form:has(input[type="hidden"] + input.button), form.button_to {
  display: inline-block;
}

form.drop label {
  width: 40px;
}

form.drop textarea {
  width: 100%;
  margin-bottom: 2px;
}

.button, a.button {
  min-height: 16px;
  font-size: 1em;
  border: 1px solid #bababa;
  text-decoration: none;
  margin: 5px 1px 10px;
  padding: 4px 10px 4px;
  display: inline-block;
  color: #000;
  background: #ffd438;
  border-color: #bababa;
  border-bottom-color: #6f6f6f;
}

a.button.black {
  background-color: #000;
  color: #ffd438;
}

.black {
  background-color: #000;
  color: #ffd438;
}

.yellow {
  color: #000;
  background: #ffd438;
}

/* Input Lengths */

.short {
  width: 20px;
}

.time {
  width: 37px;
}

.date {
  width: 70px;
}

.medium {
  width: 100px;
}

.long {
  width: 200px;
}

td input {
  margin: 0;
}

/* Tables */

/* <![CDATA[ */

table,
td,
th {
  border-color: #d5d5d5;
  border-style: solid;
}

table {
  border-width: 0 0 1px 1px;
  border-spacing: 0;
  border-collapse: collapse;
}

td,
th {
  margin: 0;
  padding: 5px 8px 6px 8px;
  border-width: 1px 1px 0 0;
  background-color: #fff;
}

.form td {
  border-width: 0px 1px 0 0;
}

/* ]]> */

th {
  background-color: #000;
  color: #ffd438;
  font-size: 1.1em;
  font-weight: normal;
}

td.odd {
  background-color: #ededed;
}

tr:nth-of-type(odd) td {
  background-color: #ededed;
}

td.label {
  background-color: #000;
  color: #ffd438;
}

td.data {
  background-color: #ededed;
}

.none,
.none td,
.none th {
  border: 0;
  padding: 0;
}

.none {
  margin-bottom: 20px;
}

.nospace {
  margin: 0;
  padding: 0;
}

.nospace table {
  border-width: 0;
  margin-top: -1px;
}

.sub {
  margin-left: 20px;
}

.sub th {
  background-color: #fefefe;
  color: #999;
  font-size: 9px;
  padding: 1px 5px;
}

.sub td {
  color: #333;
  padding: 1px 5px;
  color: #c3c3c3;
}

.sub td a {
  text-decoration: none;
  color: #c3c3c3;
}

.sub td a:hover {
  color: black;
  text-decoration: underline;
}

/******* PAGE SPECIFIC STYLES & LAYOUT **********/

/* _____Key______ */

#key {
  margin-top: 100px;
}

#key td span {
  position: relative;
  bottom: 3px;
}

/* _____Contracts______ */

.contracts th a.right {
  font-weight: bold;
  color: #ffd438;
  text-decoration: none;
}

.contracts th a.right:hover {
  text-decoration: underline;
}

.contracts div.manage a.list {
  color: #909090;
  text-decoration: none;
  display: block;
  margin: 3px 0;
  padding: 0;
}

.manage hr {
  margin: 6px 0 6px;
}

/* _____Reports______ */

.reports #content h2 {
  margin-bottom: 4px;
}

.reports #content p {
  margin-top: 0;
}

/* _____Photos Box______ */

.box {
  text-align: center;
  margin-top: 15px;
  padding-right: 11px;
  display: -moz-inline-stack;
  display: inline-block;
  vertical-align: top;
  zoom: 1;
  *display: inline;
  width: 100px;
  min-height: 100px;
  _height: 100px;
}

.photo {
  text-align: center;
}

img.delete {
  margin: 0 0 -2px 2px;
}

#bread {
  margin-top: 10px;
  margin-bottom: 20px;
}

.box a {
  text-decoration: none;
}

/* _____Quick Links______ */

#content #quick-links a img {
  margin: 20px 40px 0 0;
}

#content #quick-links {
  border: 0px solid #000;
  text-align: left;
  margin-left: 25px;
}

input {
  z-index: 1500;
}

/* ______ Autocomplete _____ */

.ma-container {
  color: #000;
  border: 1px solid #333;
  background-color: #fff;
  position: absolute;
  visibility: hidden;
  overflow-y: auto;
  overflow-x: hidden;
}

.ma-container ul {
  list-style: none;
  overflow: hidden;
  width: 100%;
  padding: 0;
  margin: 0;
  text-align: left;
}

.ma-container li {
  padding: 2px 5px;
  line-height: 16px;
  cursor: pointer;
  float: left;
  width: 100%;
  overflow: hidden;
}

.ma-container .ma-hover {
  color: #000;
  background-color: #ffd531 !important;
}

.ma-container .ma-odd {
}

.ma-container .ma-even {
  background-color: #efefef;
}

.ma-loading {
  background-color: #fafba4;
}

.ma-selected {
  background-color: #fff6c9;
}
/* This is a horizontal element containing buttons and filters for an index view */
/* Currently we just use it for the contracts and tools index view */
.index_actions {
  display: flex;
  justify-content: flex-start;
}

.index_actions a {
  margin-right: 5px;
}

/* These values are picked so that the dropdown lines up precisely with the New Contract button */
.index_actions select {
  padding: 4px 10px 4px 10px;
  margin: 5px 0px 10px 0px;
}
summary {
  list-style-type: "\1f4c1";
}

summary > span {
  margin-left: 0.5em;
}

li {
  margin-bottom: 0.25em;
}
/*
  Place all the styles related to the matching controller here.
  They will automatically be included in application.css.
*/

h1 {
  margin: 20px 0 15px 0;
}

/* Contracts index view table */
th a.right {
  font-weight:bold;
  color:#FFD438;
  text-decoration: none;
}

th a.right:hover {
  text-decoration: underline;
}

div.manage a.list {
  color:#909090;
  text-decoration:none;
  display:block;
  margin: 3px 0;
  padding:0;
}

.manage hr {
  margin:6px 0 6px;
}

.contract_summary {
  display: flex;
}

.actions {
  display: flex;
}

.actions input {
  margin-left: 2px;
  margin-right: 2px;
}

.recent_documents {
  display: grid;
  /* We assume there are 3 columns in the recent documents section */
  grid-template-columns: 1fr 1fr 1fr;
}

.recent_documents div {
  margin-right: 20px;
}

.recent_document_actions {
  display: flex;
}

.recent_document_actions input {
  margin-right: 5px;
}

.file_tree ul {
  list-style: none;
  font-size: 11pt;
}

.file_tree li summary {
  cursor: pointer;
}

.file_tree li summary:hover {
  color: #ffd438;
}

.recent_photos {
  height: 150px;
}

.recent_photos > a {
  margin-right: 5px;
}

.recent_photos img {
  height: 150px;
}

a:has(img) {
  text-decoration: none;
}

.photo {
  max-width: 90vw;
  max-height: 80vh;
  padding: 5px;
}
/* Mobile-friendly responsive styles */

/* Hamburger menu toggle button - hidden on desktop */
.menu-toggle {
  display: none;
  background: #000;
  color: #ffd438;
  border: none;
  font-size: 1.6em;
  padding: 6px 12px;
  cursor: pointer;
  font-weight: bold;
  line-height: 1;
}

/* Make tables scrollable on all screen sizes as a baseline */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ---- Tablet breakpoint (768px and below) ---- */
@media screen and (max-width: 768px) {
  /* Reduce header padding */
  header {
    padding: 12px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  header img {
    max-height: 40px;
    width: auto;
  }

  /* Show hamburger toggle */
  .menu-toggle {
    display: block;
  }

  /* Stack layout: single column */
  #container {
    margin: 0 10px;
    display: block;
  }

  /* Collapsible menu */
  #menu {
    width: 100%;
    display: none;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 10px;
  }

  #menu.open {
    display: block;
  }

  #menu h2 {
    display: none;
  }

  #menu hr {
    display: none;
  }

  #menu ul {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }

  #menu ul li {
    border: none;
    padding: 4px 0;
  }

  #menu ul li a {
    display: block;
    padding: 6px 12px;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 1.2em;
  }

  #menu ul li a:hover,
  #menu ul li a.selected {
    background: #ffd438;
    color: #000;
  }

  /* Content area full width */
  #content {
    width: 100%;
  }

  /* Forms: stack label above input */
  label {
    width: 100% !important;
    float: none !important;
    margin-bottom: 4px;
  }

  textarea {
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
  }

  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="date"],
  input[type="tel"],
  input[type="url"],
  select {
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Error explanation box */
  #error_explanation {
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Tables: allow horizontal scroll */
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }

  thead, tbody, tr {
    max-width: 100%;
  }

  /* Contracts: stack recent documents */
  .recent_documents {
    grid-template-columns: 1fr !important;
  }

  /* Contract summary */
  .contract_summary {
    flex-direction: column;
  }

  /* Index actions: allow wrapping */
  .index_actions {
    flex-wrap: wrap;
    gap: 5px;
  }

  /* Actions flex wrap */
  .actions {
    flex-wrap: wrap;
  }

  /* Breadcrumbs */
  #breadcrumbs {
    top: 10px;
    margin-left: 10px;
  }

  /* Quick links */
  #content #quick-links {
    margin-left: 0;
  }

  #content #quick-links a img {
    margin: 10px 15px 0 0;
  }

  /* Manage section */
  .manage p {
    width: auto;
  }

  /* Recent photos: scroll horizontally */
  .recent_photos {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  /* File tree: prevent overflow */
  .file_tree {
    overflow-x: auto;
  }

  .file_tree ul {
    font-size: 10pt;
  }
}

/* ---- Phone breakpoint (480px and below) ---- */
@media screen and (max-width: 480px) {
  header {
    padding: 8px 10px;
  }

  header img {
    max-height: 32px;
  }

  #container {
    margin: 0 5px;
  }

  /* Larger tap targets for menu */
  #menu ul li a {
    padding: 8px 12px;
    font-size: 1.1em;
  }

  /* Stack buttons vertically */
  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .actions input,
  .actions .button,
  .actions a.button {
    margin: 3px 0;
    text-align: center;
  }

  /* Buttons: full width */
  .button, a.button {
    display: block;
    text-align: center;
    margin: 5px 0;
  }

  form:has(input[type="hidden"] + input.button),
  form.button_to {
    display: block;
  }

  /* Headings */
  h2, h3 {
    font-size: 1.3em;
  }

  /* Box (photo thumbnails) */
  .box {
    width: auto;
    padding-right: 5px;
  }

  /* Table cells: reduce padding on small screens */
  td, th {
    padding: 4px 5px;
    font-size: 0.95em;
  }
}
body {
  /* background-color: #fff; */
  color: #333;
  /* margin: 33px; */
}

body, p, ol, ul, td {
  font-family: verdana, arial, helvetica, sans-serif;
  font-size: 13px;
  line-height: 18px;
}

pre {
  background-color: #eee;
  padding: 10px;
  font-size: 11px;
}

a {
  color: #000;
}

a:visited {
  /* color: #666; */
  color: #000;
}

a.button:hover, .button:hover {
  color: #fff;
  background-color: #000;
}

th {
  padding-bottom: 5px;
}

/*
td {
  padding: 0 5px 7px;
}
*/

div.field,
div.actions {
  margin-bottom: 10px;
}

#notice {
  color: green;
}

#alert {
  color: red;
}

.field_with_errors > label {
  /* background-color: #faa; */
  background-color: #c00;
  padding: 6px 0px 2px 2px;
  margin: -2px 0px -2px 0px;
  color: #fff;
  display: inline-block;
}

#error_explanation {
  width: 450px;
  border: 2px solid #c00;
  padding: 7px 7px 0;
  margin-bottom: 20px;
  background-color: #f0f0f0;
}

#error_explanation h2 {
  text-align: left;
  font-weight: bold;
  padding: 5px 5px 5px 15px;
  font-size: 12px;
  margin: -7px -7px 0;
  background-color: #c00;
  color: #fff;
}

#error_explanation ul li {
  font-size: 12px;
  list-style: square;
}

label {
  display: block;
}
/*
  Styles for the login page and session management
*/

/* Override to prevent line wrapping on login error messages */
span#msg {
  white-space: nowrap;
}
/*
 * 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, 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/SCSS
 * 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.
 *




 */
