@tailwind base;
@tailwind components;
@tailwind utilities;

@import url('https://fonts.googleapis.com/css?family=Open+Sans');

/*

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

*/

@layer base {
  html {
    -webkit-tap-highlight-color: transparent;
  }

  @font-face {
    font-family: "Cocogoose";
    src: url(/assets/cocogoose/Cocogoose-Pro-Light-189bcf457d097bee7f845bc7869731ea068f0045a5dbfd5119362fe7d8cc3738.ttf);
  }
}

[class*="rfid-board-cell"] {
  @apply h-[200px] border-[3px] rounded font-semibold justify-center flex flex-col items-start gap-1 p-2 bg-[url(/assets/background-cover-9894748676e9cb0f16db016ab07cf1e5572942cd65ef3a410bac467903c17b89.png)] bg-center bg-no-repeat;
}

.rfid-board-cell-not-found {
  @apply bg-not-found-background text-not-found-primary border-not-found-primary;
}

.rfid-board-cell-empty {
  @apply border-empty-cell-primary;
}

.rfid-board-cell-card {
  @apply bg-rfid-card-background text-rfid-card-primary border-rfid-card-primary;
}

.rfid-board-cell-damaged {
  @apply bg-damaged-package-background text-damaged-package-primary border-damaged-package-primary;
}

.rfid-board-cell-registered {
  @apply bg-registered-package-background text-registered-package-primary border-registered-package-primary;
}

.rfid-board-cell-usable {
  @apply bg-usable-package-background text-usable-package-primary border-usable-package-primary;
}

.rfid-board-cell-filled {
  @apply bg-filled-package-background text-filled-package-primary border-filled-package-primary;
}

.rfid-board-cell-ready-to-fill {
  @apply bg-ready-to-fill-package-background text-ready-to-fill-package-primary border-ready-to-fill-package-primary;
}

[class*="rfid-board-btn"] {
  @apply flex flex-row flex-1 rounded items-center justify-center font-bold border border-black;
}

.rfid-board-btn-primary {
  @apply h-48 w-full text-2xl gap-2 mb-4;
}

.rfid-board-btn-secondary {
  @apply mb-2 text-sm;
}

/* PACKAGE PAGE */
.package-container {
  @apply container mx-auto flex flex-col px-4 pt-2 pb-8 gap-6;
}

.package-content {
  @apply flex flex-col gap-4;
}

.package-navbar {
  @apply border-b border-light-gray;
}

.package-navbar-container {
  @apply mx-auto flex items-center justify-between;
}

.package-button-and-logo-container {
  @apply flex items-center justify-center;
}

.package-login-button {
  @apply text-white font-semibold py-1.5 px-5 rounded-lg mr-4;
}

.package-logo {
  @apply h-16 w-auto;
}

.package-back-button {
  @apply mr-2 font-semibold py-2 px-4 ml-4 rounded-lg border;
}

.package-store-logo {
  @apply h-12;
}

.package-information-container {
  @apply flex justify-between gap-4;
}

.package-information-left-container {
  @apply rounded-2xl p-4 text-white flex flex-col bg-zeroo-primary-light w-1/2;
}

.package-qrcode-and-weight-container {
  @apply flex flex-col justify-start;
}

.package-qrcode-label {
  @apply font-black text-3xl font-cocogoose leading-normal text-cool-neutral;
}

.package-weight-label {
  @apply bg-light-gray rounded-2xl text-xs font-bold w-fit py-1 px-2 text-black leading-normal;
}

.package-information-right-container {
  @apply flex flex-col gap-4 w-1/2;
}

.package-information-right-top-container {
  @apply p-4 border border-light-gray rounded-2xl flex-1;
}

.divisor {
  @apply flex-grow border-t border-light-gray;
}

.package-information-right-bottom-container {
  @apply p-4 border border-light-gray rounded-2xl flex flex-col flex-none;
}

.package-secondary-label {
  @apply font-light;
}

.package-values-container {
  @apply flex flex-col gap-2 justify-center;
}

.package-label-title {
  @apply text-base-gray text-sm font-normal;
}

.package-label {
  @apply text-black font-semibold text-sm;
}

.package-label-extra-large {
  @apply text-black text-3xl font-cocogoose font-semibold;
}

.package-label-small {
  @apply text-black font-semibold text-xs;
}

.package-label-title-large {
  @apply text-black font-semibold text-base mb-2;
}

.package-label-title-extra-large {
  @apply text-black font-semibold text-base mb-2;
}

