/*──────────────────────────────────────────────────────────────────────────────
  General & Root Variables
──────────────────────────────────────────────────────────────────────────────*/
:root {
    --primary-color: #480102;
    --secondary-color: #d30c10;
}

/*──────────────────────────────────────────────────────────────────────────────
  Body & Background
──────────────────────────────────────────────────────────────────────────────*/
body {
    color: white;
    font-family: Arial, sans-serif;
    text-align: center;
    background: url("../images/ScheduleBackground2.jpg") no-repeat center center fixed;
    background-size: cover;
}

/*──────────────────────────────────────────────────────────────────────────────
  Navigation Links
──────────────────────────────────────────────────────────────────────────────*/
.nav-links {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 15px;
}
.nav-link {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    transition: background-color 0.3s;
}
.nav-link:hover,
.nav-link.active {
    background-color: var(--secondary-color);
}

/*──────────────────────────────────────────────────────────────────────────────
  Scroll Buttons
──────────────────────────────────────────────────────────────────────────────*/
.scroll-button {
    background-color: var(--primary-color);
    color: white;
    border: 1px solid white;
    border-radius: 5px;
    padding: 10px 15px;
    font-size: 18px;
    cursor: pointer;
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    opacity: 0.8;
    transition: background-color 0.3s, opacity 0.3s;
}
.scroll-button.prev { left: 10px; }
.scroll-button.next { right: 10px; }
.scroll-button:hover {
    background-color: var(--secondary-color);
    opacity: 1;
}

/*──────────────────────────────────────────────────────────────────────────────
  Controls Section (Weekend Toggle & Days Selector)
──────────────────────────────────────────────────────────────────────────────*/
.controls-section {
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    padding: 15px;
    margin: 20px auto;
    max-width: 600px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.weekend-toggle label, .days-selector label {
    color: white;
    font-weight: bold;
    margin-right: 8px;
}

.days-selector select {
    background-color: var(--primary-color);
    color: white;
    border: 1px solid white;
    border-radius: 5px;
    padding: 5px 10px;
    font-size: 14px;
    cursor: pointer;
    margin-left: 8px;
}

.days-selector select:hover {
    background-color: var(--secondary-color);
}

.days-selector select:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

/*──────────────────────────────────────────────────────────────────────────────
  Table Container & Base Table Styles
──────────────────────────────────────────────────────────────────────────────*/
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 2800px;
    max-width: 90%;
    display: inline-block;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    position: relative;
}

/* Light Table */
.light-table {
    width: 100%;
    border-collapse: collapse;
    color: white;
    table-layout: fixed;
    white-space: nowrap;
}
.light-table th,
.light-table td {
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
}
.light-table th {
    background-color: var(--primary-color);
    color: white;
}

/* Freeze Nurse Column */
.nurse-column {
    position: sticky;
    left: 0;
    z-index: 10;
    background-color: var(--primary-color) !important;
}
tbody .nurse-column {
    background-color: var(--secondary-color) !important;
    opacity: 1 !important;
    text-align: left;
}
.nurse-column::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 4px;
    background: linear-gradient(to right, rgba(0,0,0,0.3), transparent);
    pointer-events: none;
}

/*──────────────────────────────────────────────────────────────────────────────
  Form Elements: Inputs, Selects, Textareas, Checkboxes
──────────────────────────────────────────────────────────────────────────────*/
.light-input,
input,
select,
textarea:not(.notes-text) {
  color: white !important;
  background-color: var(--primary-color) !important;
  border: 1px solid white !important;
  border-radius: 3px;
  padding: 5px 10px;
  font-size: 14px;
  text-align: center;
}

input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.7) !important;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #3a86af;
    box-shadow: 0 0 5px rgba(58, 134, 175, 0.5);
}

/* Checkbox Styling */
input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    background-color: var(--primary-color) !important;
    border: 2px solid white;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}
input[type="checkbox"]:checked {
    background-color: var(--secondary-color) !important;
}
input[type="checkbox"]::before {
    content: "✔";
    color: white;
    font-size: 14px;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    display: none;
}
input[type="checkbox"]:checked::before {
    display: block;
}

/* Select Dropdown */
.nurse-select, select {
    cursor: pointer;
}

