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

/* 1. Make the map extend underneath the header */
#map {
  position: absolute !important;
  top: 0 !important; /* Start from the very top */
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 0 !important; /* Lower z-index so content appears on top */
}

/* Header Styles - New Design */
.main-header {
  display: flex;
  align-items: center;
  background-color: transparent !important;
  color: white;
  padding: 10px 20px;
  position: relative;
  width: 100%;
  box-sizing: border-box;
  z-index: 1000;
}

/* Add a translucent overlay to the header for contrast */
.main-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(26, 38, 57, 0.1);
  z-index: -1;
  /*backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px); */
}

.national-flag {
  width: 80px;
  height: auto;
  margin-right: 15px;
  position: relative;
  z-index: 2;
}

.main-header h1 {
  font-size: 24px;
  margin: 0;
  font-weight: bold;
  position: relative;
  z-index: 2;
}

.language-selector {
  position: absolute;
  top: 10px;
  right: 130px; /* shift left slightly to make room for .user-controls */
  z-index: 2;
  display: none !important;
}

.language-selector a {
  color: white;
  text-decoration: none;
}

.language-selector a.active {
  font-weight: bold;
}

.user-controls {
  position: absolute;
  top: 4px; /* was bottom: 10px */
  left: 155px;
  z-index: 2;
}

.user-controls a {
  color: white;
  text-decoration: none;
  margin-left: 10px;
}

/* Dropdown Menu Styles - Now with transparency */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  cursor: pointer;
}

.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  background-color: rgba(255, 255, 255, 0.1) !important;
  /*backdrop-filter: blur(5px) !important;
  -webkit-backdrop-filter: blur(5px) !important;*/
  min-width: 250px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.3);
  z-index: 1100;
  border-radius: 4px;
  padding: 10px;
  color: #222; /* Darkened text for better contrast */
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.dropdown-section {
  margin-bottom: 15px;
  background-color: transparent !important;
}

.dropdown-section h4 {
  margin: 0 0 5px 0;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.3);
  color: #000; /* Darkened for better contrast */
  font-size: 14px;
  font-weight: bold;
  background-color: transparent !important;
}

.dropdown-section a {
  color: #000; /* Darkened for better contrast */
  text-decoration: none;
  display: block;
  padding: 5px 0;
  font-size: 13px;
  background-color: transparent !important;
}

.dropdown-section a:hover {
  text-decoration: underline;
}

.contact-info {
  font-size: 13px;
  line-height: 1.4;
  padding: 5px 0;
  color: #000; /* Darkened for better contrast */
  background-color: transparent !important;
}

/* Legacy Header Styles (for old components) */
.header {
  background-color: transparent !important;
  color: white;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
  position: relative;
  z-index: 1000;
}

.header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(26, 38, 57, 0.1);
  z-index: -1;
  /* backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);*/
}

.logo-container {
  display: flex;
  align-items: center;
  position: relative;
  z-index: 2;
}

.logo {
  height: 60px;
  margin-right: 20px;
}

.portal-title {
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
}

.portal-title h1 {
  margin: 0;
  font-size: 28px;
}

.portal-title h2 {
  margin: 0;
  font-size: 18px;
  background-color: rgba(255,255,255,0.2);
  padding: 5px 10px;
  border-radius: 4px;
}

.nav-menu {
  display: flex;
  gap: 20px;
  position: relative;
  z-index: 2;
}

.nav-menu a {
  color: white;
  text-decoration: none;
  font-size: 16px;
  padding: 5px 10px;
  border-radius: 3px;
  transition: background-color 0.3s;
}

.nav-menu a:hover {
  background-color: rgba(255,255,255,0.2);
}

/* New Layer Panel */
.layer-panel {
  background: rgba(255, 255, 255, 0.18);
  color: #181818;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  padding: 0 0 8px 0;
  width: 280px;
  font-size: 0.9rem;
  margin-top: 10px;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  border: 1px solid rgba(255,255,255,0.18);
}

.layer-menu-header {
  display: flex;
  align-items: center;
  font-size: 1em;
  font-weight: 600;
  padding: 12px 16px 8px 16px;
  border-radius: 8px 8px 0 0;
  background: transparent;
  cursor: pointer;
  user-select: none;
  outline: none;
  transition: background 0.2s;
  color: #181818;
  text-shadow: none;
}

.layer-menu-header:focus, .layer-menu-header:hover {
  background: rgba(255,255,255,0.22);
}

.menu-toggle-icon {
  margin-right: 12px;
  font-size: 1.1em;
  color: #181818;
  transition: transform 0.2s;
}

.layer-menu-content {
  padding: 0 0 8px 0;
  background-color: transparent !important;
}

.layer-section {
  margin: 0 0 4px 0;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.layer-section-header {
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  color: #181818;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  margin: 2px 0;
  transition: background-color 0.2s;
}

.layer-section-header:focus, .layer-section-header:hover {
  background: rgba(0,0,0,0.07);
}

.section-toggle-icon {
  margin-right: 10px;
  font-size: 1em;
  color: #181818;
  transition: transform 0.2s;
}

.layer-group {
  padding: 0 16px 6px 32px;
  border-left: 2px solid rgba(0,0,0,0.1);
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4,0,0.2,1);
  background: transparent;
}

