
body {
  margin: 2rem;
}

.schedule-table {
  border-collapse: collapse;
  font-family: sans-serif;
  margin-top: 10px;
  width: 100%;
  table-layout: fixed;
  /* Use a larger base width that scales with viewport */
  min-width: max(100%, 800px);
}

.schedule-table th,
.schedule-table td {
  border: 1px solid #ccc;
  padding: 13px;
  text-align: left;
  overflow: visible;
  white-space: pre-wrap !important;
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100vw;
  box-sizing: border-box;
  line-height: 1.5;
}

/* Extra specificity for stubborn mobile browsers */
td, th {
  white-space: pre-wrap !important;
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100vw;
  box-sizing: border-box;
}

thead {
  background-color: #f0f0f0;
  font-weight: bold;
}

/* before the new widths
.col-date { width: 100px; }
.col-type { width: 120px; }
.col-time { width: 100px; }
.col-crew { width: 210px; }
.col-captain { width: 190px; }


.col-date { width: 110px; }
.col-type { width: 130px; }
.col-time { width: 100px; }
.col-crew { width: 215px; }
.col-captain { width: 190px; }
*/

/* START new lines added to keep the action column smaller */

/* New: Constrain the actions column width */
.actions-col { 
  width: 140px !important; 
  max-width: 140px !important;
  min-width: 140px !important;
}

/* Make action buttons smaller and more compact */
.actions-col button {
  font-size: 12px;
  padding: 4px 8px;
  margin: 2px 1px;
  display: block;
  width: 100%;
  box-sizing: border-box;
}

/* Optional: Stack buttons vertically for even more space efficiency */
.actions-col {
  text-align: center;
  vertical-align: top;
}

/* Hide actions column when not in edit mode to give full space to content */
.schedule-table:not(.editing-mode) .actions-col {
  display: none;
}

/* Add a class to show we're in editing mode */
.editing-mode .actions-col {
  display: table-cell;
}


/* END new lines added to keep the action column smaller */


.schedule-table td[contenteditable="true"]:hover {
  background-color: #e6f7ff;
  cursor: text;
}

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

.schedule-table tbody tr:hover {
  background-color: #f3f3f3;
}

button {
  margin: 5px 5px 0 0;
  padding: 6px 12px;
  font-size: 14px;
  cursor: pointer;
}

button[disabled] {
  opacity: 0.5;
  pointer-events: none;
}

.controls {
  margin-top: 10px;
}

#output {
  margin-top: 15px;
  padding: 10px;
  background: #f9f9f9;
  border: 1px solid #ccc;
  white-space: pre-wrap;
  font-family: monospace;
}
.top-info {
  margin: 10px 0;
  font-size: 14px;
}
.note-area {
  border: 1px solid #ccc;
  padding: 8px;
  margin-bottom: 10px;
  background-color: #fefefe;
  min-height: 40px;
  white-space: pre-wrap;
}
.notes {
  margin: 10px 0;
  margin-top: 30px;
}
#tracking-code {
  border-bottom: 1px dashed #888;
  padding: 2px 4px;
  display: inline-block;
  min-width: 30px;
}

/* added for 2 column note section */
.notes-row {
  display: flex;
  gap: 15px;
  margin-top: 5px;
}

.notes-column {
  flex: 1;
  min-width: 0; /* Allows flex items to shrink below content size */
}

.notes-column .note-area {
  width: 100%;
  box-sizing: border-box;
}

/* Responsive: Stack on smaller screens */
@media (max-width: 768px) {
  .notes-row {
    flex-direction: column;
  }
}

/* Responsive: Stack on smaller screens */
@media (max-width: 768px) {
  body {
    margin: .75rem;
  }
}



/* Container to allow horizontal scroll on mobile if needed */
.table-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Large screens - make better use of space */
@media (min-width: 1400px) {
  .schedule-table th,
  .schedule-table td {
    padding: 15px 8px;
  }
}

/* Responsive: Stack on smaller screens */
@media (max-width: 768px) {
  .notes-row {
    flex-direction: column;
  }
  
  /* Make table more compact on mobile but still readable */
  .schedule-table th,
  .schedule-table td {
    padding: 8px 4px;
    font-size: 14px;
    min-height: 40px;
  }
  
  /* Allow horizontal scrolling on very small screens if needed */
  .schedule-table {
    min-width: 600px;
  }
}