/*──────────────────────────────────────────────────────────────────────────────
  Draggable Containers & Capacity Indicators
──────────────────────────────────────────────────────────────────────────────*/
.draggable-container {
    position: relative;            /* create stacking context for overflow */
    overflow: visible !important;  /* allow cards to spill out */
    min-height: 50px;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    width: 95%;
    margin: 0 auto;
    box-sizing: border-box;
    border: 2px solid #9b59b6;     /* Purple border like in first image */
}
.draggable-container.available-target {
    box-shadow: 0 0 8px 3px var(--secondary-color);
    transition: box-shadow 0.2s ease-in-out;
}
.draggable-container.at-capacity {
    background-color: rgba(211, 12, 16, 0.1);
    border: 1px dashed var(--secondary-color);
}
.draggable-container.unavailable {
    background-color: rgba(0,0,0,0.2);
    position: relative;
}

.draggable-container.highlight-capacity {
  /* override the purple border */
  border: 2px solid limegreen !important;
  /* give the whole cell a pale green tint */
  background-color: rgba(144,238,144,0.2) !important;
  /* add a soft glowing halo */
  box-shadow: 0 0 12px 6px rgba(144,238,144,0.6) !important;
}


/* — shrink the dragged card itself while you drag — */
.sortable-ghost,
.sortable-chosen {
  /* makes the card ~80% size */
  transform: scale(0.8);
  /* keep it centered */
  margin: 0 auto !important;
}

/* — temporarily make each drop-zone fill its <td> — */
.draggable-container.full-drop-target {
  width: 100% !important;
  height: 100% !important;
}
/* ─── hide any spilling bits while dragging ─────────────────────────────── */
.sortable-ghost,
.sortable-chosen {
  /* force the ghost/chosen clone to clip its contents */
  overflow: hidden !important;
}

/* full-drop-target is applied on drag-start to every .draggable-container */
.draggable-container.full-drop-target {
  /* clip anything overflowing the purple border */
  overflow: hidden !important;
}



/*──────────────────────────────────────────────────────────────────────────────
  Admission Row Cards (exactly like your old version)
──────────────────────────────────────────────────────────────────────────────*/
.admission-row {
    position: relative;  /* ensure it floats above neighbors */
    z-index: 5;
    display: grid;
    grid-template-columns:
      1.5fr     /* Patient - narrower */
      0.63fr  /* Confirmed */
      0.5fr   /* Referral Complete */
      0.5fr   /* Visit Complete */
      0.63fr  /* Cancelled */
      0.7fr   /* Requested Date - narrower */
      2.5fr   /* Notes - wider for readability */
      0.8fr   /* Care Team */
      0.5fr;  /* Delete - slightly wider to prevent overlap */
    gap: 10px;
    align-items: center;
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
    background-color: var(--secondary-color);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    margin: 5px 0;
    cursor: grab;
}
/*──────────────────────────────────────────────────────────────────────────────
  Let Planner & Queue cards overflow their <td> (in both tables)
──────────────────────────────────────────────────────────────────────────────*/
.scroll-container .table-container .light-table,
.scroll-container .table-container .light-table thead,
.scroll-container .table-container .light-table tbody,
.scroll-container .table-container .light-table tr,
.scroll-container .table-container .light-table th,
.scroll-container .table-container .light-table td,
.table-container .patient-queue-table,
.patient-queue-table tbody,
.patient-queue-table tr,
.patient-queue-table td {
    overflow: visible !important;
    position: static !important;
}

/* Ensure the queue’s wrapper also allows overflow */
.queue-container {
    overflow: visible !important;
    position: relative;
}

/*──────────────────────────────────────────────────────────────────────────────
  Capacity Indicators & Misc Helpers
──────────────────────────────────────────────────────────────────────────────*/
.capacity-container {
    margin-bottom: 5px;
}
.capacity-indicator {
    background-color: rgba(0,0,0,0.5);
    color: white;
    padding: 5px;
    margin-bottom: 5px;
    text-align: center;
    border-radius: 3px;
    font-size: 12px;
}
.capacity-indicator.full {
    background-color: var(--secondary-color);
    font-weight: bold;
}
.warning-indicator {
    background-color: #ff9800;
    color: black;
    padding: 5px;
    margin-bottom: 5px;
    text-align: center;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
}
.unavailable-indicator {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0,0,0,0.5);
    color: white;
    font-weight: bold;
    font-size: 14px;
}

