:root {
  --sidebar-width: 175px;
}

.tree-body {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  transition: margin-right 0.5s ease;
}

.center-all {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.tree {
  width: 100vw;
  height: 100vh;
  overflow: auto;
}

/* Fonts */
.lateef-extralight {
  font-family: "Lateef", serif;
  font-weight: 200;
  font-style: normal;
}

.lateef-light {
  font-family: "Lateef", serif;
  font-weight: 300;
  font-style: normal;
}

.lateef-regular {
  font-family: "Lateef", serif;
  font-weight: 400;
  font-style: normal;
}

.lateef-medium {
  font-family: "Lateef", serif;
  font-weight: 500;
  font-style: normal;
}

.lateef-semibold {
  font-family: "Lateef", serif;
  font-weight: 600;
  font-style: normal;
}

.lateef-bold {
  font-family: "Lateef", serif;
  font-weight: 700;
  font-style: normal;
}

.lateef-extrabold {
  font-family: "Lateef", serif;
  font-weight: 800;
  font-style: normal;
}



.align-right {
  justify-self: right
}

body {
  color: black;
  background-color: burlywood;
  font-family: "Lateef", serif;
  font-weight: 400;
  font-style: normal;
  font-size: large;
}

.svg-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: -1;
}

.connector {
  fill: none;
  stroke-width: 3px;
}

path.blood-parent {
  stroke: #4a3b2c;
}

path.milk-parent {
  stroke: #eee3d9;
  /* stroke: red; */
}

.tree {
  list-style-type: none;
  width: 100vw;
  height: 100vh;
  overflow: auto;
  margin: 0;
}

.person {
  padding: 8px 16px;
  display: flex;
  flex-direction: row;
  align-items: center;

}

.children {
  list-style-type: none;
  display: none;
  flex-direction: column;
  padding: 200px;
  gap: 30px;
  margin: 0;
  align-items: flex-start;
}

.children.open {
  display: flex;
}

.button-group {
  position: relative;
  display: flex;
  gap: 5px;
  padding: 5px;
  background-color: #835E2F;
  border-radius: 16px;
}

.modal {
  /* flex-direction: column; */
  border: 2px;
  border-width: 10px;
  border-color: rgb(131, 94, 47);
  border-style: solid;
  border-radius: 15px;
  background-color: rgb(209, 160, 97);
  width: 50vw;
  height: 50vh;
}

.input-pill {
  display: inline-block;
  border: solid 3px black;
  padding-left: 4px;
  padding-right: 4px;
  margin: 4px;
  animation: added-pill 0.25s linear;
}

@keyframes added-pill {
  0% {
    transform: scale(2);
  }

  100% {
    transform: scale(1);
  }
}

.input {
  margin-bottom: 5px;
  padding: 3px
}

.modal[open] {
  display: flex;
  flex-direction: column;
}

.edit-buttons,
.mode-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.edit-buttons>button,
.remove-modal,
.share-modal,
.edit-mode {
  padding: 10px;
  font-size: large;
  background-color: #c09359;
  border-color: #835E2F;
  border-width: 5px;
  border-style: solid;
  border-radius: 15px;
}

.edit-mode {
  margin-bottom: 10px;
}

.edit-form {
  display: flex;
  flex-direction: column;
}

.edit-form,
.add-offspring-form,
.add-spouses-form,
.add-father-form {
  display: none;
}

.modal:not([data-mode="view"]) .info {
  display: none;
}

.modal[data-mode="view"] .edit-buttons {
  display: none;
}

.modal:not([data-mode="view"]) .edit-mode .text-edit {
  display: none;
}

.modal[data-mode="view"] .edit-mode .text-return {
  display: none;
}

.modal[data-mode="edit-details"] .edit-form {
  display: block;
}

.modal[data-mode="add-offspring"] .add-offspring-form {
  display: block;
}

.modal[data-mode="add-spouses"] .add-spouses-form {
  display: block;
}

.modal[data-mode="add-father"] .add-father-form {
  display: block;
}

@media (min-width:960px) {

  .edit-buttons,
  .mode-buttons {
    display: block;
    margin-bottom: 5px;
  }
}

.show-modal {
  padding: 8px 16px;
  justify-self: right;
  background-color: rgb(179, 137, 83);
  border-color: rgb(131, 94, 47);
  /* border-width: 3px; */
  border-radius: 15px;
  border-style: solid;
}

.show-modal:hover {
  background-color: rgb(197, 150, 88);
}

.show-modal:active {
  background-color: rgb(131, 94, 47);
}

.highlight-glow {
  animation: pulse-glow 1s ease-in-out infinite;
}

@keyframes pulse-glow {
  0% {
    box-shadow: 0 0 0px rgba(52, 152, 219, 0);
  }

  50% {
    box-shadow: 0 0 25px 8px rgba(52, 152, 219, 0.8);
  }

  100% {
    box-shadow: 0 0 0px rgba(52, 152, 219, 0);
  }
}

