* {
    margin: 0;
    padding: 0;
    overscroll-behavior: none
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    font-family: Arial, sans-serif;
}

#archive_label {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: white;
    white-space: nowrap;
    z-index: 999;
}

#archive_label .red {
    color: red;
}

#archive_label .green {
    color: green;
}


img {
    pointer-events: none;
}

#movelock {
    width: 100%;
    height: 100%;
    background-color: #000000e5;
    z-index: 9;
    position: absolute;
    visibility: hidden;
}

.close-btn {
    position: absolute;
    top: 20px;      /* Adjusts the distance from the top */
    right: 20px;    /* Adjusts the distance from the right */
    border: none;   /* Removes the border */
    background: none; /* Removes any background */
    color: white;   /* Sets the color of the cross to white */
    font-size: 24px; /* Sets the size of the cross */
    cursor: pointer; /* Changes the mouse cursor on hover */
    outline: none;  /* Removes the outline to avoid focus highlight */
}

/* Optional: Style for hover effect */
.close-btn:hover {
    color: #ccc; /* Lightens the cross on hover */
}

#toast {
    visibility: hidden; /* Use visibility instead of display to allow for transitions */
    position: absolute;
    top: 20px;
    right: 50%;
    background-color: #333; /* Darker shade for better visibility */
    color: white;
    padding: 12px 20px; /* More padding for better text display */
    border-radius: 8px; /* Smoother border radius */
    z-index: 9999;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); /* Subtle shadow for a layered effect */
    opacity: 0;
    transition: opacity 0.5s, transform 0.5s;
    transform: translateY(-20px); /* Starts slightly below, moving up as it fades in */
}

#toast.show {
    visibility: visible;
    opacity: 1;
    transform: translateY(0); /* Moves to its final position as it fades in */
}


#foodmap {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    flex-grow: 1;
}

#camerainput {
    visibility: hidden;
    height: 0px;
}

.gridcell {
    position: absolute;
    z-index: 4;
    border: solid 1px hsl(0, 0%, 73%);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease-out;
    overflow: hidden;
    background-color: beige;
}

.gridcell .camera_icon {
    height: 25%;
}

.gridcell:hover {
    z-index: 7;
    transform: scale(1.02);
    transition: transform 0.1s ease;
}

.gridcell:hover {
    cursor: pointer;   
}

@keyframes spin {
    0% {
      transform: rotate(0deg);
    }
    100% {
      transform: rotate(360deg);
    }
}

.cell-animation {
    transition: left 0.2s ease, top 0.2s ease;
}

.cell-sorting {
    transition: left 0.5s ease, top 0.5s ease;
}

img {
    -webkit-user-drag: none;
    user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

#video {
    width: 100%;
    height: 100%;
}

#video:hover {
    cursor: pointer; 
}

.snapshot {
    width: 100%;
    height: 100%;
}

.generated-card {
    width: 100%;
    height: 100%;
    cursor: pointer;
    position: relative; /* Ensure absolute positioning is relative to this container */
}

.share-button {
    height: 10%;
    width: 10%;
    z-index: 9999;
    position: absolute;
    bottom: -15%;
    right: 2%;
    transition: bottom 0.4s ease; /* Smooth transition for the bottom property */
    background-color: hsla(0, 0%, 82%, 0.9); /* Semi-transparent gray background */
    border-radius: 5px 5px 0 0;
    display: flex; /* Use flexbox to align children */
    align-items: center; /* Center children vertically */
    justify-content: center; /* Center children horizontally */
}

.share-button i {
    font-size: 1.1em;
    color: black; /* Icon color */
}

.generated-card:hover .share-button {
    bottom: 0%; /* Set bottom to 0% when hovering over .generated-card */
}

.share-button:hover {
    background-color: hsla(0, 0%, 82%, 1); /* Semi-transparent gray background */
}

.infotext {
    height: 85%;
    display: flex; /* Use flexbox for alignment */
    justify-content: center; /* Center horizontally */
    position: absolute;
    top: 0; /* Position the infotext at the top left corner of the generated_card */
    left: 0;
    z-index: 4; /* Ensure the infotext is above the image */
    background-color: rgba(255, 255, 255, 0.75); /* Semi-transparent background to improve readability */
    backdrop-filter: blur(10px);
    
    padding-top: 1em;
    padding-left: 0.5em;
    padding-right: 0.5em;
    
    margin: 1em 0.5em;
}

.infotext h3 {
    text-align: center;
}

.infotext p {
    overflow-y: auto;
    height: 65%;
}

.generated-media {
    width: 100%;
    height: 100%;
    position: absolute; /* Position the image absolutely to allow the text overlay */
    top: 0;
    left: 0;
    z-index: 1; /* Ensure the image is below the infotext */
}

.thumbnail {
    width: 100%;
    height: 100%;
    position: absolute; /* Position the image absolutely to allow the text overlay */
    top: 0;
    left: 0;
    z-index: 0; /* Ensure the image is below the infotext */
}

.glasspane {
    width: 100%;
    height: 100%;
    position: absolute; /* Position the image absolutely to allow the text overlay */
    top: 0;
    left: 0;
    z-index: 2;
}

.generated-media.video {
    display: none;
}
