/* General styles */
body {
  font-family: Arial, sans-serif;
  background-color: #f4f4f4;
  margin: 0;
  padding: 0;
}

/* Container to hold all content */
.container {
  width: 95%;
  max-width: 600px;
  margin: 20px auto;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
/* Prevent horizontal scrolling */
body {
  margin: 0;
  overflow-x: hidden;
}

/* Optional: Make sure main containers do not overflow */
.container,
.content {
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* Heading style */
h1 {
  text-align: center;
  color: #333;
}
.left-offset {
  margin-left: 1cm; /* or use padding-left if preferred */
}

/* Form elements styles */
select,
input,
button {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  border-radius: 5px;
  border: 1px solid #ddd;
}

/* Button specific styles */
button {
  cursor: pointer;
  border: none;
}

/* Custom buttons */
.add-model-button {
  background-color: #ffc300;
  color: #333;
}

.remove-button {
  background-color: #b22222;
  color: white;
  width: 2cm;
  height: 1cm;
  border: none;
  text-align: center;
  display: inline-block;
}

/* Cart-item style */
.cart-item {
  padding: 10px;
  border: 1px solid #ddd;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Hidden class for elements */
.hidden {
  display: none;
}

/* Total display style */
.total-display {
  font-size: 18px;
  font-weight: bold;
  margin-top: 15px;
}

/* Table styles */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 10px;
}

th,
td {
  border: 1px solid #ddd;
  padding: 5px;
  text-align: left;
}

th {
  background-color: #f2f2f2;
}

/* Subcategory container styles */
.subcategory-container {
  border: 1px solid #ddd;
  padding: 10px;
  margin-top: 10px;
  border-radius: 5px;
  background-color: #f9f9f9;
  position: relative;
}

/* Subcategory header styles */
.subcategory-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Button styles for proceed and send receipt */
#proceedButton,
#sendReceiptButton {
  background-color: green;
  color: white;
  font-weight: bold;
  margin-top: 20px;
  display: none;
}

/* Responsive design - Media Queries */
@media (max-width: 768px) {
  body {
    font-size: 14px;
  }

  /* Adjust the container width */
  .container {
    width: 100%;
    padding: 15px;
  }

  /* Adjust input and button width for small screens */
  select,
  input,
  button {
    width: 100%;
    padding: 12px;
  }

  /* Make the buttons and input fields larger for ease of use on mobile */
  .add-model-button,
  .remove-button,
  #proceedButton,
  #sendReceiptButton {
    padding: 15px;
  }

  /* Adjust table padding for small screens */
  th,
  td {
    font-size: 12px;
    padding: 8px;
  }

  /* Hide the subcategory container header buttons in smaller screens */
  .subcategory-header button {
    width: 50px;
    height: 50px;
  }
}

@media (max-width: 480px) {
  /* Adjust font size for very small screens */
  body {
    font-size: 12px;
  }

  /* Stack buttons and inputs for small screens */
  select,
  input,
  button {
    width: 100%;
    padding: 10px;
  }

  .remove-button {
    font-size: 14px;
    padding: 8px;
  }

  /* Adjust the size of the remove button */
  .remove-button {
    width: 1.5cm;
    height: 1cm;
  }

  /* Reduce the size of subcategory container */
  .subcategory-container {
    padding: 8px;
  }
  #spinner {
    display: none;
    border: 4px solid #422e62; /* Light gray background */
    border-top: 4px solid #b0a316; /* Blue color for the spinner */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 2s linear infinite;
    margin: 20px auto;
  }

  @keyframes spin {
    0% {
      transform: rotate(0deg);
    }
    100% {
      transform: rotate(360deg);
    }
  }
}

/* Remove button styling */
.remove-attachment {
  @apply text-red-600 hover:text-red-700 bg-white rounded-full p-1 transition-all;
}

/* Camera modal styling */
.camera-modal {
  @apply fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50;
}

.camera-content {
  @apply bg-white p-6 rounded-lg w-full max-w-2xl;
}

/* Reconciliation editor styling */
.reconcile-editor {
  @apply border rounded-lg p-4 bg-white shadow-lg;
}

.reconcile-textarea {
  @apply w-full p-3 border rounded mb-4 focus:ring-2 focus:ring-blue-500 focus:border-transparent;
  min-height: 200px;
} /* Group the buttons in a flex row with 2cm spacing */
.button-group {
  display: flex;
  flex-direction: row;
  gap: 2cm; /* this creates horizontal spacing */
  margin-top: 1rem;
  justify-content: center; /* optional: centers buttons horizontally */
  flex-wrap: wrap; /* allows wrapping on small screens */
}

/* Button styling */
#uploadButton,
#photoButton,
#reconcileButton {
  background-color: #1a263e;
  color: white;
  width: 2cm;
  height: 1cm;
  border: none;
  text-align: center;
  display: inline-block;
}

/* Hover effect */
#uploadButton:hover,
#photoButton:hover,
#reconcileButton:hover {
  background-color: #1e40af;
}

#feedback {
  padding: 10px;
  margin: 10px 0;
  border-radius: 5px;
}

#spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
}

/* Dark mode styles */
.dark-mode {
  background-color: #1a1a1a;
  color: #e0e0e0;
}

.dark-mode .container {
  background-color: #2d2d2d;
  color: #e0e0e0;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.dark-mode select,
.dark-mode input,
.dark-mode textarea {
  background-color: #3d3d3d;
  color: #e0e0e0;
  border-color: #555;
}

.dark-mode table {
  border-color: #555;
}

.dark-mode th,
.dark-mode td {
  border-color: #555;
  background-color: #3d3d3d;
}

.dark-mode th {
  background-color: #2a2a2a;
}

.dark-mode .subcategory-container {
  background-color: #3d3d3d;
  border-color: #555;
}

.dark-mode #summary {
  background-color: #3d3d3d;
  color: #e0e0e0;
}

.dark-mode .modal-content {
  background-color: #2d2d2d;
  color: #e0e0e0;
}

.dark-mode .profile-dropdown {
  background-color: #2d2d2d;
  color: #e0e0e0;
  border-color: #555;
}

.dark-mode .profile-dropdown a {
  color: #e0e0e0;
}

.dark-mode .profile-dropdown a:hover {
  background-color: #3d3d3d;
}

.dark-mode footer {
  background-color: #1e1e1e;
  color: #e0e0e0;
}

.dark-mode footer a {
  color: #e0e0e0;
}

.dark-mode footer a:hover {
  color: #81d4fa;
}

/* Ensure buttons remain visible in dark mode */
.dark-mode button {
  color: #fff;
}

.dark-mode .add-model-button {
  background-color: #ffc300;
  color: #333;
}

.dark-mode #proceedButton,
.dark-mode #sendReceiptButton {
  background-color: #4caf50;
  color: white;
}

.dark-mode #uploadButton,
.dark-mode #photoButton,
.dark-mode #reconcileButton {
  background-color: #1a263e;
  color: white;
}
.document-attachment-item {
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.document-attachment-item:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.remove-doc-btn:hover {
  background-color: #c82333 !important;
}

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
/* Dark mode for feedback messages */
.dark-mode #feedback {
  background-color: #333;
}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: white;
  margin: 10% auto;
  padding: 20px;
  width: 350px;
  text-align: center;
  border-radius: 8px;
}

.spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3498db;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  animation: spin 1s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-right: 5px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
