body {font-family: 'Arial', sans-serif; overflow:hidden; font-size: 12px;}
#nodeinfo {position:absolute; font-weight: bold ; font-size:15px; width:150px; background-color: white; padding:10px;border-radius:10px; display: none; border: solid #ECECEC;}
#nodeinfo img {border-radius: 50%; }
#label {position:absolute; font-weight: bold ; font-size:15px; width:150px; background-color: white; padding:10px;border-radius:10px; display: none; border: solid #ECECEC;}
#label img {border-radius: 50%; }
#selectors {
    position:absolute;font-size:13px; top:10px;left:10px;max-height: calc(100% - 30px);
    overflow: hidden;color:grey; border-radius: 10px;
    background-color:rgba(256, 256, 256, 0.8);
    border:solid grey 2px;
    padding: 10px;
    overflow:visible; /*necessary to see the tooltip */
}
#dietselector {font-size:13px; max-height: calc(100% - 30px);overflow: hidden;}
#countryselectorbutton {position:absolute;font-size:11px; top:10px;left:10px;height:30px}
#loadinginfo {position:absolute;top:40%;left:40%;padding:20px;background: black; color: azure; display:none; z-index:10000}
#title {position: absolute;right:10px;top:10px;width:200px}
h1 {
  font-size: 18px;
  margin-bottom: 0.2em;
  display: inline-block;
  font-weight: bold;
  letter-spacing: 0.5px; 
  text-align: center;
}
h1 a {
  display: block;         
  background-color: #000;
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;  
}
h1 a:hover {
  background-color: #333; 
}
h2 {font-size: 15px; margin-bottom: 0.2em;}
h3 {font-size: 13px; margin-top: 0px; margin-bottom: 3px;}
h4 { margin-top: 0px; margin-bottom: 5px;}
.subtitle {font-size:14px; font-weight: bold ;font-style: italic; margin-bottom: 0.5em;text-align: center;}
.subtitle a {color: #00C389}
.author {font-size:14px; margin-bottom: 0.5em;}
.sourcedocs {font-size:13px; margin-bottom: 0.3em;}
.sourcedocs a {display: inline-block; margin-bottom: 3px;}
#nodeinfo h3 {font-size:15px}

/* View filters */
#searchbox {margin-top: 10px;}
#searchFilter {width:160px;}
#terms {
    color: black;
    padding: 12px 5px;
    text-decoration: none;
    display: block;
    cursor: pointer;
    width:150px;
    max-height:200px;
    overflow-y: auto;
}
#terms a {margin-bottom: 3px;}
#terms a:hover {
    color: white;
    background-color: black;
}
#terms a::after {
    content: "\A"; /* Use "\A" for a line break */
    white-space: pre; /* Preserve white space */
}

/* ADD food interface */
#addFoodButtonContainer {
    display: flex;
    justify-content: center; /* Horizontally center the content */
    align-items: center; /* Vertically center the content */
    height: 60px;
}
#addFoodButton {
    width: 120px; 
    height: 30px; 
    padding: 5px 20px; /* (top and bottom, left and right) */
    background-color: #00C389 ; /* Set the background color to red */
    color: white; /* Set the text color to white for better visibility */
    border: none; /* Remove the default button border */
    cursor: pointer; /* Add a pointer cursor on hover */
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);  /* Add a drop shadow */
    transition: background-color 0.3s, filter 0.3s;  /* Transition for smooth hover */
}
#addFoodButton:hover {
    background-color: #EE82EE; /* Change the background color on hover */
    filter: brightness(1.2); /* Rotate the hue by 90 degrees on hover */
}

