/*!
 * Copied from https://raw.githubusercontent.com/Microsoft/reactxp/master/samples/TodoList/web/css/app.css
 *
* Base Web Styles for app
*/

/**
 * 1. Change the default font family in all browsers.
 * 2. Prevent adjustments of font size after orientation changes in IE and iOS.
 */
 
@font-face {
	font-family: Montserrat;
	font-weight: 100 400;
	src: url(fonts/Montserrat.ttf);
}

@font-face {
	font-family: Montserrat;
	font-weight: 500 800;
	src: url(fonts/Montserrat_bold.ttf);
}

html {
	font-family: Montserrat, sans-serif; /* 1 */
  font-size: 14px;
	-ms-text-size-adjust: 100%; /* 2 */
	-webkit-text-size-adjust: 100%; /* 2 */
}

/**
 * Remove the margin in all browsers.
 */

body {
  margin: 0;
}

/* HTML5 display definitions
   ========================================================================== */

/**
 * Add the correct display in IE 9-.
 * 1. Add the correct display in Edge, IE, and Firefox.
 * 2. Add the correct display in IE.
 */

article,
aside,
details, /* 1 */
figcaption,
figure,
footer,
header,
main, /* 2 */
menu,
nav,
section,
summary { /* 1 */
  display: block;
}

/**
 * Add the correct display in IE 9-.
 */

audio,
canvas,
progress,
video {
  display: inline-block;
}

/**
 * Add the correct display in iOS 4-7.
 */

audio:not([controls]) {
  display: none;
  height: 0;
}

/**
 * Add the correct vertical alignment in Chrome, Firefox, and Opera.
 */

progress {
  vertical-align: baseline;
}

#app-pre-bootstrap-loader {
  height: 100vh;
  display: flex;
  justify-content: center;
}

#loader-img {
  align-self: center;
}

/**
 * Add the correct display in IE 10-.
 * 1. Add the correct display in IE.
 */

template, /* 1 */
[hidden] {
  display: none;
}

/* Links
   ========================================================================== */

/**
 * Remove the gray background on active links in IE 10.
 */

a {
  background-color: transparent;
}

/**
 * Remove the outline on focused links when they are also active or hovered
 * in all browsers (opinionated).
 */

a:active,
a:hover {
  outline-width: 0;
}

/* Text-level semantics
   ========================================================================== */

/**
 * 1. Remove the bottom border in Firefox 39-.
 * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
 */

abbr[title] {
  border-bottom: none; /* 1 */
  text-decoration: underline; /* 2 */
  text-decoration: underline dotted; /* 2 */
}

/**
 * Prevent the duplicate application of `bolder` by the next rule in Safari 6.
 */

b,
strong {
  font-weight: inherit;
}

/**
 * Add the correct font weight in Chrome, Edge, and Safari.
 */

b,
strong {
  font-weight: bolder;
}

/**
 * Add the correct font style in Android 4.3-.
 */

dfn {
  font-style: italic;
}

/**
 * Correct the font size and margin on `h1` elements within `section` and
 * `article` contexts in Chrome, Firefox, and Safari.
 */

h1 {
  font-size: 2em;
  margin: 0.67em 0;
}

/**
 * Add the correct background and color in IE 9-.
 */

mark {
  background-color: #ff0;
  color: #000;
}

/**
 * Add the correct font size in all browsers.
 */

small {
  font-size: 80%;
}

/**
 * Prevent `sub` and `sup` elements from affecting the line height in
 * all browsers.
 */

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

/* Embedded content
   ========================================================================== */

/**
 * Remove the border on images inside links in IE 10-.
 */

img {
  border-style: none;
}

/**
 * Hide the overflow in IE.
 */

svg:not(:root) {
  overflow: hidden;
}

/* Grouping content
   ========================================================================== */

/**
 * 1. Correct the inheritance and scaling of font size in all browsers.
 * 2. Correct the odd `em` font sizing in all browsers.
 */

code,
kbd,
pre,
samp {
  font-family: monospace, monospace; /* 1 */
  font-size: 1em; /* 2 */
}

/**
 * Add the correct margin in IE 8.
 */

figure {
  margin: 1em 40px;
}

/**
 * 1. Add the correct box sizing in Firefox.
 * 2. Show the overflow in Edge and IE.
 */

hr {
  box-sizing: content-box; /* 1 */
  height: 0; /* 1 */
  overflow: visible; /* 2 */
}

/* Forms
   ========================================================================== */

/**
 * Change font properties to `inherit` in all browsers (opinionated).
 */

button,
input,
select,
textarea {
  font: inherit;
}

/**
 * Restore the font weight unset by the previous rule.
 */

optgroup {
  font-weight: bold;
}

/**
 * Show the overflow in IE.
 * 1. Show the overflow in Edge.
 * 2. Show the overflow in Edge, Firefox, and IE.
 */

button,
input, /* 1 */
select { /* 2 */
  overflow: visible;
}

/**
 * Remove the margin in Safari.
 * 1. Remove the margin in Firefox and Safari.
 */

button,
input,
select,
textarea { /* 1 */
  margin: 0;
}

