/* CSS for Base Layer Radio Buttons and Other Custom Styles */

/* Styling for radio buttons in layer panel */
.layer-item input[type="radio"] {
  margin-right: 8px;
  cursor: pointer;
}

/* Make layer count reflect updated numbers */
.layer-count {
  font-size: 0.8em;
  color: #ddd;
  margin-left: 5px;
}

/* Add some spacing between base layer options */
.layer-item {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
}

/* Make labels more clickable */
.layer-item label {
  cursor: pointer;
  flex-grow: 1;
}

/* Style for the active base layer */
.layer-item input[type="radio"]:checked + label {
  font-weight: bold;
  color: #fff;
}

/* Base layer info hover effect */
.layer-info:hover {
  color: #fff;
}

/* Override the footer's alignment */
.map-footer {
  align-items: flex-start !important;
}

/* Override the partner-logos' alignment with higher specificity */
.map-footer .partner-logos {
  justify-content: flex-start !important;
  padding-left: 20px !important;
}

/* Position scale line to right side */
.ol-scale-line {
  position: absolute !important;
  bottom: 10px !important;
  right: 10px !important;
  left: auto !important;
  background: rgba(255, 255, 255, 0.4) !important; /* Match zoom controls transparency */
  border-radius: 4px !important;
  padding: 2px 5px !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* Hide attribution ("i" icon) */
.ol-attribution {
  display: none !important;
}

/* Style the email link in contact info */
.contact-info a {
  color: #0066cc !important;
  text-decoration: none !important;
  font-weight: 500 !important;
  display: inline-block !important;
  margin-top: 5px !important;
  padding: 2px 0 !important;
  border-bottom: 1px solid transparent !important;
  transition: border-bottom-color 0.2s ease !important;
}

.contact-info a:hover {
  border-bottom-color: #0066cc !important;
}

/* 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;
}

/* Ensure dropdown menus are properly styled */
.user-controls .dropdown {
  position: relative;
  display: inline-block;
}

.user-controls .dropdown-toggle {
  cursor: pointer;
  white-space: nowrap;
}

.user-controls .dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  background-color: rgba(255, 255, 255, 0.6) !important;
  backdrop-filter: blur(5px) !important;
  -webkit-backdrop-filter: blur(5px) !important;
  min-width: 200px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.3);
  z-index: 1100;
  border-radius: 4px;
  padding: 10px;
  color: #222;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

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

/* Make sure the Resources dropdown is properly displayed */
#resources-link {
  margin-left: 0;
}

/* Ensure spacing between navbar items is consistent */
.user-controls a, .user-controls .dropdown {
  margin: 0 5px;
}

/* Position user controls on the right side of header */
.user-controls {
  position: absolute !important;
  top: 30px !important;
  right: 20px !important;
  text-align: right !important;
  margin-left: auto !important;
  z-index: 2 !important;
}

/* Ensure header has proper positioning for absolute elements */
.main-header {
  position: relative !important;
  display: flex !important;
  justify-content: flex-start !important;
}

/* Keep dropdown content aligned right */
.user-controls .dropdown-content {
  right: 0 !important;
  left: auto !important;
  text-align: left !important;
}

/* Feedback Form Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: #fefefe;
  margin: 10% auto;
  padding: 20px;
  border: 1px solid #888;
  border-radius: 5px;
  width: 80%;
  max-width: 600px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.close-btn {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
  color: black;
  text-decoration: none;
}

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

#feedback-form label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

#feedback-form input[type="text"],
#feedback-form input[type="email"],
#feedback-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 14px;
}

#feedback-form textarea {
  resize: vertical;
}

.submit-btn {
  background-color: #28a745;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
}

.submit-btn:hover {
  background-color: #218838;
}

.status-message {
  margin-top: 10px;
  padding: 10px;
  border-radius: 4px;
  display: none;
}

.success-message {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  display: block;
}

.error-message {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  display: block;
}

#captcha-container {
  margin-bottom: 15px;
}

/* Enhanced Contact Us styling */
.contact-info {
  padding: 10px !important;
  line-height: 1.6 !important;
  font-size: 14px !important;
  color: #333 !important;
}

#contact-us-link + .dropdown-content {
  min-width: 300px !important;
  padding: 15px !important;
}

#contact-us-link + .dropdown-content h4 {
  color: #1a365d !important;
  font-size: 16px !important;
  margin-bottom: 10px !important;
  border-bottom: 1px solid rgba(0,0,0,0.1) !important;
  padding-bottom: 5px !important;
}

/* Remove all zoom control related styles */
.custom-zoom-control,
.custom-zoom-control button,
.custom-zoom-control button:hover,
.ol-zoom:not(.custom-zoom-control) {
  display: none !important;
}

/* Reset scale line to original position */
.ol-scale-line {
  position: absolute !important;
  bottom: 10px !important;
  right: 10px !important;
  left: auto !important;
}

/* Basic zoom controls */
.ol-zoom {
  position: absolute;
  left: 8px;
  bottom: 50px;
  background-color: rgba(255, 255, 255, 0.4);
  border-radius: 4px;
  padding: 2px;
}

.ol-zoom .ol-zoom-in,
.ol-zoom .ol-zoom-out {
  display: block;
  margin: 1px;
  padding: 0;
  color: #333;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  text-indent: 0;
  line-height: 28px;
  height: 28px;
  width: 28px;
  background-color: rgba(255, 255, 255, 0.4);
  border: none;
  border-radius: 2px;
}