.layer-item {
  padding: 6px 12px;
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #181818;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  margin: 2px 0;
}

.layer-item label {
  margin-right: 2px !important;
  padding: 0 !important;
  font-size: 1.08em !important;
  line-height: 1.1 !important;
}

.layer-item input[type="checkbox"],
.layer-item input[type="radio"] {
  margin-right: 4px !important;
  width: 15px !important;
  height: 15px !important;
}

.layer-item:hover label {
  color: #222;
}

.layer-section-header[aria-expanded="true"] .section-toggle-icon {
  color: #0077ff;
}

.layer-section-header[aria-expanded="false"] .section-toggle-icon {
  color: #181818;
}

.layer-section-header:focus {
  box-shadow: none;
}

.layer-menu-header:focus {
  box-shadow: none;
}

.layer-section:last-child {
  border-bottom: none;
}

/* Legacy Map Controls */
.map-controls {
  position: absolute;
  top: 90px;
  right: 10px;
  background: rgba(255, 255, 255, 0.5);
  padding: 10px;
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
  z-index: 990;
  backdrop-filter: blur(3px);
}

.map-controls h3 {
  margin-top: 0;
  margin-bottom: 10px;
  color: #333;
}

.layer-list {
  margin-top: 10px;
}

/* Workspace styles */
.workspace-header {
  margin-top: 15px;
  margin-bottom: 10px;
}

.workspace-header h4 {
  margin: 0;
  padding: 0;
  font-size: 14px;
  color: #333;
}

.workspace-button {
  display: block;
  width: 100%;
  margin-bottom: 8px;
  padding: 6px;
  background-color: rgba(255, 255, 255, 0.5);
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  text-align: left;
  font-size: 13px;
}

.workspace-button:hover {
  background-color: rgba(255, 255, 255, 0.8);
}

.workspace-layers {
  margin-top: 10px;
  margin-bottom: 15px;
  border-left: 2px solid rgba(0, 0, 0, 0.1);
  padding-left: 8px;
}

.workspace-layers h4 {
  margin: 0 0 8px 0;
  padding: 0;
  font-size: 14px;
  color: #333;
}

.loading-workspace {
  font-style: italic;
  color: #666;
  font-size: 12px;
  margin-bottom: 8px;
}

/* New Footer Styles */
.map-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(255, 255, 255, 0.0);
  padding: 5px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 12px;
  z-index: 900;
}

.partner-logos {
  display: flex;
  align-items: center;
  justify-content: flex-start; /* This is fine if you want them aligned to the left */
  padding-left: 20px;
  gap: 15px; /* This already provides spacing between items */
  margin-bottom: 5px;
}

.partner-logo {
  height: 40px; /* Increased slightly for better visibility */
  width: auto; /* Maintains aspect ratio */
  /* Removed margin-right since you're already using gap in the container */
  object-fit: contain; /* Ensures the logo fits within bounds without distortion */
  max-width: 100px; /* Optional: prevents any logo from becoming too wide */
}

/* If specific logos need different treatment, you can target them individually */
.partner-logo:nth-child(1) {
 /* height: 47px; /* Specific adjustment for first logo if needed */
}

/* You could also use classes if the logos have them */
.partner-logo.un-logo {
  height: 28px; /* Example for a specific logo */
}

/* Target the last logo (logo2) and reduce its size by 20% */
.partner-logo:last-child,
.partner-logo.logo2 {
  height: 24px; /* 30px × 0.8 = 24px (20% reduction) */
}

.attribution {
  color: #555;
}

.terms-link {
  color: blue;
  text-decoration: underline;
  margin-right: 5px;
}

/* Legacy Footer Styles */
.footer {
  background-color: rgba(15, 22, 38, 0.5);
  color: black;
  padding: 15px 20px;
  font-size: 14px;
  box-shadow: 0 -2px 5px rgba(0,0,0,0.2);
  z-index: 1000;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  /* backdrop-filter: blur(3px); */
}

.footer-content {
  display: flex;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 5px;
}

.footer-section {
  margin-right: 30px;
}

.footer-section h3 {
  font-size: 16px;
  margin-top: 0;
  margin-bottom: 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(0,0,0,0.3);
  color: black;
}

.footer-section a {
  color: black;
  text-decoration: none;
  display: block;
  margin-bottom: 5px;
}

.footer-section a:hover {
  text-decoration: underline;
}

.copyright {
  text-align: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(0,0,0,0.2);
  font-size: 12px;
  color: rgba(0,0,0,0.7);
}

/* Login Modal */
.login-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
}

.login-form {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 20px;
  border-radius: 8px;
  width: 300px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
}

.form-group input {
  width: 100%;
  padding: 8px;
  box-sizing: border-box;
}

.btn {
  background: #3498db;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 4px;
  cursor: pointer;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
}