/*──────────────────────────────────────────────────────────────────────────────
  Form & Button Tweaks
──────────────────────────────────────────────────────────────────────────────*/
.input-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.input-label {
    font-size: 10px;
    color: rgba(255,255,255,0.8);
    text-align: center;
    margin-bottom: 2px;
    white-space: normal;
    word-wrap: break-word;
    hyphens: auto;
}
.single-line-label {
    padding-top: 10px;
}
.patient-input {
    font-size: 14px;
    padding: 5px;
}
.requested-date {
    font-size: 12px;
}
.requested-date::-webkit-calendar-picker-indicator {
    filter: invert(1);
}

/* Delete & Add Buttons */
.delete-btn,
.add-btn {
    color: white !important;
    background-color: var(--primary-color) !important;
    border: 1px solid white;
    border-radius: 5px;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.3s;
}
.delete-btn:hover,
.add-btn:hover {
    background-color: var(--secondary-color) !important;
}

/* Care-Team Popups & Buttons */
.care-team-btn {
    background-color: var(--primary-color);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 3px;
    padding: 5px 8px;
    font-size: 12px;
    width: 100%;
    text-align: center;
    margin-top: 28px;
    height: 28px;
    cursor: pointer;
}
.care-team-btn:hover {
    background-color: var(--secondary-color);
}
.care-team-popup {
    position: absolute;
    background-color: var(--primary-color);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 5px;
    padding: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    z-index: 1000;
}
.care-team-option {
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 3px;
    margin: 2px 0;
    text-align: center;
}
.care-team-option:hover {
    background-color: rgba(255,255,255,0.1);
}