.package-product-information {
  @apply relative flex flex-col items-center justify-center gap-2 rounded-2xl p-4 text-white overflow-hidden bg-auchan-primary;
}

.package-product-name-and-price-container {
  @apply flex flex-row content-baseline gap-2 items-start w-full;
}

.package-product-name {
  @apply text-cool-neutral text-2xl font-medium w-full z-10;
  overflow: hidden;
   text-overflow: ellipsis;
   display: -webkit-box;
   -webkit-line-clamp: 2;
           line-clamp: 2; 
   -webkit-box-orient: vertical;
}

.package-product-price {
  @apply text-cool-neutral font-medium text-sm z-10;
}

.package-product-farmer {
  @apply text-cool-neutral font-light text-sm;
}

.package-product-origin-label {
  @apply text-cool-neutral font-medium text-sm gap-2 flex items-center;
}

.package-product-image {
  @apply absolute h-52 top-4 -right-16;
  filter: drop-shadow(-10px 10px 10px #0E0E0E30)
}

.package-product-content-container {
  @apply flex flex-col items-start self-stretch gap-2 z-10;
}

.package-product-content-container__child {
  @apply w-full;
}

.package-product-main-content-container {
  @apply flex flex-col items-start self-stretch;
}

.package-product-floating-label-container {
  @apply relative rounded-lg bg-cool-neutral flex flex-col items-center justify-center p-1 px-6 gap-2.5 z-10;
}

.package-product-floating-label {
  @apply text-zeroo-primary z-10 text-center font-bold text-xs leading-normal;
}

.package-accordion-container {
  @apply flex flex-col gap-4 z-10;
}

.package-accordion {
  @apply flex-1 border rounded-xl overflow-hidden;
}

.package-accordion-header {
  @apply text-black text-left font-semibold bg-light-gray px-4 py-2 flex justify-between items-center;
}

.package-accordion-content {
  @apply text-black pt-2 pb-4 px-4 text-sm font-normal; 
}

#accordion-open-nutrition_facts-10-body {
  @apply px-0; 
}

.package-report-button {
  @apply font-semibold justify-center px-4 py-3 rounded-xl flex-1 border items-center flex;
}

.package-key-value-accordion-content-container {
  @apply divide-y;
}

.package-key-accordion-label {
  @apply flex flex-row w-full p-1 pl-4 pr-8;
}

.package-value-accordion-label {
  @apply ml-auto font-black font-cocogoose;
}

.package-register-field {
  @apply relative flex flex-col p-4 rounded-lg gap-3 text-base	text-cool-neutral bg-wilma font-medium;
}

.package-register-header {
  @apply absolute left-0 top-0 h-2 w-full opacity-40 bg-cool-neutral;
}

.package-register-button-container {
  @apply flex flex-row content-baseline gap-2;
}

.package-register-input {
  @apply border flex-1 rounded-lg text-xs bg-transparent border-cool-neutral placeholder:text-cool-neutral py-2 px-4 h-8 focus:border-cool-neutral focus:ring-0;
}

.package-register-button {
  @apply bg-cool-neutral py-2 px-4 text-xs rounded-lg text-cool-neutral h-8 text-wilma;
}

.package-registered {
  @apply w-full py-1 px-8 text-base overflow-x-auto text-clifford;
}

.registration-counter {
  @apply flex justify-between font-semibold items-center bg-light-gray mt-2 mb-2 rounded p-2;
}

.orders {
  height: 100%;
}

.orders-navbar {
  padding: 1rem 0;
  border-bottom: 1px solid #333;
  background-color: #ffffff;
}

.orders-navbar__logo-image {
  width: 100%;
  min-width: 80px;
  max-width: 160px;
}

