/* styles.css */

body {
    font-family: Arial, sans-serif;
}

.header {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background-color: #333;
    color: white;
}


#logTable {
    border-collapse: collapse;
    width: 100%;
	margin: 20px auto; /* Adds margin around the table */
}

#logTable th, #logTable td {
    border: 1px solid black; /* Border for table cells */
    padding: 8px; /* Adds space inside each cell */
    text-align: left; /* Aligns the content of the cells */
}

#logTable th {
    background-color: #f2f2f2; /* Adds a background color to header cells */
}

#logTable tr:nth-child(even) {
    background-color: #f9f9f9; /* Alternating row colors */
}

.table-container {
    padding: 20px; /* Adds padding to the container to create space on both sides */
}



.sort-arrow {
    font-size: 0.8rem;
    margin-left: 5px;
}

/* Search field container */
.search-container {
  margin: 20px 0;
  display: flex;
  justify-content: right;
}

/* Styling the search input */
#searchInput {
  width: 100%;
  max-width: 600px;
  padding: 10px;
  font-size: 1rem;
  border: 2px solid #ccc;
  border-radius: 5px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
  outline: none;
}

/* When focused */
#searchInput:focus {
  border-color: #75bd48;
}

/* Styling the search button */
#searchButton {
  background-color: #75bd48;
  color: white;
  border: none;
  padding: 10px 20px;
  margin-left: 10px;
  cursor: pointer;
  font-size: 1rem;
  border-radius: 5px;
}

#searchButton:hover {
  background-color: #6cd000;
}



* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body, html {
  font-family: Arial, sans-serif;
  height: 100%;
}

.container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.header {
    background-color: #555;
    color: white;
    padding: 15px;
    display: flex; /* Flex container for header */
    justify-content: space-between; /* Space between heading and hamburger */
    align-items: center; /* Center vertically */
    position: relative;
}

/* Heading takes 80% of the header width */
.header-title {
    flex-basis: 75%;
    font-size: 1.5rem;            /* Adjust the font size as needed */
    margin: 0;                    /* Remove any default margin */
}

/*.hamburger {
	flex-basis: 20%;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    position: absolute;
    top: 15px;
    right: 15px; /* Positioned on the right side */
}

/* Hamburger icon takes 20% of the header width */
.hamburger {
    flex-basis: 25%;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    text-align: right;            /* Align the hamburger to the right side */
}

.nav-menu {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    background-color: #555;
    width: 200px; /* Fixed width for the menu */
    position: absolute;
    top: 50px;
    right: 15px; /* Positioned to the right, under the hamburger button */
    border-radius: 5px;
    z-index: 1000;
}

.nav-menu ul {
    list-style: none;
    padding: 0;
}

.nav-menu li {
    margin: 10px 0;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
}

.nav-menu.active {
    display: flex;
}

.main-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}

.camera-preview {
  width: 90%;
  max-width: 400px; /* Limiting max width for smaller devices */
  /*max-width: 80vh;*/
	
  height: 50vh; /* Use viewport height for responsive design */
  background-color: #f0f0f0;
  margin-bottom: 20px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid #ccc;
}

.product-info {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
}

.product-info p, .product-info label {
  margin: 5px 0;
}

#quantity-taken {
  width: 30%;
  padding: 8px;
  margin-top: 5px;
}

#quantity-to-add {
  width: 30%;
  padding: 8px;
  margin-top: 5px;
}

#update-button {
  background-color: #75bd48;
  color: white;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 1rem;
  margin-top: 10px;
  border-radius: 5px;
  width: 30%;
  /*max-width: 200px; /* Ensuring a consistent size */
  align-self: left;
}

#update-button:hover {
  background-color: #6cd000;
}

.footer {
  display: flex;
  justify-content: space-between;
  padding: 15px;
  background-color: #f0f0f0;
  border-top: 1px solid #ccc;
  /*position: absolute;*/
  bottom: 0;
  width: 100%;
}

.support-info, .scanner-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.support-info a {
  color: #555;
  text-decoration: none;
  margin-bottom: 5px;
}

@media (max-width: 1024px) {
  .container {
    padding: 10px;
  }

  .camera-preview {
    height: 50vh; /* Adjust for smaller screen height */
  }

  .product-info {
    max-width: 90%; /* Adapt to smaller screens */
  }

  #update-button {
    width: 30%;
    max-width: none;
  }
}

@media (orientation: landscape) and (max-width: 1024px) {
  .container {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-around;
  }

  .main-content {
    flex-direction: row;
    align-items: flex-start;
  }

  .camera-preview {
    width: 45%;
    height: auto;
    margin-bottom: 0;
  }

  .product-info {
    width: 45%;
  }
}

/* Style adjustments for larger screens */
@media (min-width: 769px) {
    .nav-menu {
        right: 15px; /* Keep it aligned to the right */
        position: absolute;
        top: 50px; /* Adjust top positioning */
    }
}

/* Style adjustments for smaller screens */
@media (max-width: 768px) {
    .header {
        padding: 10px 15px; /* Reduced padding for mobile */
    }

    .nav-menu {
        right: 10px; /* Adjusted position for mobile */
        top: 65px; /* Adjusted top for smaller screens */
    }
	
	body {
        font-size: 14px; /* Smaller font size for mobile devices */
    }

    .header {
        font-size: 0.7rem; /* Adjust header font size for mobile */
    }
}