/* .highlight-glow {
  position: relative;
}

.highlight-glow::after {
  content: '';
  position: absolute;

  width: 10px;
  height: 10px;
  border-radius: 50%;

  background-color: #3498db;
  box-shadow: 0 0 10px 0px #3498db;

  z-index: 10;

  offset-path: inset(-5px round 15px);

  animation:
    pulse-glow 1.5s ease-in-out infinite,
    fade-out-glow 1s ease-in-out 2s forwards;
}

@keyframes pulse-glow {
  0% {
    offset-distance: 0%;
  }

  100% {
    offset-distance: 100%;
  }
}

@keyframes fade-out-glow {
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
} */

.expand-children {
  width: 30px;
  padding: 5px 5px;
  justify-self: right;
  background-color: rgb(179, 137, 83);
  border-color: rgb(131, 94, 47);
  /* border-width: 3px; */
  border-radius: 10px;
  border-style: solid;
}

.expand-children:hover {
  background-color: rgb(197, 150, 88);
}

.expand-children:active {
  background-color: rgb(131, 94, 47);
}

.hide-modal {
  justify-self: right
}

.edit {
  justify-self: right;
}

.name {
  text-shadow: 10px;
}

.edit-name {
  text-shadow: 10px;
}

.error-message {
  color: red;
  margin-top: 4px;
}

.autocomplete-wrapper {
  width: 250px;
  position: relative
}

.suggestions {
  list-style: none;
  padding: 0;
  margin: 0;
  position: absolute;
  width: 100%;
  background: white;
  max-height: 150px;
  overflow-y: auto;
  overflow-x: hidden;
  font-size: medium;
  border-radius: 5px;
}

.suggestions li {
  box-sizing: border-box;
  padding: 8px;
  overflow-x: hidden;
}

.suggestions li:hover,
.suggestions li.active-item {
  background: #eee;
  cursor: pointer;
}

.name-search {
  display: inline-block;
  position: relative;
}

.name-search-input {
  padding: 5px;
}

.name-search-input.warning-message::placeholder{
 color: red;
}

.news-title{
  margin-bottom: 10px;
}
.news-title > input{
  padding: 5px;
}

