* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  width: 100%;
  font: 1em/1.4em;
}

body {
  display: flex;
  flex-direction: column;
  background-color: #f7f7f7;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 10px;
  padding-bottom: 20px;
}

/*******************************************************************************
Navigation Bar
*******************************************************************************/
.hamburger {
  display: flex;
}
@media (min-width: 576px) {
  nav {
    display: flex !important;
  }
}
nav, .hamburger {
  flex-direction: row;
  width: 100%;
  background-color: #333;
  z-index: 9999;
}
nav a, .hamburger {
  display: flex;
  flex-wrap: wrap;
  color: white;
  text-align: center;
  font-weight: bold;
  padding: 14px 16px;
  text-decoration: none;
  align-items: center;
  justify-content: center;
}
nav ul {
  display: flex;
  list-style: none;
  color: white;
  margin: 0;
  padding: 0;
  background-color: #333;
  width: 100%;
}
nav li {
  position: relative;
}
.hamburger {
  display: none;
}
nav li a:hover {
  background-color: #28b463;
  text-decoration: underline;
}
.active a{
  background-color: #6f948d;
}
.submenu li {
  display: none;
  position: relative;
}
.submenu, .submenu-2 {
  display: flex;
  flex-direction: column;
  position: absolute;
  width: 100%;
  background-color: #333;
}
.submenu-2 {
  top: 0px;
  left: 100%;
}
.submenu-2 li {
  display: none;
}
@media (min-width: 575px) {
  .submenu-2 li {
    font-size: 0.9em;
  }
  .submenu a {
    background-color: rgb(71, 71, 71);
  }
  .submenu-2 a {
    background-color: rgb(90, 90, 90);
  }
  /* Hover for Computer */
  nav li:hover .submenu {
    border: 1px solid black;
  }
  .submenu li:hover .submenu-2 {
    border-top: 1px solid black;
    border-bottom: 1px solid black;
  }
  .submenu li:hover .submenu-2 li {
    border-left: 1px solid black;
    border-right: 1px solid black;
  }
  nav li:hover .submenu {
    border-top: none;
  }
  .submenu li:hover .submenu-2 li:first-child {
    border-left: none;
  }
  nav li:hover .submenu > li {
    display: block;
  }
  .submenu li:hover .submenu-2 li {
    display: block;
  }
}
.left {
  margin-left: auto;
}
a i {
  padding-right: 5px;
}
.nolink:hover {
  background-color: unset;
  text-decoration: none;
}
/*******************************************************************************
Form
*******************************************************************************/
#login {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-weight: bold;
  border-radius: 10px;
  margin-top: 30px;
  background-color: #d9d9d9;
  padding: 15px;
  width: 350px;
}

#login label {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 5px;
}

#login input[type=text], #login input[type=password] {
  width: 100%;
  height: 40px;
  margin-bottom: 20px;
  padding: 10px;
  border: none;
  border-radius: 5px;
  outline: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#login input[type=submit] {
  width: 100%;
  height: 40px;
  background-color: #4285f4;
  color: #fff;
  font-weight: bold;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

#login input[type=submit]:hover {
  background-color: #3367d6;
}

.invalid {
  border: 2px solid red !important;
}

.tooltip {
  position: relative;
  width: 100%;
  padding: 5px;
  border-radius: 5px;
  z-index: 9999;
  margin-bottom: 20px;
  text-align: center;
}
/*******************************************************************************
Copy Button
*******************************************************************************/
.copy-button {
  background-color: #4caf50;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  position: absolute;
  top: 65px;
  right: 5vw;
  z-index: 99;
}

.copy-button:hover {
  background-color: #45a049;
}

.popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #4CAF50;
  border: 2px solid #2E7D32;
  color: #fff;
  padding: 20px;
  border-radius: 5px;
  z-index: 9999;
}

