@charset "UTF-8";
/* CSS Document */
@import 'variables.css';

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@300;400;500;600;700&display=swap');
body {
  margin: 0;
      font-family: var(--font-family-accent);
  font-optical-sizing: auto;
  font-weight: 500;
  font-style: normal;
  font-size: 16px;
  color: #FFFFFF;
  background-size: cover; /* Cover the entire viewport */
  background-position: center; /* Center the image */
  background-repeat: no-repeat; /* Prevent image repetition */
  background-color: #f0f0f0; /* Light grey */
  min-height: 100vh; /* Ensure body takes up full viewport height */
  display: flex;
  justify-content: flex-start;
  width: 100%;
  flex-direction: column;
  /*align-items: center;*/
}
hr {
  border: none; /* Removes default border */
  height: 4px; /* Specifies the thickness of the line */
  background-color: #FFFFFF; /* Specifies the color of the line */
  margin: 5px 0; /* Add some vertical margin around the line */
}
a {
  color: #FFFFFF;
  text-decoration: none;
  font-weight: bold;
}
a:hover {
  color: #C1C1C1;
}
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.8;
  z-index: 9998;
  pointer-events: none;
  background-color: rgba(0, 0, 0, 0.7);
  transition: background-color var(--transition-speed, 0.3s) ease;
  display: none; /* Start hidden by default */
}

body.light-theme #loading-screen {
  background-color: rgba(0, 0, 0, 0.5);
}

#loading-message {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  background-color: var(--dark-panel);
  border-radius: 12px;
  padding: 20px 30px;
  text-align: center;
  border-left: 6px solid var(--primary-color);
  box-shadow: var(--shadow);
  max-width: 90%;
  min-width: 280px;
  pointer-events: none;
  transition: all var(--transition-speed, 0.3s) ease;
  display: none; /* Start hidden by default */
}

body.light-theme #loading-message {
  background-color: var(--light-panel);
  color: var(--text-dark);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

#loading-message #login {
  background-color: transparent;
  border: 0px solid transparent;
  padding: 10px 15px;
  border-radius: 8px;
  box-shadow: none;
  transition: background-color var(--transition-speed, 0.3s) ease;
}

#loading-message h3 {
  margin-top: 0;
  color: var(--primary-color);
  font-weight: 600;
  transition: color var(--transition-speed, 0.3s) ease;
}

#loading-message h3 i {
  margin-right: 8px;
  color: var(--primary-color);
}

#loading-message p {
  margin-bottom: 0;
  font-size: 1.1em;
  transition: color var(--transition-speed, 0.3s) ease;
}

#loading-screen.shown, #loading-message.shown {
  display: block;
}
#loading-screen.hidden, #loading-message.hidden {
  display: none !important; /* Add !important to ensure it overrides other styles */
}
.form-group {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}
.form-group label {
  width: 100px; /* Adjust width as needed */
  margin-right: 10px;
}
.form-group input[type="text"], .form-group input[type="email"], .form-group input[type="password"] {
  flex-grow: 1;
}
.error-message {
  color: red;
  font-weight: bold;
  margin-top: 5px;
}
#mapid {
  flex: 1;
  position: relative; /* Make map a positioning context */
  height: calc(100vh - var(--navbar-height, 70px)); /* Subtract navbar height to prevent overlap */
  width: 100%; /* set the width to 100% of its parent */
  z-index: 1; /* Ensure it's above any overlays but below navbar */
  overflow: hidden; /* Prevent scrollbars */
  margin-top: 0; /* Ensure no extra margin */
  top: 0; /* Ensure proper positioning */
}
#mapid::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.2); /*Black with opacity*/
  z-index: 0; /* Change to 0 so it appears below the map tiles */
}

/* ===== LOGO OVERLAY ===== */
#logo-overlay {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 1000;
  pointer-events: auto;
}

/* Mobile logo overlay positioning - moved to bottom-left */
@media (max-width: 768px) {
  #logo-overlay {
    top: auto;
    right: auto;
    bottom: 15px;
    left: 15px;
  }
  
  #logo-overlay .logo-image {
    height: 30px;
    max-width: 100px;
  }
}

@media (max-width: 480px) {
  #logo-overlay {
    bottom: 10px;
    left: 10px;
  }
  
  #logo-overlay .logo-image {
    height: 25px;
    max-width: 87.5px;
  }
}

@media (max-width: 360px) {
  #logo-overlay {
    bottom: 8px;
    left: 8px;
  }
  
  #logo-overlay .logo-image {
    height: 20px;
    max-width: 75px;
  }
}

/* Test if backdrop-filter is supported */
@supports (backdrop-filter: blur(5px)) {
  .logo-container {
    background: rgba(255, 255, 255, 0.02);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
  }
}

/* Fallback for browsers without backdrop-filter support */
@supports not (backdrop-filter: blur(5px)) {
  .logo-container {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }
}