/* Responsive Design */
@media (max-width: 768px) {
  .main-header {
    flex-direction: column;
    padding: 5px;
  }

  .national-flag {
    width: 50px;
  }

  .language-selector, .user-controls {
    position: static;
    margin-top: 5px;
  }

  .layer-panel {
    width: 90%;
    left: 5%;
    top: 150px;
  }

  .partner-logo {
    height: 30px;
  }

  .map-footer {
    padding: 2px 5px;
  }

  .layer-controls-bar, .action-buttons {
    display: flex;
    flex-wrap: wrap;
    width: 90%;
    left: 5%;
  }

  .control-btn, .cancel-btn, .save-btn {
    margin-bottom: 5px;
  }

  .dropdown-content {
    width: 90%;
    right: 5%;
    min-width: unset;
  }
}

/* Stronger dropdown transparency styles */
.dropdown-content,
.feedback-dropdown,
.dropdown-menu,
div[class*="dropdown"],
div[class*="menu"],
.nav-dropdown,
#feedbackDropdown {
  background-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  color: #000 !important;
}

/* Make dropdown sections transparent */
.dropdown-section,
div[class*="dropdown-section"],
div[class*="section"],
.dropdown-content > div,
.dropdown-menu > div,
.feedback-dropdown > div,
.feedback-menu > div,
div[class*="dropdown"] > div,
.dropdown-panel,
.dropdown-category {
  background-color: transparent !important;
  backdrop-filter: none !important;
}

/* Target the specific structure shown in your screenshot */
[id*="feedback"] div,
.feedback-content,
.dropdown-content,
.user-controls .dropdown-content,
.feedback-menu,
.feedback-dropdown,
div[class*="feedback"],
#feedbackDropdown,
.feedback-menu > div {
  background-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  color: #000 !important;
}

/* Ensure text within the dropdown is readable */
.dropdown-content h4,
.dropdown-content a,
.dropdown-content div,
.feedback-menu h4,
.feedback-menu a,
.feedback-menu div,
div[class*="dropdown"] h4,
div[class*="dropdown"] a,
div[class*="dropdown"] div {
  color: #000 !important;
  font-weight: normal !important;
  background-color: transparent !important;
}

/* Specific targeting for section headers */
div[class*="dropdown"] h4,
.dropdown-content h4,
.feedback-menu h4 {
  font-weight: bold !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2) !important;
  background-color: transparent !important;
}

/* Inline style override for any possible element */
[style*="background-color"] {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Target specific elements seen in the screenshot */
.dropdown-menu[style*="display: block"],
.dropdown-content[style*="display: block"] {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Force header transparency for any header in any system */
header,
nav,
div[class*="header"],
div[role="banner"],
[class*="nav-bar"],
[class*="navbar"],
[class*="topbar"] {
  background-color: transparent !important;
  background-image: none !important;
  position: relative !important;
  z-index: 10 !important;
}

header::before,
nav::before,
div[class*="header"]::before,
div[role="banner"]::before,
[class*="nav-bar"]::before,
[class*="navbar"]::before,
[class*="topbar"]::before {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background-color: rgba(26, 38, 57, 0.1) !important;
  z-index: -1 !important;
 /* backdrop-filter: blur(3px) !important;
  -webkit-backdrop-filter: blur(3px) !important; */
}

/* Add these to your existing style.css file */

/* 1. Remove ruler from bottom left corner */


/* 2. Remove i icon from bottom right corner */
.ol-attribution {
  display: none !important;
}

/* Style the email link in contact info */
.contact-info a {
  color: #0066cc !important;
  text-decoration: none;
  display: inline-block !important;
  padding: 2px 0 !important;
  margin-top: 5px;
}

.contact-info a:hover {
  text-decoration: underline;
}

/* Make sure the Resources dropdown has enough width for documentation items */
#resources-link + .dropdown-content {
  min-width: 230px;
}

/* Ensure the feedback dropdown isn't too large now that it has less content */
#feedback-link + .dropdown-content {
  min-width: 180px;
}

/* Remove all pan control related CSS as it's now in zoom-controls.css */

/* Hide default OpenLayers controls */
.ol-zoom, .custom-zoom-control, .measurement-toggle, .measurement-toggle-bottom-left, .bottom-right-controls {
  display: none !important;
}

/* Hide default scale line */
.ol-scale-line:not(.bottom-left-controls .ol-scale-line) {
  display: none !important;
}

/* Unify font size and reduce padding for all elements in the Layers menu */
.layer-panel,
.layer-menu-header,
.layer-section-header,
.layer-group,
.layer-item,
.layer-item label {
    font-size: 1.05em !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1.2 !important;
}

.layer-menu-header,
.layer-section-header {
    padding: 6px 10px !important;
}

.layer-group {
    padding: 0 10px 4px 18px !important;
}

.layer-item {
    min-height: 20px !important;
    display: flex;
    align-items: center;
}

.layer-item input[type="checkbox"],
.layer-item input[type="radio"] {
    margin-right: 4px !important;
    width: 15px !important;
    height: 15px !important;
}