/* Team Borders & Option Highlights */
.admission-row.team-blue   { border: 6px solid #1e90ff !important; }
.admission-row.team-green  { border: 6px solid #2ecc71 !important; }
.admission-row.team-pink   { border: 6px solid #ff69b4 !important; }
.admission-row.team-yellow { border: 6px solid #f1c40f !important; }
.admission-row.team-orange { border: 6px solid #e67e22 !important; }
.admission-row.team-purple { border: 6px solid #9b59b6 !important; }
.admission-row.team-silver { border: 6px solid #C0C0C0 !important; }
.admission-row.team-red    { border: 6px solid #DC143C !important; }

.care-team-option.blue   { background-color: rgba(30,144,255,0.3); border-left: 4px solid #1e90ff; }
.care-team-option.green  { background-color: rgba(46,204,113,0.3); border-left: 4px solid #2ecc71; }
.care-team-option.pink   { background-color: rgba(255,105,180,0.3); border-left: 4px solid #ff69b4; }
.care-team-option.yellow { background-color: rgba(241,196,15,0.3); border-left: 4px solid #f1c40f; }
.care-team-option.orange { background-color: rgba(230,126,34,0.3); border-left: 4px solid #e67e22; }
.care-team-option.purple { background-color: rgba(155,89,182,0.3); border-left: 4px solid #9b59b6; }
.care-team-option.silver { background-color: rgba(192,192,192,0.3); border-left: 4px solid #C0C0C0; }
.care-team-option.red    { background-color: rgba(220,20,60,0.3); border-left: 4px solid #DC143C; }

.admission-row.team-blue   .care-team-btn { background-color: #1e90ff; border-color: #1e90ff; }
.admission-row.team-green  .care-team-btn { background-color: #2ecc71; border-color: #2ecc71; }
.admission-row.team-pink   .care-team-btn { background-color: #ff69b4; border-color: #ff69b4; }
.admission-row.team-yellow .care-team-btn { background-color: #f1c40f; border-color: #f1c40f; }
.admission-row.team-orange .care-team-btn { background-color: #e67e22; border-color: #e67e22; }
.admission-row.team-purple .care-team-btn { background-color: #9b59b6; border-color: #9b59b6; }
.admission-row.team-silver .care-team-btn { background-color: #C0C0C0; border-color: #C0C0C0; }
.admission-row.team-red    .care-team-btn { background-color: #DC143C; border-color: #DC143C; }


/*──────────────────────────────────────────────────────────────────────────────
  Also let the queue’s cards spill out exactly like the planner’s
──────────────────────────────────────────────────────────────────────────────*/
.table-container .patient-queue-table,
.table-container .patient-queue-table tbody,
.table-container .patient-queue-table tr,
.table-container .patient-queue-table td {
  overflow: visible !important;
  position: static !important;
}

/* give queue cards the same z-index & positioning as planner cards */
.queue-container .admission-row {
  position: relative;
  z-index: 5;
}


/*──────────────────────────────────────────────────────────────────────────────
  Headings & Subtitles
──────────────────────────────────────────────────────────────────────────────*/
.title, .subtitle {
    color: white;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}
.subtitle {
    width: 50%;
    margin: 20px auto;
}

/*──────────────────────────────────────────────────────────────────────────────
  Patient Queue Table
──────────────────────────────────────────────────────────────────────────────*/
.patient-queue-table {
    width: 50%;
    margin: 0 auto;
    border-collapse: collapse;
    color: white;
    table-layout: fixed;
    /* white-space: nowrap; */
    min-width: 818px;
}
.patient-queue-table th,
.patient-queue-table td {
    border: 1px solid rgba(255,255,255,0.2);
    padding: 8px;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
}
.patient-queue-table th {
    background-color: var(--primary-color);
}
.queue-container {
    min-height: 50px;
    padding: 10px;
    background-color: rgba(255,255,255,0.05);
    border-radius: 8px;
    border: 2px solid #9b59b6; /* Purple border like in first image */
}

/*──────────────────────────────────────────────────────────────────────────────
  Settings Panel
──────────────────────────────────────────────────────────────────────────────*/
#settings-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0,0,0,0.7);
    padding: 10px;
    border-radius: 8px;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/*──────────────────────────────────────────────────────────────────────────────
  Drag Handles
──────────────────────────────────────────────────────────────────────────────*/
.drag-handle {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 24px;
  line-height: 24px;
  font-size: 16px;
  text-align: center;
  background: rgba(0,0,0,0.5);
  border-radius: 4px;
  color: #fff;
  cursor: grab;
  user-select: none;
  z-index: 20;
}
.drag-handle:active {
  cursor: grabbing;
}
/*──────────────────────────────────────────────────────────────────────────────
  Sortable.js Styles
──────────────────────────────────────────────────────────────────────────────*/
.sortable-ghost   { opacity: 0.4; }
.sortable-chosen { background-color: var(--primary-color); }
.sortable-drag   { opacity: 0.8; }

/*──────────────────────────────────────────────────────────────────────────────
  Misc Fixes
──────────────────────────────────────────────────────────────────────────────*/
/* Make scroll container backgrounds transparent */
.scroll-container,
.table-container {
    background-color: transparent !important;
}
.light-table th:not(.nurse-column),
.light-table td:not(.nurse-column) {
    background-color: transparent !important;
}

/*──────────────────────────────────────────────────────────────────────────────
  1. Planner area: allow cards to overflow (same as before)
──────────────────────────────────────────────────────────────────────────────*/
.scroll-container .table-container .light-table th,
.scroll-container .table-container .light-table td {
  overflow: visible !important;
  position: static !important;
}

/*──────────────────────────────────────────────────────────────────────────────
  2. Patient-Queue: fully contain cards (no overflow)
──────────────────────────────────────────────────────────────────────────────*/
.patient-queue-table,
.patient-queue-table tbody,
.patient-queue-table tr,
.patient-queue-table td,
.queue-container {
  overflow: visible !important;
  position: relative;
}

/*──────────────────────────────────────────────────────────────────────────────
  3. Patient-Queue cards: consistent styling with the main container
──────────────────────────────────────────────────────────────────────────────*/
.queue-container .admission-row {
  display: grid;
  /* Use the same layout as the main admission rows for consistency */
  grid-template-columns:
    1.5fr     /* Patient */
    0.63fr  /* Confirmed */
    0.5fr   /* Referral Complete */
    0.5fr   /* Visit Complete */
    0.63fr  /* Cancelled */
    0.6fr   /* Requested Date */
    2.5fr   /* Notes */
    auto;   /* Actions (care-team + delete) */
  gap: 10px;
  align-items: start; /* Change to start to allow notes to expand */
  padding: 10px;
  width: 100%;
  box-sizing: border-box;
  background-color: var(--secondary-color);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  margin: 8px 0;
  cursor: grab;
}
/*──────────────────────────────────────────────────────────────────────────────
  Legacy Scroll-Container & Table Transparency
──────────────────────────────────────────────────────────────────────────────*/

/* keep the scroll wrapper fully transparent */
.scroll-container {
  background-color: transparent !important;
}

/* restore transparent table backgrounds */
.table-container,
.scroll-container .table-container,
thead,
tbody,
thead th,
thead tr,
th,
td {
  background-color: transparent !important;
}

/*──────────────────────────────────────────────────────────────────────────────
  Generic Table Styling (from styles-OLD.css)
──────────────────────────────────────────────────────────────────────────────*/
table {
  width: 80%;
  margin: auto;
  border-collapse: collapse;
}

/*──────────────────────────────────────────────────────────────────────────────
  TH Hover Effect (from styles-OLD.css)
──────────────────────────────────────────────────────────────────────────────*/
.light-table th:hover,
.patient-queue-table th:hover {
  background-color: var(--secondary-color) !important;
  transition: 0.3s ease-in-out;
}

/*──────────────────────────────────────────────────────────────────────────────
  Legacy Textarea Sizing (from styles-OLD.css)
──────────────────────────────────────────────────────────────────────────────*/
textarea {
  resize: none;
  overflow: hidden;
  min-height: 35px;
  height: auto;
  width: 100%;
  box-sizing: border-box;
  word-wrap: break-word;
}
/*──────────────────────────────────────────────────────────────────────────────
  1) Widen the “Delete” column so its button never wraps
──────────────────────────────────────────────────────────────────────────────*/
/* Remove this duplicate grid template definition */

/*──────────────────────────────────────────────────────────────────────────────
  2) Re-introduce the coloured borders for each “team”/visit
──────────────────────────────────────────────────────────────────────────────*/
.admission-row.team-blue   { border: 6px solid #1e90ff   !important; }
.admission-row.team-green  { border: 6px solid #2ecc71   !important; }
.admission-row.team-pink   { border: 6px solid #ff69b4   !important; }
.admission-row.team-yellow { border: 6px solid #f1c40f   !important; }
.admission-row.team-orange { border: 6px solid #e67e22   !important; }
.admission-row.team-purple { border: 6px solid #9b59b6   !important; }
.admission-row.team-silver { border: 6px solid #C0C0C0   !important; }
.admission-row.team-red    { border: 6px solid #DC143C   !important; }

/*──────────────────────────────────────────────────────────────────────────────
  3) Prevent the buttons & inputs in the last cells from ever wrapping
──────────────────────────────────────────────────────────────────────────────*/
.admission-row .delete-btn,
.admission-row .care-team-option,
.admission-row .light-input,
.admission-row .date-input {
  white-space: nowrap;
  width: 100%;
  box-sizing: border-box;
  justify-self: center;
}

/*──────────────────────────────────────────────────────────────────────────────
  4) Allow horizontal scrolling in the planner so nothing ever overflows
──────────────────────────────────────────────────────────────────────────────*/
.scroll-container {
  overflow-x: auto;
}

/*──────────────────────────────────────────────────────────────────────────────
  Fine-tune admission-row layout to match original look
──────────────────────────────────────────────────────────────────────────────*/
/* Remove this redundant rule that's causing layout issues */

/* make date & notes fields fill their cells */
.admission-row .requested-date,
.admission-row .notes-text {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Ensure delete button stays within its cell */
.admission-row .delete-btn {
  margin: 0 auto;
  display: block;
  max-width: 95%;
}

/* center the team & delete buttons in their cells */
.admission-row .care-team-btn,
.admission-row .delete-btn {
  justify-self: center;
  white-space: nowrap;
}
/*──────────────────────────────────────────────────────────────────────────────
  Restore original .admission-row grid & keep buttons from wrapping
──────────────────────────────────────────────────────────────────────────────*/
/* Remove this conflicting definition */

/* force the date & notes inputs to fill their columns */
.admission-row .requested-date,
.admission-row .notes-text {
  width: 100%;
  max-width: 100%;
}

/* keep the care-team & delete buttons centered and on one line */
.admission-row .care-team-btn,
.admission-row .delete-btn {
  white-space: nowrap;
  justify-self: center;
}

/* ensure the queue still overflows if it needs to */
.queue-container {
  overflow-x: auto !important;
  overflow-y: visible !important;
}

/*──────────────────────────────────────────────────────────────────────────────
  Add breathing room so rows aren’t so crowded
──────────────────────────────────────────────────────────────────────────────*/
.admission-row {
  /* more space inside each card */
  padding: 15px !important;
  /* gap between grid cells */
  gap: 15px !important;
  /* space between each row */
  margin-bottom: 8px !important;
}

.admission-row:last-child {
  /* no extra gap after the very last one */
  margin-bottom: 0 !important;
}

/* also pad the date & notes fields slightly for more click-target area */
.admission-row .requested-date,
.admission-row .notes-text {
  padding: 8px !important;
  box-sizing: border-box;
  width: 100%;
}

/* Fix notes textarea to allow automatic height growth with JS */
.admission-row .notes-text {
  resize: none;
  overflow: hidden;
  min-height: 35px;
  height: auto;
  white-space: normal;
  word-wrap: break-word;
  transition: height 0.1s ease;
}
/*──────────────────────────────────────────────────────────────────────────────
  Shrink Patient & Date columns, center checkboxes
──────────────────────────────────────────────────────────────────────────────*/
/* Remove this conflicting rule */

/* center every checkbox in its grid cell */
.admission-row input[type="checkbox"] {
  justify-self: center;
  align-self: center;
  margin: 0 auto;
  display: block;
}

/* Define a single grid layout for all admission rows to avoid conflicts */
.admission-row {
  display: grid;
  grid-template-columns:
    1.5fr     /* Patient */
    0.63fr  /* Confirmed */
    0.5fr   /* Referral Complete */
    0.5fr   /* Visit Complete */
    0.63fr  /* Cancelled */
    0.6fr   /* Requested Date */
    2.5fr   /* Notes */
    auto;   /* Actions (care-team + delete) */
  gap: 10px;
  align-items: start;  /* so notes can grow */
  /* keep the rest of your styling */
}

.admission-row .action-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

/* optionally tighten up the delete icon */
.admission-row .delete-btn {
  font-size: 16px;
  line-height: 1;
  padding: 4px 8px;
}

/* let all notes‐textareas auto‐grow */
textarea.notes-text {
  height: auto;
  min-height: 35px;
  overflow: hidden;
  resize: none;
  transition: height 0.1s ease;
}

/* ── patient-queue: ensure notes can wrap and auto-grow ───────────────────── */
.queue-container textarea.notes-text {
  white-space: pre-wrap !important;    /* preserve newlines and wrap long lines */
  word-break: break-word !important;   /* break long words if needed */
  height: auto !important;             /* allow JS inline-height to take effect */
}

/* when .hide-weekends is on the wrapper, hide Sat/Sun columns */
.hide-weekends .light-table col:nth-child(7),
.hide-weekends .light-table col:nth-child(8) {
  display: none;
}
.hide-weekends .light-table th:nth-child(7),
.hide-weekends .light-table th:nth-child(8),
.hide-weekends .light-table td:nth-child(7),
.hide-weekends .light-table td:nth-child(8) {
  display: none;
}

/* Queues Section - Side by Side Layout */
.queues-section {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    align-items: flex-start;
}

.queue-wrapper {
    flex: 1;
    min-width: 0; /* Prevents overflow */
}

.queue-wrapper .subtitle {
    font-size: 1.5em;
    margin-bottom: 10px;
    text-align: center;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Ensure queue containers can receive drops */
#patient-queue,
#readmission-queue {
    min-height: 100px;
    position: relative;
}

/* Responsive layout - stack queues on smaller screens */
@media (max-width: 1200px) {
    .queues-section {
        flex-direction: column;
    }
    
    .queue-wrapper {
        width: 100%;
    }
}