.news-wrapper {
  display: grid;
  /* grid-template-columns: repeat(7, 150px); */
  /* grid-template-columns: 1fr 0.5fr 1fr 0.5fr 1fr 0.5fr 1fr; */
  /* grid-template-columns: repeat(4, 0.24fr) 0.5fr 0.33fr 1fr; */
  /* grid-template-columns: repeat(7, max-content); */
  gap: 0px;
  grid-auto-rows: minmax(10px, auto);
  user-select: none;
  grid-template-areas:
    "category   news-radio  event-date   ."
    "immediate  event-radio publish-news button"
    "pub-date   .           .            .";
}
.news-wrapper > div {
  margin-right: 20px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
/* .news-wrapper > div:last-child{
  margin-right: 10px;
} */
.news-wrapper > div:nth-child(1) { grid-area: category; margin-right: 0px; justify-content:start}
.news-wrapper > div:nth-child(2) { grid-area: immediate; margin-right: 0px; justify-content:start}
.news-wrapper > div:nth-child(3) { grid-area: news-radio; }
.news-wrapper > div:nth-child(4) { grid-area: event-radio; }
.news-wrapper > div:nth-child(5) { grid-area: event-date; }
.news-wrapper > div:nth-child(6) { grid-area: publish-news;  justify-content:start}
.news-wrapper > div:nth-child(7) { grid-area: pub-date; margin-right: 0px; }
.news-wrapper > div:nth-child(8) { grid-area: button; }
.news-wrapper>label:not(#category-label):not(#immediate-news-label),

.news-creation-dialog{
 user-select: none; 
}

.news-creation-dialog[data-immediate-publication="true"] .publication-date {
  display: none;
}

.news-creation-dialog[data-news="true"] .event-date {
  display: none;
}

.news-creation-content{
  margin-bottom: 10px;
}

.news-creation-dialog[data-view="marriage"] .news-creation-content > div:not([data-view="marriage"]) {
  display: none;
}

.news-creation-dialog[data-view="birth"] .news-creation-content > div:not([data-view="birth"]) {
  display: none;
}

.news-creation-dialog[data-view="graduation"] .news-creation-content > div:not([data-view="graduation"]) {
  display: none;
}

.news-creation-dialog[data-view="promotion"] .news-creation-content > div:not([data-view="promotion"]) {
  display: none;
}

.news-creation-dialog[data-view="appointment"] .news-creation-content > div:not([data-view="appointment"]) {
  display: none;
}

.news-creation-dialog[data-view="new residence"] .news-creation-content > div:not([data-view="new residence"]) {
  display: none;
}

.news-creation-dialog[data-view="death"] .news-creation-content > div:not([data-view="death"]) {
  display: none;
}

.news-creation-dialog[data-view="general"] .news-creation-content > div:not([data-view="general"]) {
  display: none;
}


.form-actions {
  grid-column: span 1;
}

.news {
  display: flex;
  align-items: center;
  flex-direction: column;
  background: #3AB67D;
  border: 10px solid #A2E494;
  width: 75%;
  min-height: 300px;
  border-radius: 15px;
  margin-top: 20px;
}

.news h1 {
  margin-bottom: 0px
}

.news h2 {
  margin-top: 0px;
  margin-bottom: 0px;
  align-self: flex-start;
}

.news h3 {
  margin-top: 0px;
  margin-bottom: 0px;
  align-self: flex-start;
}

.news div {
  display: block;
  width: 100%;
  margin-top: 20px;
}

.news div img {
  height: 100px;
  float: left;
  margin-right: 15px;
  margin-left: 15px;
  margin-bottom: 10px;
}

.news div p {
  margin-right: 15px;
  margin-left: 15px;
  font-size: larger;
}

.info {
  border-color: red;
}

.edit-image {
  width: 100px;
}

.submit {
  padding: 10px;
  font-size: large;
  background-color: #c09359;
  border-color: #835E2F;
  border-width: 5px;
  border-style: solid;
  border-radius: 15px;
}

.alert {
  padding: 20px;
  background-color: #ff9900;
  /* Red */
  color: white;
  margin-bottom: 15px;
  top: 0;
  left: 0;
  width: 100%;
}

.closebtn {
  margin-left: 15px;
  color: white;
  font-weight: bold;
  float: right;
  font-size: 22px;
  line-height: 20px;
  cursor: pointer;
  transition: 0.3s;
}

.closebtn:hover {
  color: black;
}

.login,
.register {
  display: flex;
  flex-direction: column;
}

.sidebar {
  height: 100%;
  width: var(--sidebar-width);
  position: fixed;
  display: flex;
  flex-direction: column;
  z-index: 1;
  top: 0;
  right: 0;
  background-color: #111;
  /* overflow-x: hidden; */
  transform: translateX(100%);
  transition: 0.5s ease;
  padding-top: 60px;
}

.rotation-modal {
  border: 0;
  flex-direction: column;
  width: 75%;
  height: 75%;
  justify-content: center;
}

.rotation-modal h2 {
  text-align: center;
}

.rotation-modal[open] {
  display: flex;
}

.rotation {
  position: relative;
  display: flex;
  top: 0;
  left: 0;
  font-size: 50px;
  align-self: center;
  /* transform: rotate(360deg); */
  /* transition: 1.5s linear; */
  transition: color 0.4s ease, transform 0.4s ease;
}

.rotation[data-status="loading"] {
  animation: rotate-circle 1.5s infinite;
}

.rotation[data-status="success"] {
  color: green;
  animation: pop-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.rotation[data-status="failure"] {
  color: red;
  animation: shake 0.4s ease-in-out;
}

.warning-shake {
  /* color: red; */
  animation: shake 0.4s ease-in-out;
}

@keyframes pop-in {
  0% {
    transform: scale(0);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-5px);
  }

  75% {
    transform: translateX(5px);
  }
}

@keyframes rotate-circle {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}


.sidebar a {
  color: white;
  text-decoration: none;
  font-size: x-large;
  padding-right: 15px;
}

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

body.sidebar-open {
  margin-right: var(--sidebar-width);
}

body.sidebar-open .sidebar {
  transform: translateX(0);
}

.name-autocomplete {
  list-style: none;
  padding: 0;
  margin: 0;
  position: absolute;
  width: 100%;
  border: 1px solid #ccc;
  display: none;
  background: white;
  max-height: 150px;
  overflow-y: auto;
}

.open-sidebar {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 11;
  background-color: rgb(225, 153, 58);
  border-color: rgb(153, 88, 2);
  gap: 5px;
  padding: 5px;
  border-radius: 7px;
}

.open-sidebar:hover {
  background-color: rgb(188, 123, 38);
}

.open-sidebar:active {
  background-color: rgb(153, 88, 2);
}

toast-notification {
  inset: auto;
  border: none;
  background: transparent;
  overflow: visible;
  pointer-events: none;
  min-width: 250px;
  color: black;
  background-color: white;
  text-align: center;
  border-radius: 8px;
  padding: 16px;
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: -100px;
  opacity: 0;
  transition: opacity 0.3s ease, bottom 0s 0.3s;
}

toast-notification.show {
  pointer-events: auto;
  opacity: 1;
  bottom: 50px;
  transition: opacity 0.3s ease, bottom 0.3s ease;
}

toast-notification.toast-alert {
  color: white;
  background-color: red;
}

.hidden {
  display: none;
}