/**
 * Remove the inheritence of text transform in Edge, Firefox, and IE.
 * 1. Remove the inheritence of text transform in Firefox.
 */

button,
select { /* 1 */
  text-transform: none;
}

/**
 * Change the cursor in all browsers (opinionated).
 */

button,
[type="button"],
[type="reset"],
[type="submit"] {
  cursor: pointer;
}

/**
 * Restore the default cursor to disabled elements unset by the previous rule.
 */

[disabled] {
  cursor: default;
}

/**
 * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
 *    controls in Android 4.
 * 2. Correct the inability to style clickable types in iOS.
 */

button,
html [type="button"], /* 1 */
[type="reset"],
[type="submit"] {
  -webkit-appearance: button; /* 2 */
}

/**
 * Remove the inner border and padding in Firefox.
 */

button::-moz-focus-inner,
input::-moz-focus-inner {
  border: 0;
  padding: 0;
}

/**
 * Restore the focus styles unset by the previous rule.
 */

button:-moz-focusring,
input:-moz-focusring {
  outline: 1px dotted ButtonText;
}

/**
 * Change the border, margin, and padding in all browsers (opinionated).
 */

fieldset {
  border: 1px solid #c0c0c0;
  margin: 0 2px;
  padding: 0.35em 0.625em 0.75em;
}

/**
 * 1. Correct the text wrapping in Edge and IE.
 * 2. Correct the color inheritance from `fieldset` elements in IE.
 * 3. Remove the padding so developers are not caught out when they zero out
 *    `fieldset` elements in all browsers.
 */

legend {
  box-sizing: border-box; /* 1 */
  color: inherit; /* 2 */
  display: table; /* 1 */
  max-width: 100%; /* 1 */
  padding: 0; /* 3 */
  white-space: normal; /* 1 */
}

/**
 * Remove the default vertical scrollbar in IE.
 */

textarea {
  overflow: auto;
}

/**
 * 1. Add the correct box sizing in IE 10-.
 * 2. Remove the padding in IE 10-.
 */

[type="checkbox"],
[type="radio"] {
  box-sizing: border-box; /* 1 */
  padding: 0; /* 2 */
}

/**
 * Correct the cursor style of increment and decrement buttons in Chrome.
 */

[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
  height: auto;
}

/**
 * Correct the odd appearance of search inputs in Chrome and Safari.
 */

[type="search"] {
  -webkit-appearance: textfield;
}

/**
 * Remove the inner padding and cancel buttons in Chrome on OS X and
 * Safari on OS X.
 */

[type="search"]::-webkit-search-cancel-button,
[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
}

html {
  -webkit-font-smoothing: antialiased;
}
@media only screen and (-webkit-min-device-pixel-ratio: 1.25), only screen and (min-device-pixel-ratio: 1.25), only screen and (-webkit-min-device-pixel-ratio: 2.0833333333333335), only screen and (min-resolution: 200dpi), only screen and (min-resolution: 1.25dppx) {
  html {
    -webkit-font-smoothing: subpixel-antialiased;
  }
}

html {
  height: 100%;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  -webkit-tap-highlight-color: transparent;
  /* For some Androids */
}
body,
.app-container {
  height: 100%;
  width: 100%;
  overflow-y: hidden;
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
  -webkit-overflow-scrolling: touch;
}

.dom-user-select-text {
  -webkit-user-select: text;
  -moz-user-select:    text;
  -ms-user-select:     text;
  user-select:         text;
}