.logo-link {
  text-decoration: none;
  color: inherit;
  display: block;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
}

.logo-link:hover {
  transform: scale(1.02);
}

.logo-image {
  height: 80px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  transition: all var(--transition-speed) ease;
  position: relative;
  z-index: 1;
}

/* Theme-aware logo switching */
.logo-white {
  display: block;
}

.logo-black {
  display: none;
}

body.light-theme .logo-white {
  display: none;
}

body.light-theme .logo-black {
  display: block;
}



/* This is for standalone login containers outside the loading message */
.login-container {
  background-color: var(--dark-panel);
  border: 0px solid #000000;
  padding: 25px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  color: var(--text-light);
  transition: background-color var(--transition-speed, 0.3s) ease,
              color var(--transition-speed, 0.3s) ease;
}

body.light-theme .login-container {
  background-color: var(--light-panel);
  color: var(--text-dark);
}

.container.top {
  display: flex; /* Center items within this container*/
  justify-content: center;
  align-items: center;
}
.container.bottom {
  padding: 20px;
}
.page-container {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
}
@media (max-width : 474px) {
  .page-container {
    min-width: auto;
  }
}
.cwg-logo {
  width: 400px;
  height: 250px;
  margin-bottom: -100px; /* Offset to move the logo upwards */
  z-index: 1; /* Ensure overlay is above the image but below the map tiles*/
}
.cwg-logo img {
  max-width: 100%;
  max-height: 100%;
}
.cwg-logo.menu {
  width: 200px;
  height: 125px;
  margin-bottom: -15px; /* remove any negative margin*/
  z-index: auto;
  margin-top: -20px; /* Offset to move the logo upwards */
}
@media (max-width: 768px) {
  .cwg-logo {
    width: 300px;
    height: 219px;
  }
}
@media (max-width: 768px) {
  .cwg-logo.menu {
    width: 150px;
    height: 94px;
    margin-bottom: 0px; /* Offset to move the logo upwards */
  }
}
#severity-key {
  border-collapse: collapse; /* Improves table appearance */
  text-align: centre;
  width: 80%;
}
#severity-key th, #severity-key td {
  padding: 5px;
  text-align: centre;
}
/* Leaflet popup styles have been moved to leaflet-custom.css */
/* Mobile popup styles have been moved to leaflet-custom.css */
.underline {
  text-decoration: underline;
  text-decoration-thickness: 3px; /* Adjust underline thickness */
  font-weight: bold;
  display: flex;
  justify-content: center;
}
.h-spaced-buttons {
  margin-right: 10px; /* Adjust as needed */
  margin-top: 10px; /* Adjust as needed */
  margin-bottom: 10px; /* Adjust as needed */
}
h1 {
  font-size: 2.5em; /* Size of the heading (em is relative to parent font size) */
  font-weight: bold; /* Font weight (bold, normal, etc.) */
  text-align: center; /* Alignment of the text */
  margin-bottom: 0.5em; /* Spacing below the heading */
  margin-top: 0.5em;
}
h2 {
  font-size: 1.3em;
  font-weight: bold; /* Example of different style for h2 */
  margin-bottom: 0.85em;
  margin-top: 0.85em;
}
h3 {
  font-size: 1.25em;
  font-weight: bold; /* Example of different style for h2 */
  margin-bottom: 0.5em;
  margin-top: 0.5em;
}
h4 {
  font-size: 1em;
  font-weight: bold; /* Example of different style for h2 */
  margin-bottom: 0.5em;
  margin-top: 0.5em;
}
h5 {
  font-size: 0.85em; /* Reduced size for h4 */
  text-align: right;
  font-weight: bold; /* Example of different style for h2 */
  margin-bottom: 1.5em;
  margin-top: 0.5em;
}
@media (max-width: 768px) {
  body {
    font-size: 10px;
  }
  h1 {
    font-size: 2.2em; /* Reduced size for h1 */
  }
  h2 {
    font-size: 2em; /* Reduced size for h2 */
  }
  h3 {
    font-size: 1.8em; /* Reduced size for h3 */
  }
  h4 {
    font-size: 1.6em; /* Reduced size for h4 */
  }
  h5 {
    font-size: 1em; /* Reduced size for h4 */
  }
  p {
    font-size: 1.2em; /* Reduced font size for paragraphs */
    line-height: 1.4; /* Slightly adjusted line-height for readability */
  }
  .btn {
    font-size: 12px;
    padding: .375rem .3rem;
  }
}
@media (max-width: 768px) {
  .button-container a.btn, .button-container button.btn { /* Added this line to target button elements */
    padding: 0.25rem 0.5rem;
    margin-right: 10px;
    margin-bottom: 5px;
  }
  .h-spaced-buttons { /* Also modify if needed */
    margin-right: 10px; /* Reduced right margin */
    margin-top: 5px; /* Reduced top margin */
    margin-bottom: 5px; /* Reduced bottom margin */
  }
}
.button-container a.btn, .button-container button.btn, .my-tooltip .btn, .leaflet-popup-content-wrapper .btn {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  margin-bottom: 10px;
  text-decoration: none;
  margin-right: 20px;
  line-height: 1.5; /* Set line height to match main buttons */
  font-weight: 500; /* Ensure font weight matches main buttons */
}
.h-spaced-buttons, .my-tooltip .h-spaced-buttons, .leaflet-popup-content-wrapper .h-spaced-buttons {
  margin-right: 20px;
  margin-top: 10px;
  margin-bottom: 10px;
}
.login-welcome {
  align-items: center;
}
#app-title {
  align-items: center;
  flex-direction: column;
  display: flex;
}
.modal-content {
  background-color: var(--dark-panel);
  border-radius: 12px;
  border-left: 6px solid var(--primary-color);
  box-shadow: var(--shadow);
  overflow: hidden;
  color: var(--text-light);
}