.ol-zoom .ol-zoom-in:hover,
.ol-zoom .ol-zoom-out:hover {
  background-color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
}

.ol-zoom .ol-zoom-in {
  border-radius: 2px 2px 0 0;
}

.ol-zoom .ol-zoom-out {
  border-radius: 0 0 2px 2px;
}

/* Custom zoom controls */
.custom-zoom-control {
  position: absolute;
  left: 10px;
  bottom: 50px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: rgba(255, 255, 255, 0.4);
  padding: 2px;
  border-radius: 4px;
}

.custom-zoom-control button {
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255, 255, 255, 0.4);
  color: #333;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
  padding: 0;
  border-radius: 2px;
}

.custom-zoom-control button:hover {
  background: rgba(255, 255, 255, 0.7);
}

/* Remove default OpenLayers zoom controls if they appear */
.ol-zoom {
  display: none !important;
}

/* Dropdown styling */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  cursor: pointer;
  color: white;
  text-decoration: none;
}

.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  background-color: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(5px);
  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;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

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

.dropdown-section {
  margin-bottom: 15px;
}

.dropdown-section h4 {
  margin: 0 0 5px 0;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.3);
  color: #000;
  font-size: 14px;
  font-weight: bold;
}

.dropdown-section a {
  color: #000;
  text-decoration: none;
  display: block;
  padding: 5px 0;
  font-size: 13px;
}

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

/* User controls positioning */
.user-controls {
  position: absolute;
  top: 10px;
  right: 20px;
  color: white;
  z-index: 1000;
}

.user-controls a {
  color: white;
  text-decoration: none;
}

/* Enhanced Feedback Drawing Panel Styles */
.feedback-draw-panel {
  position: absolute;
  top: 80px;
  right: 20px;
  width: 320px;
  background-color: rgba(0, 0, 0, 0.75); /* Darker background for better contrast */
  color: white;
  border-radius: 4px;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  overflow: hidden;
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.feedback-draw-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background-color: rgba(0, 0, 0, 0.5);
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.feedback-draw-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: bold;
  color: #fff;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.feedback-draw-close {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  padding: 0 5px;
}

.feedback-draw-body {
  padding: 15px;
}

/* Category Selector */
.feedback-category-selector {
  margin-bottom: 15px;
}

.feedback-category-selector label {
  display: block;
  margin-bottom: 5px;
  color: #fff;
  font-weight: bold;
  font-size: 14px;
}

.feedback-category-selector select {
  width: 100%;
  padding: 8px 10px;
  background-color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 3px;
  color: #000;
  font-size: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Drawing Tools */
.feedback-drawing-tools {
  margin-bottom: 15px;
  background-color: rgba(0, 0, 0, 0.2);
  padding: 10px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.feedback-drawing-tools span {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: bold;
  color: black;
}

.feedback-drawing-options {
  display: flex;
  flex-direction: column;
  margin: 8px 0;
}

.feedback-drawing-option {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  cursor: pointer;
  padding: 3px 0;
}

.feedback-drawing-option input[type="radio"] {
  margin-right: 10px;
  width: 16px;
  height: 16px;
}

.feedback-drawing-option span {
  font-weight: normal;
  font-size: 14px;
  margin-bottom: 0;
}

.feedback-start-btn {
  background-color: #0275d8;
  color: white;
  margin-top: 10px;
  width: 100%;
  border: none;
  padding: 8px 0;
  border-radius: 3px;
  cursor: pointer;
  font-weight: bold;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.feedback-start-btn:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
  opacity: 0.6;
}

.feedback-start-btn.active {
  background-color: #d9534f;
}

/* Drawing Status */
.feedback-drawing-status {
  margin: 12px 0;
  padding: 8px 10px;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 3px;
  font-size: 13px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  text-align: center;
}

/* Form Fields */
.feedback-form-fields {
  margin-bottom: 15px;
}

.feedback-form-fields label {
  display: block;
  margin-bottom: 5px;
  color: #fff;
  font-weight: bold;
  font-size: 14px;
}

.feedback-form-fields input,
.feedback-form-fields textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 12px;
  background-color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: #000;
  border-radius: 3px;
  box-sizing: border-box;
  font-size: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.feedback-form-fields textarea {
  min-height: 100px;
  resize: vertical;
}

/* Form Actions */
.feedback-form-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
}

.feedback-btn {
  padding: 8px 15px;
  border-radius: 3px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.feedback-cancel-btn {
  background-color: #6c757d;
  color: white;
}

.feedback-clear-btn {
  background-color: #5a6268;
  color: white;
}

.feedback-send-btn {
  background-color: #28a745;
  color: white;
}

/* Hover Effects */
.feedback-btn:hover {
  opacity: 0.9;
}

.feedback-start-btn:hover:not(:disabled) {
  opacity: 0.9;
}

.feedback-form-fields .g-recaptcha {
  margin: 15px 0;
  display: flex;
  justify-content: center;
}

.feedback-form-fields .g-recaptcha iframe {
  border: none;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* reCAPTCHA styling */
.g-recaptcha {
  margin: 15px 0;
  display: flex;
  justify-content: center;
}
