/*++++++++++++++++++++++ Mobile Styles ++++++++++++++++++++++++++++++++++*/

@media only screen and (max-width: 812px) {

  body {
    overflow-x: hidden;
    background-color: #FAFAFA;
    height: 100%;
  }

  .errorpage img {
    width: 200px;
    height: 200px;
  }

  .errorpage a {
    font-size: 20px;
    height: 25px;
  }

  /* Adjust maps and tools for mobile */
  .maps {
    position: absolute;
    top: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
  }

  .location_coordinates {
    position: absolute;
    z-index: 2;
    width: 90%;
    left: 15%;
    top: 5px;
  }

  .location_coordinates input, 
  .location_coordinates button, 
  .location_coordinates select {
    width: 40%;
    height: 25px;
    margin-bottom: 1px;
  }

.drawingtools {
  position: absolute;
  z-index: 2;
  width: 30px;
  left: 0;
  top: 150px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  height: auto;
  overflow: visible; /* Ensure overflow is visible */
}

  .drawingtools button {
    width: 35px;
    height: 35px;
    margin: 2px;
  }

    .drawingtools img {
    width: 25px;
    height: 25px;
      }
  .gpslocation {
    z-index: 2;
    width: 100%;
    left: 0;
    height: 30px;
    bottom: 10px; /* Distance from the bottom of the viewport */
    text-align: center;
    display: none; /* Change to block to make it visible */
    position: fixed; /* Fixes the position relative to the viewport */
  }

  /* Adjust sidemenu for mobile */
  .sidemenu {
    position: absolute;
    top: 15%;
    right: 10px;
    width: 40px;
    z-index: 3;
  }

  .sidemenu button {

    width: 40px;
    height: 40px;
    margin-bottom: 5px;
  }

  /* Adjust import/export popups for mobile */
  .dataex, .dataim {
    /*width: 70%;
    height: auto;
    top: 20%;
    left: 10%;
    transform: translate(0, 0);*/
    width: 70%;
    bottom: 100px;
    right: 50px;
  }

  .typeco, .projco {
    width: 100%;
  }

  .typeco button, .projco button, .typeco a, .projco label {
    width: 100%;
    margin: 5px 0;
  }

    .convert, .gotogps {
        width: 90%;
        bottom: 20px;
        right: 5%;
        left: 5%;
        padding: 16px;
    }
    
    .gotogps .startgo, .gotogps .stopgo {
        width: 100%;
        margin-right: 0;
        margin-bottom: 8px;
    }

/* Adjust login system for mobile */
/* Login/Logout Buttons */
.login_btn, .logout_btn {
    position: fixed;
    top: 10px;
    right: 10px;
    width: 45px !important; /* Fixed size for buttons */
    height: 45px;
    z-index: 1000;
    background-color: lightgray;
    border: 1px solid blue;
    border-radius: 25px;
    opacity: 0.8;
}

.login_btn img, .logout_btn img {
    width: 25px;
    height: 25px;
}

/* Login Forms */
.log_div {
    width: 95% !important;
    height: auto !important; /* Change from 85% to auto */
    min-height: 400px; /* Minimum height */
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    border-radius: 15px;
    padding: 20px;
    overflow-y: auto; /* Add scrolling if content is too long */
    max-height: 90vh; /* Maximum height */
}

.log_div h3 {
    font-size: 20px;
    margin-bottom: 20px;
    text-align: center;
}

/* Form Inputs - FIXED */
.logsys input[type=text],
.logsys input[type=password],
.logsys input[type=email] {
    width: 100% !important; /* Change from 90% to 100% */
    left: 0 !important; /* Remove the left positioning */
    height: 45px;
    font-size: 16px; /* Prevents zoom on iOS */
    margin: 10px 0;
    padding: 0 12px;
    box-sizing: border-box;
}

.logsys .btn {
    width: 100% !important; /* Change from 90% to 100% */
    left: 0 !important; /* Remove the left positioning */
    height: 45px;
    font-size: 16px;
    margin: 15px 0;
    box-sizing: border-box;
}

/* Password container fix */
.password-container {
    position: relative;
    width: 100%;
}

.password-container input {
    width: 100% !important;
    padding-right: 50px !important; /* Space for eye icon */
    box-sizing: border-box;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password img {
    width: 20px;
    height: 20px;
    opacity: 0.6;
}

/* Labels and Text */
.logsys label {
    display: block;
    width: 100% !important;
    left: 0 !important;
    font-size: 14px;
    margin-bottom: 5px;
}

.logsys p {
    width: 100% !important;
    left: 0 !important;
    font-size: 14px;
    text-align: center;
    margin: 10px 0;
}

/* Form field container fix */
.form-field {
    position: relative;
    width: 100% !important;
    left: 0 !important;
    margin-bottom: 15px;
}

/* Cloudflare Turnstile */
.cf-turnstile {
    width: 100% !important;
    left: 0 !important;
    transform: scale(0.9);
    transform-origin: center; /* Center instead of left */
    display: flex;
    justify-content: center;
}

/* Close Button */
.btnhide {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 35px;
    height: 35px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10;
}

.btnhide img {
    width: 20px;
    height: 20px;
}

/* Logout Menu Items */
.labelout {
    font-size: 14px;
    display: block;
    width: 100%;
    padding: 8px 0;
}

.labelout img {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    vertical-align: middle;
}

/* Ensure proper spacing in forms */
.log_div > * {
    line-height: 1.5 !important; /* Fix the compressed line height */
    margin-bottom: 15px !important;
}

/* Specific form heights for mobile */
#logiform {
    min-height: 450px;
}

#regiForm {
    min-height: 500px;
}

#logoutdiv {
    min-height: 450px;
}

#changePasswordForm {
    min-height: 500px;
}
/*+++++++++++++++++++++++++++++++++++++++*/
    .layer-popup-content {
        padding: 20px;
        max-width: 300px;
    }
    
    .layer-option {
        padding: 12px;
        font-size: 14px;
    }
    
    .layer-popup-content h3 {
        font-size: 18px;
    }





}