/* ================== PERSONS.CSS ==================
   Specific styles for the person detail page
   Keeps structure, readability, and responsive design
==================================================== */


/* ========== CARD BLOCK STYLES ========== */
.card-block[data-type="person"] {
}

.card-block[data-type="parent-family"] {
}

.card-block[data-type="families"] {
}

.card-block[data-type="notes"] {
}

/* ========== HEADERS ========== */
.person-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--color-bg-accent);
    padding: 10px;
    border-radius: 6px;
    box-shadow: 0 2px 4px var(--color-shadow);
    margin-bottom: 10px;
    font-weight: bold;
}

.person-header {
    font-size: 1.8rem;
    color: var(--color-text-personHeader);
}

/* ========== EDIT ICON ========== */
.edit-icon {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin-left: 10px;
}

/* ========== FACT ROWS ========== */
.person-facts .fact-row,
.parent,
.siblings li {
    display: flex;
    gap: 10px;
    margin-bottom: 6px;
}

.label {
    width: 80px;
    font-weight: bold;
    color: var(--color-text-label);
}

/* ========== LISTS ========== */
.person-list {
    list-style: none;
    padding-left: 0;
}

.person-list li {
    display: flex;
    align-items: center;
}

.bullet {
    margin-right: 8px;
    color: var(--color-bullet-default);
}

.person-list-item a {
    font-weight: bold;
    color: var(--color-text-link);
    text-decoration: none;
}

.person-list-item a:hover {
    color: var(--color-text-black);
    text-decoration: underline;
}

/* ========== FAMILY BLOCK ========== */
.family {
  border: 1px solid var(--color-border-light);
  background: linear-gradient(to bottom right, #fdfdfd, #f3f7ff);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 24px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s ease;
}

.family:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.familyHeader {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  background-color: var(--color-bg-secondary);
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 14px;
  color: var(--color-text-dark);
  gap: 10px;
}

.familyHeader a {
  font-weight: normal;
  color: var(--color-text-link);
}

.familyHeader a:hover {
  text-decoration: underline;
}

.familyHeader .familyLabel {
  flex: 0 0 auto;
  font-weight: bold;
  margin-right: 10px;
  white-space: nowrap;
}

.familyHeader .spouseInfo {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-weight: normal;
  flex: 1 1 auto;
}

.familyHeader .spouseInfo a {
  font-weight: bold;
  color: var(--color-text-link);
}

.familyHeader .spouseInfo .spouseDates {
  font-style: italic;
  color: var(--color-text-generation);
}

.familyHeader .ancestorFlag {
  white-space: nowrap;
  font-weight: bold;
}

.familyHeader .edit-icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  cursor: pointer;
  margin-left: auto;
}

.children .person-list {
  padding-left: 10px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px; /* 👈 this adds space between children */
}

.children .person-list li {
  padding: 8px 12px;
  background-color: var(--color-bg-hover);
  border-left: 4px solid var(--color-border-light);
  border-radius: 6px;
}

/* ========== NOTES ========== */
.notes-content {
    line-height: 1.4;
}

.noteTxt {
    background-color: var(--color-bg-noteText);
    padding: 10px;
    border-left: 3px solid var(--color-border-light);
    border-radius: 4px;
    white-space: pre-wrap;
}


/* ========== CLICKABLE ELEMENTS ========== */
.clickeable {
    cursor: pointer;
    color: var(--color-text-link);
}

.clickeable:hover {
    text-decoration: underline;
}

/* ========== RESPONSIVE IMAGES ========== */
img {
    max-width: 100%;
    height: auto;
} 

/* Ensure edit icons use class */
img[editobject] {
    class: edit-icon;
}  

#contentCell {
    background-color: var(--color-bg-light);
  }
  

/* Grundutseende för person-/händelse-block */
.personNoteHTML, .event, .reason-adled {
  background: #fdfdfd;
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 1.2em;
  margin: 1.5em 0;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.1);
  font-family: "Georgia", "Times New Roman", serif;
  line-height: 1.6;
}

/* Rubriker */
.personNoteHTML h2, .event h2, .reason-adled h2 {
  margin-top: 0;
  font-size: 1.6em;
  color: #2c3e50;
  border-bottom: 2px solid #ccc;
  padding-bottom: 0.2em;
}

.person h3, .event h3, .reason-adled h3 {
  margin-top: 1em;
  font-size: 1.2em;
  color: #34495e;
}

/* Listor */
.personNoteHTML ul, .personNoteHTML ol,
.event ul, .event ol,
.reason-adled ul, .reason-adled ol {
  margin-left: 1.2em;
  padding-left: 0.8em;
}

.personNoteHTML li, .event li, .reason-adled li {
  margin: 0.3em 0;
}

/* Källor */
.personNoteHTML em, .event em, .reason-adled em {
  font-size: 0.9em;
  color: #555;
  display: block;
  margin-top: 0.4em;
}

/* Extra: snygga citat */
.personNoteHTML blockquote, .event blockquote {
  border-left: 3px solid #bbb;
  margin: 0.8em 0;
  padding-left: 0.8em;
  font-style: italic;
  color: #444;
}