.orders-navbar__logo {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Orders Buttons */

.order-button {
  display: flex;
  flex-direction: row;
  gap: 8px;
  background: #ffffff;
  border-radius: 4px;
  font-size: 14px;
  align-items: center;
  color: #333333;
  font-weight: 700;
  box-shadow: none;
  border: 1px solid #333;
  text-decoration: none;
  justify-content: center;
  cursor: pointer;
}

.order-button a {
  color: #333;
  text-decoration: none;
}

.order-button--leave {
  padding: 12px 32px;
  font-size: 1rem;
}

.order-button--small {
  padding: 8px;
  height: 40px;
}

.order-button--primary {
  color: #333;
  border: 1px solid #333333;
  background: #ffffff;
}

.order-button--secondary {
  color: #fff;
  background: #223631;
}

.order-button--disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.order-button--streched {
  flex: 1;
}

/* Orders Items */

.orders__field {
  padding: 1.5rem 0;
}

.orders__title {
  font-size: 1.5rem;
  font-weight: 600;
  font-weight: 600;
  line-height: 1.6rem;
  color: #333333;
  margin-bottom: 2rem;
}

.orders__items {
  list-style: none;
  padding: 0;
  margin: 0;
}

.orders-item {
  padding: 1.2rem;
  box-shadow: 0px 2px 6px 3px rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  border-left-width: 24px;
  border-left-style: solid;
  margin: 1rem 0;
  background-color: #ffffff;
}

.orders-item--blocked {
  opacity: 0.5;
}

.orders-item-in-queue {
  padding: 1.2rem;
  box-shadow: 0px 2px 6px 3px rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  border-left-width: 24px;
  border-left-style: solid;
  margin: 1rem 0;
  background-color: #f2f2f2;
}

.orders-item--children {
  margin-left: 2rem;
}

.orders-item__information {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.orders-item__description {
  display: flex;
  align-items: flex-start;
  gap: 48px;
}

.orders-item__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.orders-item__accordion-tab {
  margin-top: 1rem;
  border-top: 1px solid #6d6d6d;
  padding-top: 0.5rem;
  text-align: center;
  font-size: 14px;
  margin-bottom: -8px;
  color: #6d6d6d;
}

.orders-item__label {
  font-weight: 700;
  font-size: 12px;
  line-height: 14px;
  color: #6d6d6d;
  margin-bottom: 8px;
}

.order-number {
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 23px;
  color: #333333;
  margin-bottom: 0;
}

.product-name {
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 23px;
  color: #333333;
  margin-bottom: 0;
  min-width: 6rem;
}

.orders-item__group-packages {
  display: flex;
  align-items: center;
  gap: 6px;
}

.package-info {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  padding: 6px 6px;
  gap: 4px;
  background: #ffffff;
  border: 1px solid #333333;
  border-radius: 4px;
}

.orders__not_found:not(:only-child) {
  display: none;
}

.package-info span {
  font-weight: 700;
  font-size: 14px;
  line-height: 14px;
  /* identical to box height */
  color: #333333;
}

.label-status {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 12px;
  gap: 10px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 14px;
  line-height: 14px;
  height: 40px;
  padding: 0 24px;
}

/* MAPPING COLORS */

.status--no_station {
  border: 1px solid #000000;

  color: #000000;
}

.status--silo_invalid {
  background: #ffe0e0;
}

.status--preparing {
  background: #ffc700;
  border: 1px solid #6f5000;
  /* identical to box height */
  color: #0f0f0f;
}

/* TODO: figure out how to use the same class for both */
/* Used for order status */
.status--prepared {
  background: #f4faf7;
  border: 1px solid #32584d;
  color: #32584d;
}

/* Used for order_item status */
.status--filled {
  background: #f4faf7;
  border: 1px solid #32584d;
  color: #32584d;
}

.status--filling {
    background: #ffc700;
    border: 1px solid #6f5000;
    /* identical to box height */
    color: #0f0f0f;
}

.status--waiting {
  background: #f4faf7;
  border: 1px solid #32584d;
  color: #32584d;
}

.status--offline {
  background: #ff0000c6;
  border: 1px solid #6f5000;
  /* identical to box height */
  color: #ffffff;
}

.status--blocked {
  background: #ad160e;
  color: #ffffff;
  border: 1px solid #ffffff;
}

.status--waiting_for_package {
  background: #ffc700;
  border: 1px solid #6f5000;
  /* identical to box height */
  color: #6f5000;
}

.status--waiting_user_action {
  background: #ffc700;
  border: 1px solid #6f5000;
  /* identical to box height */
  color: #6f5000;
}

.status--queue_waiting {
  background: #d9ddd4;
  border: 1px solid #6f5000;
  /* identical to box height */
  color: #32584d;
}

.status--filling_finished {
  background: #f4faf7;
  border: 1px solid #32584d;
  color: #32584d;
}

.status--filling_waiting_confirmation {
  background: #f4faf7;
  border: 1px solid #32584d;
  color: #32584d;
}

/* MODAL STYLES */

.modal-body__qrcode-img {
  width: 100%;
}

/* QR CODE NOT FOUND */

#packages-qr-code-redirect {
  height: 100vh;
}

.not-found__wrapper {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: center;
  justify-content: center;
}

.not-found__text {
  font-family: "Open Sans";
  font-style: normal;
  font-size: 32px;
  line-height: 120%;
  text-align: center;
}

.not-found__image {
  width: 75%;
}

@media (min-width: 992px) {
  .not-found__image {
    width: 35%;
  }
}

.rotate {
  -moz-transition: all 0.3s linear;
  -webkit-transition: all 0.3s linear;
  transition: all 0.3s linear;
}

.rotate.down {
  -ms-transform: rotate(180deg);
  -moz-transform: rotate(180deg);
  -webkit-transform: rotate(180deg);
  transform: rotate(180deg);
}

table th,
table td {
  text-align: left;
}

table.layout {
  width: 100%;
  border-collapse: collapse;
  border-radius: 4px;
}

table.display th,
table.display td {
  border: 1px solid #e5e7eb;
  padding: 0.5em 1em;
}

table.display th {
  background: #f7f7f7;
}

table.display td {
  background: #fff;
}

@media (min-width: 1024px) {
  .container {
    max-width: 1200px;
  }
}

@media (max-width: 30em) {
  table.responsive-table {
    box-shadow: none;
  }
  table.responsive-table thead {
    display: none;
  }
  table.display th,
  table.display td {
    padding: 0.5em;
  }
  table.responsive-table td:nth-child(1):before {
    content: "Number";
  }
  table.responsive-table td:nth-child(2):before {
    content: "Name";
  }
  table.responsive-table td:nth-child(1),
  table.responsive-table td:nth-child(2) {
    padding-left: 25%;
  }
  table.responsive-table td:nth-child(1):before,
  table.responsive-table td:nth-child(2):before {
    position: absolute;
    left: 0.5em;
    font-weight: bold;
  }
  table.responsive-table tr,
  table.responsive-table td {
    display: block;
  }
  table.responsive-table tr {
    position: relative;
    margin-bottom: 1em;
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.2);
  }
  table.responsive-table td {
    border-top: none;
  }
  table.responsive-table td.organisationnumber {
    background: #d5e0cc;
    border-top: 1px solid #b3bfaa;
  }
  table.responsive-table td.actions {
    position: absolute;
    top: 0;
    right: 0;
    border: none;
    background: none;
  }
}

