/* Standard typed notes — shared (Shipment Detail pattern) */

.ld-notes-panel {
  width: 100%;
}

.ld-notes-sheet {
  border: 2px solid #1e293b;
  background: #fff;
  font-size: 13px;
}

.ld-notes-sheet-head,
.ld-notes-foot-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  border-bottom: 1px solid #94a3b8;
}

.ld-notes-sheet-head {
  font-weight: 800;
  background: #f1f5f9;
}

.ld-notes-col-type,
.ld-notes-foot-label {
  padding: 8px 10px;
  border-right: 1px solid #94a3b8;
  font-weight: 800;
  color: #1e293b;
}

.ld-notes-col-body,
.ld-notes-foot-value {
  padding: 8px 10px;
}

.ld-notes-sheet-main {
  display: grid;
  grid-template-columns: 140px 1fr;
  min-height: 320px;
  border-bottom: 1px solid #94a3b8;
}

.ld-notes-types {
  display: flex;
  flex-direction: column;
  border-right: 1px solid #94a3b8;
  background: #fafafa;
}

.ld-notes-types-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  padding: 6px 8px;
  border-bottom: 1px solid #cbd5e1;
  background: #f1f5f9;
  font-size: 10px;
  font-weight: 700;
  color: #475569;
}

.ld-notes-types-toolbar-label {
  flex: 1 1 100%;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.ld-notes-type-row {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid #e2e8f0;
}

.ld-notes-type-view {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  margin: 0;
  border-right: 1px solid #e2e8f0;
  background: #fff;
  cursor: pointer;
}

.ld-notes-type-view input {
  margin: 0;
  cursor: pointer;
}

.ld-notes-type-btn {
  flex: 1 1 auto;
  text-align: left;
  padding: 7px 10px;
  border: none;
  border-bottom: 1px solid #e2e8f0;
  background: transparent;
  font: inherit;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
}

.ld-notes-type-btn:hover {
  background: #e2e8f0;
}

.ld-notes-type-btn.is-active {
  background: #dbeafe;
  color: #1d4ed8;
}

.ld-notes-log-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 10px 12px;
  gap: 10px;
}

.ld-notes-view-lead {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
}

.ld-notes-compose {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ld-notes-compose-input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid #94a3b8;
  font: inherit;
  resize: vertical;
}

.ld-notes-append-btn {
  align-self: flex-start;
}

.ld-notes-entries {
  flex: 1;
  overflow-y: auto;
  max-height: 360px;
  border: 1px solid #cbd5e1;
  background: #fff;
  padding: 8px 10px;
}

.ld-notes-entry {
  border-bottom: 1px solid #e2e8f0;
  padding: 8px 0;
}

.ld-notes-entry:last-child {
  border-bottom: none;
}

.ld-notes-entry-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 4px;
}

.ld-notes-entry-type {
  padding: 1px 6px;
  border-radius: 3px;
  background: #dbeafe;
  color: #1d4ed8;
}

.ld-notes-entry-vis {
  margin-left: auto;
  padding: 1px 6px;
  border-radius: 3px;
  background: #e2e8f0;
}

.ld-notes-entry-text {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.45;
  color: #1e293b;
}

.ld-notes-empty {
  margin: 0;
  font-size: 12px;
}

.ld-notes-sheet-foot .ld-notes-foot-row:last-child {
  border-bottom: none;
}

.ld-notes-type-hint {
  font-size: 11px;
  margin-left: 6px;
}

.ld-notes-action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ld-notes-visibility,
.ld-notes-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
}

.ld-notes-actions .ld-notes-type-hint {
  margin-right: 4px;
}

.ld-notes-vis-opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 900px) {
  .ld-notes-sheet-head,
  .ld-notes-foot-row,
  .ld-notes-sheet-main {
    grid-template-columns: 1fr;
  }

  .ld-notes-col-type,
  .ld-notes-foot-label {
    border-right: none;
    border-bottom: 1px solid #94a3b8;
  }

  .ld-notes-types {
    flex-direction: row;
    flex-wrap: wrap;
    border-right: none;
    border-bottom: 1px solid #94a3b8;
  }

  .ld-notes-type-btn {
    width: auto;
    border-bottom: none;
    border-right: 1px solid #e2e8f0;
  }
}
