@tailwind base;
@tailwind components;
@tailwind utilities;
@tailwindcss forms;

/*

@layer components {
  .btn-primary {
    @apply py-2 px-4 bg-blue-200;
  }
}

*/

@layer base {
  h1 {
    @apply text-3xl;
  }
  h2 {
    @apply text-2xl;
  }
  h3 {
    @apply text-xl;
  }
}
label {
  display: block;
  font-weight: bold;
  margin-bottom: 8px;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
textarea,
select {
  min-width: 40%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
}

.btn {
  background-color: #4CAF50;
  color: white;
  padding: 10px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.btn:hover { background-color: #45a049 }

.btn-danger { background-color: #ff0000 }
.btn-danger:hover { background-color: #cc0000 }
.btn-danger-disabled { background-color: #999; cursor: not-allowed; }

.btn-edit { background-color: #ff9800 }
.btn-edit:hover { background-color: #e68a00 }

.btn.btn-status-open { background-color: #2c15ff }
.btn.btn-status-sent { background-color: #4CAF50 }
.btn.btn-status-approved { background-color: #4CAF50 }
.btn.btn-status-rejected { background-color: #ff0000 }
.btn.btn-status-paid { background-color: #4CAF50 }

textarea {
  width: 50em;
  height: 15em;
}

@media (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="number"],
  input[type="submit"],
  textarea,
  select {
    width: 100%;
  }

  .styled-form {
    max-width: 100%;
    margin-left: 0;
  }
}
.status {
  background-color: #4CAF50;
  color: white;
  padding: 10px 16px;
  border-radius: 4px;
}
.status:hover { background-color: #45a049 }

.status.status-danger { background-color: #ff0000 }
.status.status-danger:hover { background-color: #cc0000 }

.status.status-open { background-color: #2c15ff }
.status.status-sent { background-color: #4CAF50 }
.status.status-approved { background-color: #4CAF50 }
.status.status-rejected { background-color: #ff0000 }
.status.status-paid { background-color: #4CAF50 }
.status.status-closed { background-color: #4CAF50 }
.status.status-in_progress { background-color: #ffbf00 }

.status.work_order-open { background-color: #2c15ff }
.status.work_order-in_progress { background-color: #ffbf00 }
.status.work_order-on_hold { background-color: #ff0000 }
.status.work_order-closed { background-color: #4CAF50 }
.status.work_order-rejected { background-color: #555555 }
.status.work_order-awaiting_invoice { background-color: #008080; }

.status:disabled {
  background-color: #aaa;
  cursor: not-allowed;
}
.styled-table {
  width: 80%;
  border-collapse: collapse;
  font-size: 14px;

  margin-top: 2em;
  margin-left: 1em;
}

.styled-table thead th {
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
}

.styled-table tbody td {
  border: 1px solid #ddd;
  padding: 8px;
}

.styled-table tbody tr:nth-child(even) {
  background-color: #f2f2f2;
}

.styled-table tbody tr:hover {
  background-color: #ddd;
}

.styled-table tbody td:first-child {
  border-left: none;
}

.styled-table tbody td:last-child {
  border-right: none;
  text-align: center;
  width: 5em;
}

@media (max-width: 768px) {
  .styled-table {
    width: 100%;
    margin-left: 0;  
  }
}
/*
 * 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.
 *


 */
@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');

body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', sans-serif;
  background-color: #EDF7F6;
}

.page-header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-end;

  border-bottom: 1px solid #909090;

  margin-bottom: 2em;
}

.page-header-buttons {
  display: flex;
  flex-direction: row;
}

.page-header-buttons h2 {
  margin-left: 1em;
}

.page-header-buttons a {
  text-decoration: none;
}

.partial-container {
  margin-bottom: 3em;
}

.flash-message {
  display: flex;
  align-items: center;
  background-color: #ccc;
  padding: 1rem;
}

.flash-message.alert {
  background-color: rgb(255, 95, 95);
}

.flash-message.notice {
  background-color: rgb(220 252 231);
  color: rgb(22 101 52);
}

@media (max-width: 768px) {
  .partial-container {
    overflow-x: scroll;
  }

  .page-header-buttons {
    display: none;
  }
}
