/* public/css/styles.css */

/* Reset default browser margins/paddings */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

/* Use flex layout to allow sticky footer at bottom */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  /* If you want a bit less top padding, reduce this to match your navbar height exactly */
  padding-top: 56px; /* For a typical Bootstrap fixed-top navbar of height ~56px */
}

/* The main container grows to fill remaining space */
.container {
  flex: 1 0 auto; 
  margin: 0 auto;  /* Center the container horizontally */
  padding-top: 1rem; /* Some spacing at the top within the container */
  padding-bottom: 1rem;
  /* Let Bootstrap handle widths on smaller breakpoints, but override for large screens: */
}
/* For viewports between 1200px and 1439px */
@media (min-width: 1200px) and (max-width: 1400px) {
  .container {
    max-width: 1550px !important; /* Adjust this value as desired */
  }
}

/* For viewports 1440px and above */
@media (min-width: 1440px) {
  .container {
    max-width: 1800px !important; /* This rule applies when the viewport is 1440px or wider */
  }
}

/* Footer remains at the bottom */
.footer {
  flex-shrink: 0;
}

/* Improve spacing for cards (optional) */
.card {
  margin-bottom: 1.5rem;
}

/* Style for bill entry image preview (increased size) */
.bill-container .img-thumbnail {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  max-height: 100% !important;
  max-width: 100% !important;
}

/* Larger images inside modals */
.modal-image,
.modal-body img {
  max-height: 80vh !important;
  max-width: 100% !important;
}

/* Style for save status messages in bill entry */
.save-status {
  font-style: italic;
  font-size: 0.9em;
}

/* Ensure required field markers are visible */
label .text-danger {
  margin-left: 2px;
}

/* Adjust table cell vertical alignment */
.table td, .table th {
  vertical-align: middle;
}

/* Style for admin panel stat cards */
.card.text-white .card-title {
  font-size: 2rem;
  font-weight: bold;
}

/* Add some padding inside tab panes */
.tab-pane {
  padding-top: 1rem;
}

/* Ensure long details in logs table wrap */
#logs .table td[style*="word-break"] {
  max-width: 300px; /* Adjust as needed */
}

/* Styles for inline editing in edit-report.ejs */
.bill-edit-row .form-control {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  height: auto;
}
.bill-edit-row .form-control[type="date"] {
  min-width: 140px;
}
.bill-edit-row .action-buttons button {
  margin-right: 5px;
}

/* Hide display spans when editing */
.bill-edit-row .display-value {
  display: none;
}
/* Show input fields when editing */
.bill-edit-row .edit-input {
  display: block;
}

/* Default state: hide input fields */
.edit-input {
  display: none;
}
/* Default state: show display spans */
.display-value {
  display: block;
}

.image-zoom-container {
  position: relative;
}
.zoom-controls {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 100;
}
.image-wrapper {
  position: relative;
  overflow: hidden;
}
.zoomable-image {
  cursor: grab;
  transition: transform 0.2s ease;
}

.image-zoom-container:hover .zoomable-image {
  cursor: zoom-in;
}