/* ===== Modal shell ===== */
.alf-record .modal-content{
  border-radius:16px;
  box-shadow:0 18px 50px rgba(0,0,0,.25);
  border:0;
}
.alf-record .modal-header, 
.alf-record .modal-footer{ border:0; }

/* ===== Form area ===== */
.alf-record .entity-form{
  background:#f9fbff;
  border:1px solid #e6e9f2;
  border-radius:12px;
  padding:18px;
}
.alf-record .entity-form .section-title,
.alf-record .entity-form h3{
  font-size:1rem;
  font-weight:700;
  color:#0a2b57;
  border-bottom:2px solid #edf0f7;
  padding-bottom:6px;
  margin-bottom:12px;
}
.alf-record .entity-form .form-group{ margin-bottom:12px; }
.alf-record .entity-form label{ font-weight:600; color:#1e2a3a; }
.alf-record .entity-form input[type=text],
.alf-record .entity-form select,
.alf-record .entity-form textarea{
  border-radius:10px !important;
  border:1px solid #d8deea !important;
  padding:.6rem .8rem !important;
  background:#fff !important;
}
.alf-record .entity-form textarea{ min-height:110px; }

/* ===== Notes block (a.k.a. Notes Wall / Annotations) ===== */
.alf-record .notesWall,
.alf-record #notesWallContainer{
  background:#fff;
  border:1px dashed #cbd5e1;
  border-radius:12px;
  padding:14px;
  margin-top:10px;
}

/* Empty state */
.alf-record .notesWall .noNotes,
.alf-record #notesWallContainer .noNotes{
  background:#fff7d6;
  color:#7a5b00;
  border:1px solid #f1e2a6;
  border-radius:8px;
  padding:10px 12px;
}

/* Single note panel */
.alf-record .note,
.alf-record .annotation{
  border:1px solid #e6e9f2;
  border-radius:10px;
  padding:12px;
  margin-bottom:10px;
  background:#ffffff;
}
.alf-record .note .header,
.alf-record .annotation .header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:8px;
  font-weight:600;
  color:#0a2b57;
}
.alf-record .note .body,
.alf-record .annotation .body{
  color:#24324a;
}

/* Attachment list inside a note */
.alf-record .note .attachment,
.alf-record .annotation .attachment{
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 10px;
  border:1px solid #e6e9f2;
  border-radius:8px;
  background:#fff;
  margin-top:6px;
}

/* Add note / buttons */
.alf-record .notesWall .btn,
.alf-record .addNote{
  background:#0a2b57 !important;
  color:#fff !important;
  border-radius:10px !important;
  border:0 !important;
  padding:.45rem .9rem !important;
}
.alf-record .notesWall .btn:hover{ filter:brightness(1.12); }

/* Upload area (if the attachment dropzone is visible) */
.alf-record #notesWallAttachment,
.alf-record .attach-file{
  border:2px dashed #cbd5e1;
  border-radius:12px;
  background:#fbfdff;
  padding:16px;
  text-align:center;
  transition:border-color .25s ease;
}
.alf-record #notesWallAttachment:hover,
.alf-record .attach-file:hover{
  border-color:#0a2b57;
}

/* Submit area */
.alf-record button[type=submit].btn-primary{
  background:#0f5bd2;
  border:0;
  border-radius:10px;
  padding:.55rem 1rem;
}
.alf-record button[type=submit].btn-primary:hover{ filter:brightness(1.08); }


/* Make the notes area breathe */
.alf-record .notesWall,
.alf-record #notesWallContainer{
  padding:16px;
}

/* Bigger editor textarea when adding a note */
.alf-record .notesWall textarea,
.alf-record textarea[name="notetext"],
.alf-record .annotation textarea{
  min-height: 200px !important;   /* increase height */
  line-height: 1.4;
  font-size: 0.98rem;
  border-radius: 10px !important;
}

/* Show full note content (no clipping) */
.alf-record .note .body,
.alf-record .annotation .body{
  white-space: pre-wrap;           /* keep new lines */
  word-break: break-word;          /* avoid overflow on long strings */
  max-height: none !important;     /* remove any truncation */
  font-size: 0.98rem;
  line-height: 1.45;
}

/* Widen the single note “card” a bit and make it feel spacious */
.alf-record .note,
.alf-record .annotation{
  width: 100%;
  padding: 14px;
  border-radius: 12px;
}

/* Make note container look like a card */
div.notes {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

/* Metadata (time, user) styling */
div.notes .metadata, 
div.notes .createdby {
  font-size: 0.85rem;
  color: #6b7280; /* muted grey */
  margin-bottom: 6px;
}

/* Expand note text block */
div.notes .content {
  font-size: 1rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: none !important; /* remove truncation */
  margin-bottom: 10px;
}

/* File attachment styling */
div.notes .content a,
div.notes .content .file {
  display: inline-block;
  padding: 6px 10px;
  background: #f9fafb;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.9rem;
  text-decoration: none;
  margin-top: 6px;
}

/* Add Note button */
.addNote, 
div.notes .btn {
  background: #0a2b57 !important;
  color: #fff !important;
  border-radius: 10px !important;
  padding: .45rem .9rem !important;
  border: none !important;
  font-weight: 500;
}

/* Make the record modal itself a bit wider (optional) */
.alf-record .modal-dialog { max-width: 1100px; }

/* Widen the content vs metadata inside each note */
.alf-record div.notes .col-md-3 { flex: 0 0 20%; max-width: 20%; }
.alf-record div.notes .col-md-9 { flex: 0 0 80%; max-width: 80%; }

/* Ensure the text uses the full content width */
.alf-record div.notes .content { width: 100%; white-space: pre-wrap; word-break: break-word; }
.alf-record div.notes textarea { width: 100% !important; }