body.light-theme .modal-content {
  background-color: var(--light-panel);
  color: var(--text-dark);
}

.modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 15px 20px;
}

body.light-theme .modal-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--primary-color);
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

body.light-theme .modal-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.modal-footer button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 15px;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.modal-footer .btn-primary {
  background-color: var(--primary-color);
}

.modal-footer .btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.modal-footer .btn-secondary {
  background-color: #6c757d;
}

.modal-footer .btn-secondary:hover {
  background-color: #5a6268;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.modal .form-control {
  background-color: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-light);
  border-radius: 8px;
  padding: 10px 15px;
  margin-bottom: 15px;
}

body.light-theme .modal .form-control {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--text-dark);
}

.modal .form-control:focus {
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.25);
  background-color: rgba(255, 255, 255, 0.15);
}

body.light-theme .modal .form-control:focus {
  background-color: rgba(0, 0, 0, 0.1);
}

.modal .form-control::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

body.light-theme .modal .form-control::placeholder {
  color: rgba(0, 0, 0, 0.5);
}

.modal textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

/* Style for the close button */
.modal .close {
  color: var(--text-light);
  opacity: 0.8;
  font-size: 1.5rem;
  transition: all 0.2s ease;
}

body.light-theme .modal .close {
  color: var(--text-dark);
}

.modal .close:hover {
  opacity: 1;
  transform: rotate(90deg);
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
  .modal-dialog {
    margin: 0.5rem;
    max-width: 95%;
  }
  
  .modal-title {
    font-size: 1.1rem;
  }
  
  .modal-body {
    padding: 15px;
  }
  
  .modal-footer button {
    padding: 6px 12px;
    font-size: 0.9rem;
  }
}
.fixed-bottom {
  padding: 20px;
}
/* All my-tooltip styles are now consolidated in nav-side.css */
.modal-footer .notification-settings {
  flex: 1;
}

.modal-footer .button-group {
  display: flex;
  gap: 10px;
}

.modal-footer label {
  margin-bottom: 0;
  display: flex;
  align-items: center;
  font-size: 0.9rem;
}

.modal-footer label span {
  margin-right: 8px;
}

.modal-dialog {
  max-width: 500px;
  margin: 1.75rem auto;
}

@media (max-width: 768px) {
  .modal-footer {
    flex-direction: column;
    align-items: stretch;
  }
  
  .modal-footer .notification-settings {
    margin-bottom: 15px;
  }
  
  .modal-footer .button-group {
    justify-content: space-between;
  }
}

/* Style for form groups */
.modal .form-group {
  margin-bottom: 15px;
}

.modal .form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: var(--primary-color);
}

#confirmModal .modal-content {
  border-left-color: var(--danger-color, #dc3545);
}

#confirmModal .modal-title {
  color: var(--danger-color, #dc3545);
}

#confirmModal .modal-title i {
  color: var(--danger-color, #dc3545);
  margin-right: 8px;
}

#confirmModal .modal-body {
  font-size: 1.1rem;
  padding: 20px;
  text-align: center;
}

#confirmModal #confirmMessage {
  margin-bottom: 0;
}

#confirmModal .btn-danger {
  background-color: var(--danger-color, #dc3545);
  border-color: var(--danger-color, #dc3545);
}

#confirmModal .btn-danger:hover {
  background-color: #bd2130;
  border-color: #bd2130;
  transform: translateY(-2px);
}

/* Animation for confirmation dialog */
#confirmModal.fade .modal-dialog {
  transition: transform 0.3s ease-out;
  transform: scale(0.95);
}

#confirmModal.show .modal-dialog {
  transform: scale(1);
}

/* Leaflet styles have been moved to leaflet-custom.css */

/* Light theme adjustments */
body.light-theme .nav-side-tooltip {
  background-color: var(--light-panel);
  color: var(--text-dark);
}