body.page--electron {
  background-image: url(../images/firstrun/startup_background.png);
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}
textarea {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
textarea::-webkit-input-placeholder {
  color: #bbb;
}
textarea:-moz-placeholder {
  color: #bbb;
}
textarea::-moz-placeholder {
  color: #bbb;
}
textarea:-ms-input-placeholder {
  color: #bbb;
}
input::-webkit-input-placeholder {
  color: #bbb;
}
input:-moz-placeholder {
  color: #bbb;
}
input::-moz-placeholder {
  color: #bbb;
}
input:-ms-input-placeholder {
  color: #bbb;
}
.inputGradient *::-webkit-input-placeholder {
  color: rgba(255, 255, 255, 0.3);
}
.inputGradient *:-moz-placeholder {
  color: rgba(255, 255, 255, 0.3);
}
.inputGradient *::-moz-placeholder {
  color: rgba(255, 255, 255, 0.3);
}
.inputGradient *:-ms-input-placeholder {
  color: rgba(255, 255, 255, 0.3);
}
svg {
  display: block;
}
*,
*:before,
*:after {
  box-sizing: border-box;
}
*:focus {
  outline: 0;
}
input::-ms-clear {
  display: none;
}
a {
  text-decoration: none;
}
video {
  width: 100%;
}
button {
  padding: 0;
}

/* Additional Leaflet styles to fix map display issues */
.leaflet-container {
  height: 400px;
  width: 100%;
}

.leaflet-tile {
  pointer-events: auto;
}

.leaflet-tile-container {
  overflow: visible;
}

.leaflet-map-pane {
  z-index: 1;
}

.leaflet-control-container {
  z-index: 1000;
}

/* Fix for fragmented map tiles */
.leaflet-layer,
.leaflet-control-zoom-in,
.leaflet-control-zoom-out,
.leaflet-control-attribution {
  filter: inherit !important;
}

/* Custom styles for leaflet draw controls */
.leaflet-draw-toolbar {
  margin: 0 !important;
  padding: 4px !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 4px !important;
  background: rgba(255, 255, 255, 0.95) !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
  backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  min-width: auto !important;
  width: auto !important;
  max-width: none !important;
}

.leaflet-draw-toolbar a {
  background-color: transparent;
  border: none;
  border-radius: 6px;
  width: 200px;
  height: 200px;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  position: relative;
  flex-shrink: 0;
  text-decoration: none;
  background-size: 200px 200px;
  background-repeat: no-repeat;
  background-position: center;
}

.leaflet-draw-toolbar a:hover {
  background-color: rgba(0, 123, 204, 0.1);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.leaflet-draw-toolbar a.leaflet-draw-draw-polygon {
  background-image: none !important;
  background-color: #007bcc !important;
  color: white !important;
  font-size: 12px !important;
  font-weight: bold !important;
  width: 100px !important;
  height: 44px !important;
  min-width: 80px !important;
  max-width: none !important;
  flex-shrink: 0 !important;
  flex-grow: 0 !important;
  text-align: center !important;
  line-height: 44px !important;
  white-space: nowrap !important;
  padding: 0 8px !important;
  box-sizing: border-box !important;
  text-indent: -9999px !important;
  overflow: hidden !important;
}

.leaflet-draw-toolbar a.leaflet-draw-draw-polygon::before {
  content: "Draw" !important;
  text-indent: 0 !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: white !important;
  font-size: 12px !important;
  font-weight: bold !important;
}

.leaflet-draw-toolbar a.leaflet-draw-draw-polygon:hover {
  background-color: rgba(0, 123, 204, 0.8) !important;
}

.leaflet-draw-toolbar a.leaflet-draw-edit-edit {
  background-image: none;
  background-color: #28a745;
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.leaflet-draw-toolbar a.leaflet-draw-edit-edit:hover {
  background-color: rgba(40, 167, 69, 0.8);
}

/* Ensure proper positioning for the toolbar */
.leaflet-top.leaflet-right .leaflet-draw-toolbar {
  margin-top: 10px;
  margin-right: 10px;
}

/* Style for active/selected tools */
.leaflet-draw-toolbar a.leaflet-draw-toolbar-button-enabled {
  background-color: rgba(0, 123, 204, 0.2);
  box-shadow: 0 0 0 2px rgba(0, 123, 204, 0.3);
}

/* Tooltip styling - ensure proper positioning */
.leaflet-draw-tooltip {
  background: rgba(0, 0, 0, 0.8) !important;
  color: white !important;
  border-radius: 4px !important;
  padding: 6px 10px !important;
  font-size: 12px !important;
  border: none !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
  white-space: nowrap !important;
  max-width: 200px !important;
  word-wrap: break-word !important;
  display: none !important;
}

.leaflet-draw-tooltip::before {
  border-top-color: rgba(0, 0, 0, 0.8) !important;
}

/* Fix tooltip positioning to prevent overflow */
.leaflet-draw-tooltip.leaflet-draw-tooltip-single {
  margin-left: -50% !important;
}

/* Ensure toolbar doesn't interfere with other controls */
.leaflet-control-container .leaflet-draw-toolbar {
  position: relative;
  z-index: 1000;
}

/* Styling for Leaflet Draw action buttons (Finish, Cancel, Delete last point) */
.leaflet-draw-actions {
  background: rgba(255, 255, 255, 0.95) !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
  backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  padding: 8px !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  min-width: 120px !important;
}

.leaflet-draw-actions a {
  background-color: #007bcc !important;
  color: white !important;
  text-decoration: none !important;
  padding: 8px 12px !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  font-weight: bold !important;
  text-align: center !important;
  transition: all 0.2s ease !important;
  border: none !important;
  display: block !important;
  min-height: auto !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

.leaflet-draw-actions a:hover {
  background-color: rgba(0, 123, 204, 0.8) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* Specific styling for different action buttons */
.leaflet-draw-actions a[title*="Finish"] {
  background-color: #28a745 !important;
}

.leaflet-draw-actions a[title*="Finish"]:hover {
  background-color: rgba(40, 167, 69, 0.8) !important;
}

.leaflet-draw-actions a[title*="Cancel"] {
  background-color: #dc3545 !important;
}

.leaflet-draw-actions a[title*="Cancel"]:hover {
  background-color: rgba(220, 53, 69, 0.8) !important;
}

.leaflet-draw-actions a[title*="Delete"] {
  background-color: #ffc107 !important;
  color: #212529 !important;
}

.leaflet-draw-actions a[title*="Delete"]:hover {
  background-color: rgba(255, 193, 7, 0.8) !important;
}

/* Ensure action buttons are properly positioned */
.leaflet-draw-actions-top {
  margin-top: 5px !important;
}

.leaflet-draw-actions-bottom {
  margin-bottom: 5px !important;
}

.leaflet-popup-content {
    margin: 0px !important;
}