.details-modal {
  background: #ffffff;
  border-radius: 0.5em;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  left: 50%;
  max-width: 90%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 30em;
  text-align: left;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.details-modal .details-modal-close {
  align-items: center;
  cursor: pointer;
  color: #111827;
  display: flex;
  height: 4.5em;
  justify-content: center;
  position: absolute;
  right: 0;
  top: 0;
  width: 4.5em;
}

.details-modal .details-modal-title {
  font-weight: bold;
  font-size: 18px;
  padding: 1.5em 2em;
  pointer-events: all;
  position: relative;
  width: calc(100% - 4.5em);
}

.details-modal .details-modal-content {
  border-top: 1px solid #e0e0e0;
  padding: 2em;
  pointer-events: all;
  overflow: auto;
}

.details-modal-overlay {
  animation: fadeInAnimation 0.2s ease-out;
  background: rgba(15, 23, 42, 0.8);
  position: fixed;
  opacity: 0.5;
  bottom: 0;
  right: 0;
  left: 0;
  top: 0;
  overflow-y: hidden;
}

@keyframes fadeInAnimation {
  0% {
      opacity: 0;
  }
  100% {
      opacity: 0.5;
   }
}

.qrcode_modal {
  display: flex;
  flex-direction: row;
  gap: 4px;
  flex: 1;
}

.qrcode_submit_button {
  background: #223631;
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 4px;
  color: #fffefc;
}

.qrcode_submit_button:hover {
  background: #528276 ;
}

.qrcode_text_field {
  flex: 1;
  border-radius: 4px;
  text-transform: uppercase;
}

.qrcode_text_field::-webkit-input-placeholder { /* WebKit browsers */
  text-transform: none;
}
.qrcode_text_field.qrcode_text_field:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
  text-transform: none;
}
.qrcode_text_field::-moz-placeholder { /* Mozilla Firefox 19+ */
  text-transform: none;
}
.qrcode_text_field:-ms-input-placeholder { /* Internet Explorer 10+ */
  text-transform: none;
}
.qrcode_text_field::placeholder { /* Recent browsers */
  text-transform: none;
}

.success-popup-close {
  align-items: center;
  cursor: pointer;
  color: #111827;
  display: flex;
  height: 100%;
  justify-content: center;
  position: absolute;
  right: 0;
  top: 0;
  width: 4.5em;
}
/*
 * 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.
 *


 */
