:root {
    --primary-color: #0EAEAE;  /* Main brand color */
    --text-color: #333;        /* Dark color for text for better readability */
    --background-color: #fff;  /* White background */
}

body {
    font-family: 'Larsseit', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

body, html {
  height: 100vh; /* 100% of the viewport height */
  overflow: hidden; /* Prevent scrolling outside designated areas */
}

.header {
    padding-top: env(safe-area-inset-top);
}

.header, .navbar, .footer {
    background-color: var(--primary-color);
    color: var(--background-color);
}

.navbar {
  padding: env(safe-area-inset-top)
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--background-color);
    border: none;
}

.btn-primary:hover {
    background-color: darken(var(--primary-color), 10%);
    /* Or any other hover effect you prefer */
}

.navbar-brand {
    color: white;
}

.navbar-icon {
    color: white;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  bottom: env(safe-area-inset-bottom);
  justify-content: space-around;
  background-color: #fff;
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
  z-index: 20; 
}

.bottom-nav a {
    text-align: center;
    display: block;
    color: #007bff;
}

.nav-item {
    text-align: center; /* Center align the content */
    flex-grow: 1; /* Allow each nav item to grow equally */
}

.nav-item i {
    display: block; /* Makes the icon a block element */
    margin: 0 auto; /* Center the icon horizontally */
    font-size: 24px; /* Example icon size */
}

.scrollable-area {
    max-height: 600px; /* Adjust based on your needs */
    overflow-y: auto; /* Enables vertical scrolling */
    padding-bottom: 100px; /* Optional: Adds some space at the bottom */
    overflow-x: hidden; /* Disables horizontal scrolling for elements with this class */
}

.nav-item span {
    display: block; /* Makes the text a block element */
    margin-top: 5px; /* Space between icon and text */
}

.tm {
    font-size: 50%;   /* Makes the trademark symbol smaller */
    vertical-align: super;   /* Aligns the symbol to the top */
}

@font-face {
    font-family: 'Larsseit';
    src: url('Larsseit.otf') format('opentype');
}

.add-button-container {
  position: fixed;
  bottom: 90px; /* Adjust based on the height of the bottom-nav */
  right: 20px;
  z-index: 1001; /* Above the bottom-nav */
}

.add-button {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    font-size: 4em;
    transition: transform 0.5s ease, box-shadow 0.1s ease, background-color 0.2s ease; /* Ensure transitions include all properties */
}

.add-button:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.add-button:active {
    transform: scale(0.95); /* Slight shrink gives nice pressed feel */
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2); /* Inset = pressed in */
}

.nav-item.active, .nav-item.active i {
    color: var(--primary-color); /* The blue color you want for the active state */
}

.container {
    margin-top: 20px; /* Adjust as needed */
}

/* Overlay styles */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 500;
    backdrop-filter: blur(4px); /* Add backdrop filter for blur effect */
}

/* Popup menu styles */
.popup-menu {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
    z-index: 550;
}

#camera-container {
    position: fixed; /* Fixed position */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Center the div */
    z-index: 1000; /* Ensure it's above other elements */
}

#qr-code-result {
    position: fixed; /* Fixed position */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Center the div */
    background-color: white; /* Background color */
    padding: 20px; /* Padding */
    border: 1px solid #ddd; /* Border */
    border-radius: 8px; /* Border radius */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Box shadow */
    z-index: 550; /* Ensure it's above other elements */
    display: none; /* Initially hidden */
    text-align: center; /* Center the text */
    width: auto; /* Auto width based on content */
    max-width: 90%; /* Maximum width */
    box-sizing: border-box; /* Include padding and border in width calculation */
}

/* Style for the dropdowns and button */
#qr-code-result select, 
#qr-code-result button {
    margin-top: 10px; /* Space above each element */
    margin-bottom: 10px; /* Space below each element */
    width: 100%; /* Full width of parent */
    padding: 10px; /* Padding inside elements */
    box-sizing: border-box; /* Include padding in width calculation */
}

.success-message {
    color: green;
    font-weight: bold;
}

.error-message {
    color: red;
    font-weight: bold;
}

#message-container {
    position: fixed; /* Make it fixed on the screen */
    bottom: 10%; /* Position it slightly from the bottom */
    left: 50%; /* Center it horizontally */
    transform: translateX(-50%); /* Ensure it is centered by translating it */
    z-index: 5050; /* Higher than most other elements */
    width: 90%; /* Max width, adjust as needed */
    max-width: 600px; /* Maximum width */
    padding: 10px;
    color: white;
    text-align: center;
    border-radius: 5px;
}

/* Message container within the bottom nav */
.bottom-nav #message-container {
    width: 100%;
    padding: 10px;
    text-align: center;
    font-size: 1em;
    color: #fff;
    display: none; /* Hidden by default */
}

#add-weights-form {
    position: fixed; /* Fixed position */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Center the div */
    width: auto; /* Adjust width as needed */
    max-width: 90%; /* Ensure it does not overflow the screen */
    background-color: white; /* Background color */
    padding: 20px; /* Padding around the content */
    border-radius: 8px; /* Rounded corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Box shadow for popup effect */
    z-index: 550; /* Ensure it's above other content */
    display: none; /* Initially hidden */
    text-align: center;
}

.user-image {
    max-height: 40px; /* Set the maximum height */
    width: auto; /* Allow the width to scale proportionally */
}

.logo-image {
    max-height: 50px; /* Set the maximum height */
    width: auto; /* Allow the width to scale proportionally */
}

/* Make the links in the first popup menu large and button-like */
.popup-menu ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.popup-menu ul li {
    margin-bottom: 10px; 
}

.popup-menu ul li a {
    display: block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 15px 20px;
    border-radius: 5px;
    text-align: center;
    text-decoration: none;
    font-size: 1.2em;
    font-weight: bold;
}

.popup-menu ul li a:hover {
    background-color: #0a9090;
}

#manual-add-weights {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 999;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 400px;
}

#mark-contaminated.selected {
  background-color: #8a0f1c;  /* Bootstrap red */
  color: white;
}

#contamination-banner {
  display: none;
  background-color: #ffdddd;
  color: #900;
  padding: 5px 10px;
  margin-top: 10px;
  font-weight: bold;
  border-left: 4px solid #d00;
}