.popup-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 9998;
}
/*******************************************************************************
Main Content or Messages
*******************************************************************************/
xmp {
  white-space: pre-wrap;
  max-width: 90vw;
  background-color: #f2f2f2;
  padding: 10px;
  border-radius: 5px;
  font-family: monospace;
  overflow-x: scroll;
  position: relative;
}

.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 2px solid #f5c6cb;
  padding: 10px;
  border-radius: 5px;
  font-weight: bold;
  margin-bottom: 20px;
}

.info {
  background-color: #4CAF50;
  color: #fff;
  border: 2px solid #2E7D32;
  padding: 10px;
  border-radius: 5px;
  font-weight: bold;
  margin-bottom: 20px;
}

.hidden {
  display: none;
}
/*******************************************************************************
Ansicht von Nodes and Links
*******************************************************************************/
table {
  border-collapse: collapse;
  width: 100%;
}

th, td {
  border: 1px solid #dddddd;
  text-align: left;
  padding: 8px;
}

th {
  background-color: #f2f2f2;
}

tr td:nth-child(6) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 350px;
}

tr td:nth-child(7) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 400px;
}

.action {
  display: flex;
  justify-content: space-evenly;
  padding: 15px 0;
  width: 100%;
}
/*******************************************************************************
File Upload Form
*******************************************************************************/
.upload-form {
  width: 400px !important;
}

.upload-form h2 {
  text-align: center;
}

.upload-btn {
  color: #fff;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  width: 100%;
}

.upload-btn:active {
  transform: translateY(1px);
}

.file-input-label {
  display: block;
  text-align: center;
  margin-bottom: 20px;
  font-size: 16px;
}
/*******************************************************************************
Add/Edit Form von Nodes and Links
*******************************************************************************/
.modern-form {
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  width: 350px;
}

.modern-form .tooltip {
  margin-top: 10px;
  color: black;
}

.modern-form p {
  color: black;
}

.modern-form input, .modern-form select {
  /* border: black 2px solid; */
  outline: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.modern-form h2 {
  margin-bottom: 15px;
}

h2 {
  text-align: center;
  color: #333333;
}

.form-group {
  margin-bottom: 20px;
}
.form-group:last-child {
  display: flex;
  /* justify-content: space-evenly; */
  justify-content: space-between;
}

label {
  display: block;
  margin-bottom: 8px;
  color: #555555;
}

input,
textarea {
  width: 100%;
  padding: 10px;
  box-sizing: border-box;
  border: 1px solid #cccccc;
  border-radius: 4px;
}

button, #userDeleteButton {
  background-color: #3498db;
  color: #ffffff;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
}

#shareButton {
  background-color: #4028b4;
  margin-left: 10px !important;
}
#shareButton:hover {
  background-color: #2d1c7e;
}

button:hover {
  background-color: #297fb8;
}

select {
  width: 100%;
  padding: 10px;
  box-sizing: border-box;
  border: 1px solid #cccccc;
  border-radius: 4px;
}

i {
  cursor: pointer;
  font-size: 1.3em;
  margin: 0 5px;
}

.addLink, .addProjectButton, .addShare {
  background-color: green;
}
.addLink:hover, .addProjectButton:hover, .addShare:hover {
  background-color: rgb(0, 99, 0);
}

.addNode {
  color: green;
}
.deleteNode, .deleteMindmap, .deleteLink, .deleteUser, .deleteShare, .deleteArchive {
  color: red;
}
#nodeList tr:first-child .deleteNode {
  visibility: hidden;
}
#nodeList tr td img {
  width: 15px;
  margin-right: 5px;
}

#userDeleteButton, .cancelButton {
  background-color: red;
  text-decoration: none;
}
.cancelButton:hover {
  background-color: rgb(163, 2, 2);
}

#node-title {
  display: flex;
  width: 100%;
  padding-bottom: 10px;
}
#node-title h1 {
  margin: 0 auto;
}
#node-title button {
  /* margin-left: auto; */
  margin-right: 10px;
}
