/* A document surface with a quiet formatting bar and an integrated file tray. */
.booking-notes {
  border: 1px solid var(--line-strong, #b9bfc4);
  border-radius: 4px;
  background: var(--panel, #fff);
  color: var(--text, #191d20);
}
.booking-notes__format {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line, #d8dcdf);
  background: var(--bg, #fafbfb);
  border-radius: 4px 4px 0 0;
}
.booking-notes__styles {
  width: 132px;
  height: 32px;
  padding: 0 26px 0 8px;
  color: inherit;
  font: inherit;
  font-size: 13px;
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
}
.booking-notes__styles:hover {
  border-color: var(--line-strong, #b9bfc4);
}
.booking-notes__group {
  display: flex;
  gap: 2px;
  padding-left: 7px;
  border-left: 1px solid var(--line, #d8dcdf);
}
.booking-notes__tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 6px;
  color: inherit;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
}
.booking-notes svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.booking-notes__tool:hover,
.booking-notes__tool[aria-pressed="true"] {
  background: var(--bg-subtle, #eef0f1);
  border-color: var(--line-strong, #b9bfc4);
}
.booking-notes__tool[aria-pressed="true"] {
  color: var(--text, #191d20);
  box-shadow: inset 0 -2px currentColor;
}
.booking-notes__editor {
  min-height: 230px;
  max-height: 520px;
  overflow: auto;
  padding: 20px 22px;
  font-size: 15px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  outline: none;
}
.booking-notes:focus-within {
  border-color: var(--muted, #687078);
}
.booking-notes__editor:focus-visible {
  outline: none;
  box-shadow: none;
}
.booking-notes__editor p,
.booking-notes-render p {
  margin: 0 0 0.7em;
}
.booking-notes__editor h2,
.booking-notes-render h2 {
  font-size: 19px;
  margin: 1em 0 0.5em;
}
.booking-notes__editor h3,
.booking-notes-render h3 {
  font-size: 16px;
  margin: 0.9em 0 0.4em;
}
.booking-notes__editor ul,
.booking-notes__editor ol,
.booking-notes-render ul,
.booking-notes-render ol {
  padding-left: 25px;
  margin: 0.5em 0 0.9em;
}
.booking-notes__editor blockquote,
.booking-notes-render blockquote {
  border-left: 3px solid var(--line-strong, #b9bfc4);
  padding-left: 14px;
  margin: 12px 0;
}
.booking-notes__editor a,
.booking-notes-render a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.booking-notes__editor > :last-child,
.booking-notes-render > :last-child {
  margin-bottom: 0;
}
.booking-notes__files {
  padding: 0 20px 12px;
  display: grid;
  gap: 7px;
}
.booking-notes__file {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--line, #d8dcdf);
  background: var(--bg, #fafbfb);
  border-radius: 4px;
  padding: 10px 12px;
}
.booking-notes__file > svg {
  width: 23px;
  height: 23px;
  color: var(--muted, #687078);
}
.booking-notes__file-identity {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 3px;
}
.booking-notes__filename {
  color: inherit;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
button.booking-notes__filename {
  padding: 0;
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.booking-notes__file-meta {
  font-size: 11px;
  color: var(--muted, #687078);
}
.booking-notes__remove:hover {
  color: #c13238;
  border-color: currentColor;
}
.booking-notes__footer {
  display: flex;
  justify-content: space-between;
  padding: 9px 14px;
  border-top: 1px solid var(--line, #d8dcdf);
}
.booking-notes__chooser {
  position: relative;
}
.booking-notes__attach {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  padding: 6px 5px;
}
.booking-notes__attach::-webkit-details-marker {
  display: none;
}
.booking-notes__choices {
  position: absolute;
  z-index: 5;
  left: 0;
  bottom: calc(100% + 14px);
  min-width: 245px;
  border: 1px solid var(--line-strong, #b9bfc4);
  border-radius: 4px;
  padding: 16px;
  background: var(--panel, #fff);
  box-shadow: 0 5px 18px #0002;
}
.booking-notes__limits {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
}
.booking-notes__types {
  margin: 0 0 16px;
  font-size: 12px;
  color: var(--muted, #687078);
}
.booking-notes__error {
  margin: 0;
  padding: 0 20px;
  color: #bd2f37;
  font-size: 13px;
}
.booking-notes__error:not(:empty) {
  padding-bottom: 12px;
}
.booking-notes__uploading {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.booking-notes__uploading::before {
  content: "";
  width: 12px;
  height: 12px;
  border: 2px solid var(--line, #d8dcdf);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: booking-upload 0.8s linear infinite;
}
.booking-notes-render {
  line-height: 1.65;
  overflow-wrap: anywhere;
  max-height: 420px;
  overflow: auto;
  padding: 14px 0;
}
.lab-booking-notes .booking-notes__files {
  padding: 0 0 14px;
}
@keyframes booking-upload {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .booking-notes__uploading::before {
    animation: none;
  }
}
@media (max-width: 580px) {
  .booking-notes__format {
    padding: 7px;
    gap: 4px;
  }
  .booking-notes__editor {
    padding: 16px;
  }
  .booking-notes__group {
    padding-left: 4px;
  }
  .booking-notes__styles {
    width: 116px;
  }
  .booking-notes__tool {
    width: 30px;
  }
}

.booking-notes__failed {
  font-size: 12px;
  color: #bd2f37;
}

/* Notes open above the booking list, preserving the card and scroll position. */
.lab-booking-notes-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.lab-booking-notes-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lab-booking-file-count {
  border-left: 1px solid var(--line-strong);
  padding-left: 7px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.lab-booking-notes-dialog .lab-v2-dialog-body {
  display: block;
  padding: 22px 24px;
}
.lab-booking-notes-dialog .lab-booking-note-title {
  margin: 0 0 16px;
}
.lab-booking-notes-dialog .booking-notes-render {
  max-height: none;
  overflow: visible;
  padding: 0;
}
.lab-booking-note-files {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.lab-booking-note-files h3 {
  margin: 0 0 12px !important;
}
.lab-booking-note-files .booking-notes__files {
  padding: 0;
}

/* Founder-approved Lab Bookings design, 12 November 2026. */
.lab-booking-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.lab-bookings .ws-btn:has(> .lab-booking-icon) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.lab-bookings .lab-booking-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(240px, 1.4fr);
  padding: 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.lab-booking-date-filter {
  display: flex;
  gap: 8px;
  align-items: end;
  min-width: 0;
}
.lab-booking-date-filter > .lab-v2-field {
  flex: 1;
}
.lab-booking-date-filter > button {
  flex-shrink: 0;
}
.lab-bookings .lab-booking-card {
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 0 20px;
  padding: 20px 0 0;
  border-radius: 4px;
  overflow: hidden;
}
.lab-bookings .lab-booking-date {
  align-self: start;
  padding: 0;
  margin-left: 20px;
  width: 76px;
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
  text-align: center;
}
.lab-booking-date > span {
  display: block;
  padding: 6px 2px;
  background: #ffdb00;
  color: #15171a;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}
.lab-bookings .lab-booking-date > strong {
  display: block;
  padding: 12px 4px;
  font-size: 32px;
  line-height: 1.2;
}
.lab-bookings .lab-booking-details {
  border: 0;
  padding: 0 20px 20px 20px;
  min-width: 0;
}
.lab-bookings .lab-booking-title {
  align-items: start;
  margin-bottom: 16px;
}
.lab-bookings .lab-booking-title h3 {
  font-size: 16px;
  line-height: 1.45;
}
.lab-bookings .lab-booking-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 0;
  border-radius: 3px;
  font-size: 12px;
  flex-shrink: 0;
}
.lab-booking-status.status-approved {
  color: #187f39;
  background: #e4f0e8;
}
.lab-booking-status.status-pending {
  color: #705700;
  background: #fff3ca;
}
.lab-booking-status:is(.status-cancelled, .status-withdrawn, .status-declined) {
  background: var(--bg-subtle);
  color: var(--muted);
}
[data-theme="dark"] .lab-booking-status.status-approved {
  color: #8cd8a3;
  background: #203c2e;
}
[data-theme="dark"] .lab-booking-status.status-pending {
  color: #f3d985;
  background: #453e24;
}
.lab-bookings .lab-booking-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 18px;
}
.lab-booking-facts dt {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 7px;
}
.lab-booking-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.lab-booking-card-footer {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  background: var(--bg);
  border-top: 1px solid var(--line);
}
.lab-booking-card-footer .lab-booking-actions {
  margin: 0;
  flex-wrap: wrap;
}
.lab-bookings .lab-booking-cancel {
  border-color: transparent;
  background: transparent;
}
.lab-booking-card-footer .lab-booking-file-count {
  color: inherit;
  border-color: currentColor;
}
.lab-bookings .lab-v2-footer button:disabled {
  opacity: 1;
  color: var(--muted);
  background: var(--bg-subtle);
  border-color: transparent;
}
.lab-booking-editor .lab-booking-body {
  padding: 0 !important;
}
.lab-bookings .lab-booking-editor > .lab-booking-editor-head {
  background: var(--lab-dialog-head,#e3e7ea);
  padding: 14px 24px !important;
  min-height: 60px !important;
}
.lab-booking-editor-head h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 16px !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  color: var(--text) !important;
}
.lab-booking-editor-head h2 > svg,
.lab-booking-read-dialog > .lab-v2-head h2 > svg {
  width: 18px;
  height: 18px;
  padding: 0;
  box-sizing: border-box;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
}
.lab-booking-required-key {
  color: var(--muted);
  font-size: 12px;
}
.lab-booking-required {
  color: #b52d36;
}
.lab-booking-required-key .lab-booking-required {
  color: var(--danger);
}
.lab-booking-editor .lab-booking-form {
  display: grid;
  gap: 20px;
  padding: 20px 24px 24px;
}
.lab-booking-top-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.lab-booking-editor-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg);
  min-width: 0;
}
.lab-booking-editor-section > h3 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}
.lab-booking-section-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 3px;
  background: #ffdb00;
  color: #15171a;
  font-size: 12px;
}
.lab-booking-school-time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
.lab-booking-field-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.lab-booking-editor-section .lab-availability-status {
  margin: -8px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  min-height: 34px;
}
.lab-booking-editor-section .lab-availability-status.is-conflict {
  color: var(--danger);
}
.lab-booking-preparation .lab-booking-equipment-editor {
  padding: 0;
  border: 0;
  margin: 0;
}
.lab-booking-preparation .lab-booking-equipment-editor > h3 {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.lab-booking-preparation
  .lab-booking-equipment-editor
  .lab-v2-field:has(#lab-booking-equipment-search)
  > label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.lab-booking-editor .lab-booking-form-actions {
  justify-content: flex-end;
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.lab-booking-read-dialog {
  width: min(680px, calc(100% - 28px));
}
.lab-booking-read-dialog > .lab-v2-head {
  padding: 14px 24px;
  background: var(--lab-dialog-head,#e3e7ea);
  color: var(--text);
}
.lab-booking-read-dialog > .lab-v2-head h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
}
.lab-booking-read-dialog > .lab-v2-head button {
  background: var(--panel);
  border-color: var(--line-strong);
  color: var(--text);
}
.lab-booking-read-dialog .lab-v2-dialog-body {
  display: block;
  padding: 0;
}
.lab-booking-context {
  padding: 22px 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.lab-booking-context h3 {
  margin: 0 0 14px;
  font-size: 20px;
  overflow-wrap: anywhere;
}
.lab-booking-context-facts {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}
.lab-booking-context-facts > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  overflow-wrap: anywhere;
  min-width: 0;
}
.lab-booking-context-facts svg {
  width: 16px;
  height: 16px;
}
.lab-booking-reading {
  padding: 24px;
  font-size: 15px;
  line-height: 1.65;
}
.lab-booking-reading .booking-notes-render {
  padding: 0;
  max-height: none;
  overflow: visible;
}
.lab-booking-read-dialog .lab-v2-dialog-actions {
  padding: 14px 24px;
  background: var(--bg);
}
.booking-notes__download {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}
.booking-notes__download svg {
  width: 16px;
  height: 16px;
}
.lab-booking-equipment-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.lab-booking-equipment-list > li {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.lab-booking-equipment-list > li span {
  overflow-wrap: anywhere;
}
.lab-booking-equipment-list > li strong {
  flex-shrink: 0;
}
@media (max-width: 1000px) {
  .lab-bookings .lab-booking-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .lab-booking-top-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 650px) {
  .lab-bookings .lab-booking-toolbar {
    grid-template-columns: 1fr;
  }
  .lab-booking-card-footer {
    flex-direction: column;
  }
  .lab-booking-card-footer .lab-booking-actions {
    justify-content: flex-start;
  }
  .lab-bookings .lab-booking-facts {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .lab-bookings .lab-booking-card {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 0 10px;
  }
  .lab-bookings .lab-booking-date {
    width: 58px;
    margin-left: 12px;
  }
  .lab-bookings .lab-booking-details {
    padding-left: 12px;
    padding-right: 12px;
  }
  .lab-bookings .lab-booking-title {
    flex-wrap: wrap;
  }
  .lab-booking-field-pair {
    grid-template-columns: 1fr;
  }
  .lab-booking-editor .lab-booking-form {
    padding: 16px 12px;
    gap: 16px;
  }
  .lab-booking-editor-section {
    padding: 14px;
  }
  .lab-bookings .lab-booking-editor > .lab-booking-editor-head {
    padding: 18px !important;
    flex-wrap: wrap;
  }
  .lab-booking-editor-head h2 {
    font-size: 20px !important;
  }
  .lab-booking-read-dialog > .lab-v2-head {
    padding: 14px;
  }
  .lab-booking-context,
  .lab-booking-reading {
    padding: 18px;
  }
  .booking-notes__file:has(.booking-notes__download) {
    flex-wrap: wrap;
  }
  .booking-notes__download {
    margin-left: auto;
  }
}
.lab-bookings .lab-booking-date {
  display: block;
}
.lab-bookings .lab-booking-title .lab-booking-status {
  margin-left: auto;
}
.lab-bookings
  > .ws-panel.lab-booking-editor
  > .lab-v2-head.lab-booking-editor-head {
  background: var(--lab-dialog-head,#e3e7ea);
}
.lab-v2-dialog.lab-booking-read-dialog .lab-v2-dialog-body {
  display: block;
  padding: 0;
}
.lab-booking-read-dialog .lab-booking-context h3 {
  font-size: 20px;
  margin: 0 0 14px;
}
.lab-booking-editor .ws-input:focus-visible {
  outline:var(--field-focus);
  outline-offset:-2px;
  border-color:var(--accent);
  box-shadow:none;
}
.lab-v2-dialog.lab-booking-read-dialog > .lab-v2-head > .ws-btn {
  background: var(--panel);
  border-color: var(--line-strong);
  color: var(--text);
}
.lab-booking-field-error {
  display: block;
  margin-top: 5px;
  color: var(--danger);
  font-size: 12px;
}
.lab-booking-field-error:empty {
  display: none;
}
@media (max-width: 1200px) { .lab-booking-top-grid { grid-template-columns: 1fr; } }
.lab-booking-reading > .lab-booking-note-files:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.lab-bookings .lab-booking-card-footer .ws-btn { min-height: 32px; padding: 5px 10px; font-size: 13px; }