/* ADD food interface */
#restartButtonContainer {
    display: flex;
    justify-content: center; /* Horizontally center the content */
    align-items: center; /* Vertically center the content */
    height: 30px;
}
#restartButton {
    width: 120px; 
    height: 30px; 
    padding: 5px 20px; /* (top and bottom, left and right) */
    background-color: #03f2aa ; /* Set the background color to red */
    color: white; /* Set the text color to white for better visibility */
    border: none; /* Remove the default button border */ 
    cursor: pointer; /* Add a pointer cursor on hover */
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);  /* Add a drop shadow */
    transition: background-color 0.3s, filter 0.3s;  /* Transition for smooth hover */
}
#restartButton:hover {
    background-color: #EE82EE; /* Change the background color on hover */
    filter: brightness(1.2); /* Rotate the hue by 90 degrees on hover */
} 

#addFood {
    position: fixed;
    display:none;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* centering */
    max-width: 90%;
    max-height: 90%;
    width: 300px; /* Set your desired width */
    height: 600px; /* Set your desired height */
    background-color: rgba(256, 256, 256, 0.8); /* Background color (optional) */
    border: 1px solid #ccc; /* Border (optional) */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); /* Box shadow (optional) */
    padding: 15px;
}

#addFood input[type="text"] {
    margin: 15px 0;
    box-sizing: border-box;
}

.close-button {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 2.5em;
    cursor: pointer;
}

#foodsToAdd {
    max-height: 80%;
    overflow-y: scroll;
}

#foodsToAdd a {
    color : #00C389;
    line-height: 1.5em;
    cursor: pointer;
}
#foodsToAdd a:hover {
    color: white;
    background-color: #00C389;
}
#foodsToAdd a::after {
    content: "\A"; /* Use "\A" for a line break */
    white-space: pre; /* Preserve white space */
}
.label-fr, .label-de, .label-it, .label-latin {
    font-size:13px;
}
.label-latin {
    font-style: italic;
}

/* Tooltip */

div:has(> .tooltiponhover) {
    position: relative;
    overflow: visible; /* Allow tooltips to extend beyond container */
}

.tooltiponhover {
    position: relative;
    cursor: help;
    border-radius: 4px;
    transition: background-color 0.2s;
    margin-bottom: 4px;
    display:block;
    overflow: visible; /* Ensure tooltip isn't clipped */
}

.tooltiponhover:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Tooltip positioned relative to hovered element */
.tooltiponhover::after {
    content: attr(data-tooltip);
    position: absolute; /* Changed back to absolute */
    left: 100%; /* Positions from the right edge of the hovered div */
    top: 50%;
    transform: translateY(-50%);
    margin-left: 15px; /* Space between text and tooltip */
    background: #333;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    max-width: 250px;
    width: max-content;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
}

/* Tooltip arrow */
.tooltiponhover::before {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 5px;
    border-width: 8px;
    border-style: solid;
    border-color: transparent transparent transparent #333;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1001;
    pointer-events: none;
}

.tooltiponhover:hover::after,
.tooltiponhover:hover::before {
    opacity: 1;
    visibility: visible;
}

.label {
    color: grey;
    opacity:0.5;
    background: none;
    padding: 5px;
    font-size: 20px;
    pointer-events: none;
    display:block;
}
#tooltip { /* shows info on hover */
    position: absolute;
    top: -100px;
    left: -100px;
    width: 200px;
    height: auto;
    background-color: #fff;
    border: 1px solid #ccc;
    padding: 10px;
    display: none;
}
#nodenametip { 
    position: absolute;
    top: -100px;
    left: -100px;
    width: auto;
    height: auto;
    background-color: #fff;
    border: 1px solid #ccc;
    padding: 10px;
    display: none;
}

/* Hidden on desktop */
#mobile-warning {
  display: none;
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  z-index: 9999;
  text-align: center;
  padding-top: 20%;
  font-size:20px;
}

#mobile-warning h2 {
    font-size:30px;
}

#mobile-warning p {
    margin:20px;
}

/* Shown only on screens smaller than 1024px */
@media only screen and (max-width: 1023px) {
  #mobile-warning {
    display: block;
  }
}