:root {
  --legend-height-mobile: 200px;
  --sidebar-height-mobile: 300px;
}

@media only screen and (max-width: 1521px) {
  .nav .menu {
    justify-content: flex-end !important;
  }
  .nav {
    display: flex;
    justify-content: space-between !important;
    align-items: center !important;
  }
  #mobile-menu {
    display: block !important;
  }
  #mobile-menu i {
    font-size: large !important;
  }
  #mobile-menu .close-dropdown i {
    font-size: 26px !important;
    margin: 0 5px 0 0;
  }
  #mobile-menu .submenu {
    text-align: left !important;
    left: -130px !important;
    width: 152px !important;
    height: auto !important;
    z-index: 99999 !important;
  }
  .hide-on-mobile {
    display: none !important;
  }
  .profile .nav-item {
    padding: 10px 0 !important;
  }
  .profile .submenu .dropdown-menu,
  #nav-new .profile .submenu .dropdown-menu {
    list-style: none;
    position: static;
    border: none;
  }  
  #mobile-menu .submenu .dropdown-menu {
    width: 100%;
  }
  .profile .submenu li,
  .profile .submenu a {
    font-size: 14px !important;
  }
  .profile .submenu li {
    padding-inline: 5px !important;
    border-top: 1px solid #dcdcdc;
  }
  .profile .submenu li:first-child{
    border-top-color: transparent;
  }
  .profile .submenu a {
    padding-inline: 0 !important;
  }
  ul.submenu li:hover, ul.submenu a:hover{
    background-color: transparent;
  }
  .profile .submenu li.relative:last-child{
    padding-bottom: 0 !important;
  }
  .profile .submenu li.relative >a{
    padding-inline: 5px !important;
  }
  .profile .submenu .dropdown-parent .dropdown-menu {
    display: none !important;
  }
  .profile .submenu .dropdown-parent.open .dropdown-menu.show {
    display: block !important;
  }
  .profile .submenu .dropdown-menu{
    border-top: 1px solid #dcdcdc;
    padding: 5px 0 0;
    margin: 10px 0 0;
  }
  .profile .submenu .dropdown-menu li{
    border-top: none;
    padding-inline: 5px !important;
    padding-block: 5px !important;
  }
  .profile .submenu .dropdown-menu li a{
    font-weight: 400;
  }
  .profile .submenu .dropdown-parent .dropdown-toggle svg,
  #mobile-menu .submenu .dropdown-parent .dropdown-toggle svg {
    transform: rotate(0deg) scale(0.9);
  }
  .profile .submenu .dropdown-parent.open .dropdown-toggle svg,
  #mobile-menu .submenu .dropdown-parent.open .dropdown-toggle svg{
    transform: rotate(180deg) scale(0.9);
  }
}

@media only screen and (max-width: 641px) {
  #mobile-menu .submenu {
    width: 100% !important;
  }
  /* Modal Start */
  #customDataModal .modal-content {
    width: 95% !important;
  }

  .modal {
    padding-top: 2% !important;
    padding-bottom: 2% !important;
  }
  .modal-content {
    width: 95% !important;
    min-width: unset;
  }

  #propertiesWrapper {
    padding: 10px !important;
    margin-top: 60px !important;
    /* padding-top: 70px !important; */
    height: calc(100% - 60px) !important;
  }
  #propertiesWrapper.full-modal-embeded {
    margin-top: 0 !important;
    height: 100%;
  }
  .remove {
    text-align: end !important;
    right: 15px !important;
    top: 10px !important;
  }
  #propertiesWrapper .map-news-container {
    overflow-y: initial !important;
    max-height: fit-content !important;
  }
  #propertiesWrapper .map-news-container .news-item {
    text-align: justify !important;
    margin-bottom: 20px !important;
  }
  #propertiesWrapper #stock-chart {
    flex-direction: column !important;
  }
  #propertiesWrapper #modal-nav-buttons {
    flex-wrap: wrap !important;
    justify-content: left !important;
  }
  #propertiesWrapper #modal-nav-buttons a {
    padding: 10px !important;
    font-size: 12px !important;
  }
  #propertiesWrapper #mainContent {
    flex-direction: column !important;
  }
  #propertiesWrapper #mainContent > table:first-child, #propertiesWrapper #mainContent #stock-chart-wrapper {
    width: 100% !important;
  }
  #propertiesWrapper #mainContent #stock-chart-wrapper {
    margin-top: 10px !important;
  }
  /* Modal End */

  /* Nav Menu Start */
  #logo-wrap {
    display: none !important;
  }
  .nav .logo {
    display: flex !important;
    width: 120px !important;
    margin-left: 0 !important;
  }
  .nav .logo img {
    width: 100% !important;
  }
  .nav .menu {
    justify-content: flex-end !important;
  }
  .nav {
    display: flex;
    justify-content: space-between !important;
    align-items: center !important;
    background: #192342 !important;
    width: 100% !important;
    height: 60px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    box-shadow:0 .5rem 1rem rgba(0,0,0,.15);
    position: relative;
    z-index: 999999;
  }
  #mobile-menu {
    display: block !important;
  }
  #text-logo {
    height: 45% !important;
  }
  .profile .nav-item, #account .nav-item {
    padding: 10px 0 !important;
  }
  /* .profile .nav-item {
    color: #444 !important;
  } */
  #account .cta-btn {
    padding: 8px 10px !important;
  }
  #profile .submenu {
    left: -45px !important;
    z-index: 99999 !important;
  }
  #mobile-menu .submenu {
    text-align: left !important;
    left: 0px !important;
    width: 100% !important;
    height: auto !important;
    z-index: 99999 !important;
    position: fixed;
    top: 60px;
    padding-inline: 10px;
  }
  .profile .submenu li, .profile .submenu a {
    padding: 10px !important;
    font-size: 14px !important;
    text-align: left !important;
  }
  .profile .submenu a {
    padding: 0 !important;
    text-decoration: none !important;
    color: #000 !important;
  }
  .mt-60 {
    margin-top: 0 !important;
  }
  /* Nav Menu End */

  /* Main Page Start */
  .eleInfo {
    position: absolute !important;
    left: 0 !important;
    z-index: 100000 !important;
    transition: all .3s;
    width: 100% !important;
    height: 100% !important;
    padding-bottom: 0 !important;
    display: flex;
    flex-direction: column;

  }

  /* .eleInfo::before {
    content: '';
    position: absolute;
    width: 100vw;
    height: 100dvh;
    background-color: rgba(0,0,0,0.4);
  } */

  .eleInfo.left-panel-menu-closed {
    width: 0 !important;
  }
  #mapWrapper {
    width: 100%;
  }


  #map-autocomplete-search {
    right: 0px !important;
    width: 100% !important;
    top: 60px;
    z-index: 99999;
  }

  #map-autocomplete-search .fa-search {
    height: 50px;
    line-height: 50px;
  }

  #customSearch {
    border-radius: 0;
    padding: 16px 20px;
    padding-left: 2.375rem;
  }

  #customSearchautocomplete-list {
    width: 100% !important;
    border-top: 1px solid lightgray;
    top: 49px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2),0 -1px 0px rgba(0,0,0,0.02);
  }
  
  .leaflet-control-zoom {
    display: none !important;
  }

  .autocomplete-items div:nth-child(even) {
    background-color: rgb(247, 247, 247);
  }

  #viewMoreContent .search-result-item {
    padding: 0 !important;
  }
  #viewMoreContent .view-more-project {
    width: fit-content !important;
  }

  /* #markerLegends {
    margin-bottom: 65px !important;
    margin-right: 5px !important;
  } */
  /* Main Page End */
  
  .mobile-company-card {
    margin: 0 !important;
    padding: 15px !important;
  }

  /* Company Profile Start */
  #social-icons {
    margin-top: 24px !important;
  }
  #content {
    margin-top: 25px !important;
  }
  #company-projects-map {
    padding: 0 !important;
  }
  #companyPresentation, #companyManagement {
    padding: 10px 12px !important;
    font-size: 12px !important;
    height: 40px !important;
  }
  #stock-chart .company-page-chart #advChart div.qmodii-component-header.qmodii-modifiers > div > div > div.flex.xs12.sm12.md12.lg7 > div div.flex {
    flex-basis: 50% !important;
    flex-grow: 0 !important;
    max-width: 50% !important;
  }
  #stock-chart .company-page-chart #advChart div.qmodii-component-header.qmodii-component-symbolbar div.qmodii-advChart-addCompare > button {
    font-size: 12px !important;
    padding: 10px !important;
  }
  #stock-chart.stock-chart-company,
  #stock-chart .company-page-chart.qmodii,
  #stock-chart .company-page-chart.qmodii #advChart,
  #stock-chart .company-page-chart.qmodii .qmodii-content,
  #stock-chart .company-page-chart.qmodii .container.qmodii-cont.qmodii-advanced-chart,
  #stock-chart .company-page-chart.qmodii .qmod-component.qmodii-component-wrap.qmodii-component-advancedChart,
  #stock-chart .company-page-chart.qmodii .qmod-component-content,
  #stock-chart .company-page-chart.qmodii .qmodii-component-cont {
    height: 750px !important;
  }
  /* Company Profile End */

  /* Project Profile Start */
  #main-profile-container {
    flex-direction: column !important;
  }
  #main-profile-container #goBackBtn {
    margin: 0 !important;
  }
  #right-sider {
    /* order: 1 !important; */
    padding: 0 !important;
    width: 100% !important;
    /* margin-top: 30px !important; */
  }
  /* #download-links {
    margin: 25px auto !important;
  } */
  #profile-container {
    /* order: 2 !important; */
    width: 100% !important;
  }
  #request-access-container {
    flex-direction: column !important;
  }
  #request-access-container p:first-child {
    width: 100% !important;
  }
  #request-access-container div {
    justify-content: flex-end !important;
  }
  .card.company-card.bottom-card {
    margin: 0 !important;   
  }
  #additional-projects-wrapper {
    margin: 0 !important;
    padding: 15px !important;
  }
  #additional-projects {
    margin-bottom: 30px !important;
    overflow-x: auto !important;
  }
  /* Project Profile End */

  /* News Start */
  #full-page-wrapper .news-wrapper {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
  }
  #quick-search-container {
    flex-wrap: wrap !important;
  }
  #filters-modal {
    z-index: 99999 !important;
  }
  /* News End */

  /* Article Start */
  #news-article-wrapper {
    flex-direction: column !important;
    padding: 10px !important;
    margin-top: 10px !important;
  }

  #news-article-wrapper #main-wrapper {
    flex-direction: column !important;
  }

  #news-article-wrapper .companies-wrapper #company-logo {
    max-height: 53px !important;
  }

  #news-article-wrapper .companies-wrapper #social-icons {
    margin-top: 0 !important;
  }

  #news-article-wrapper #companiesWrapper .news-item {
    padding: 0 !important;
  }

  #news-article-wrapper #companiesWrapper, #news-article-wrapper .companies-wrapper {
    margin: 0 !important;
    width: 100%;
  }
  /* Article End */

  /* Company Profile Content Start */
  #company-profile-content-wrapper {
    flex-direction: column !important;
    padding: 10px !important;
  }
  #company-profile-content-wrapper .profile-editor {
    order: 2 !important;
    width: 100% !important;
    padding: 10px !important;
  }
  #company-profile-content-wrapper .side-bar {
    order: 1 !important;
    width: 100% !important;
  }
  /* Company Profile Content End */

  /* Company Profile Content View Start */
  #company-profile-content-view-wrapper {
    flex-direction: column !important;
    padding: 10px !important;
  }
  #company-profile-content-view-wrapper #companyContent, #company-profile-content-view-wrapper #documents {
    width: 100% !important;
    padding: 10px !important;
  }
  /* Company Profile Content View End */

  /* Company Management Editor Start */
  #company-management-editor-wrapper {
    padding: 10px !important;
  }
  #company-management-editor-wrapper .profile-editor {
    width: 100% !important;
    padding: 10px !important;
  }
  #company-management-editor-wrapper .profile-editor .editor-save {
    width: 100% !important;
  }
  /* Company Management Editor End */

  /* Project Profile Content Start */
  #project-profile-content-wrapper {
    flex-direction: column !important;
    padding: 10px !important;
  }
  #project-profile-content-wrapper .profile-editor {
    order: 2 !important;
    width: 100% !important;
    padding: 10px !important;
  }
  #project-profile-content-wrapper .profile-editor .editor-save {
    width: 100% !important;
  }
  #project-profile-content-wrapper .side-bar {
    order: 1 !important;
    width: 100% !important;
  }
  /* Project Profile Content End */

  /* Project Profile Content View Start */
  #project-profile-content-view-wrapper {
    flex-direction: column !important;
    padding: 10px !important;
  }
  #project-profile-content-view-wrapper #profileContent, #project-profile-content-view-wrapper .side-bar {
    width: 100% !important;
    padding: 10px !important;
  }
  /* Company Profile Content View End */
  
  .hide-on-mobile {
    display: none !important;
  }

  figure {
    width: auto !important;
  }

  /* Mineral Belt Modal Style */
  #propertiesWrapper[data-type="mineral-belt"] #propertiesContent {
    padding: 0 10px 0 0 !important;
  }
  #propertiesWrapper[data-type="mineral-belt"] #propertiesContent #mineral-belt-properties {
    padding: 0 !important;
  }
  #propertiesWrapper[data-type="mineral-belt"] #propertiesContent #mineral-belt-properties div:last-of-type {
    flex-wrap: wrap !important;
  }
  #propertiesWrapper[data-type="mineral-belt"] #propertiesContent #mineral-belt-properties div:last-of-type input[type="button"] {
    flex-grow: 1 !important;
    width: 33% !important;
    font-size: 12px !important;
    padding: 5px 10px !important;
    margin: 0 5px 10px !important;
    height: 40px !important;
  }
  #propertiesWrapper[data-type="mineral-belt"] #propertiesContent #mineral-belt-modal-wrapper-div #_mineralBeltProjects,
  #propertiesWrapper[data-type="mineral-belt"] #propertiesContent #mineral-belt-modal-wrapper-div #_newsTab,
  #propertiesWrapper[data-type="mineral-belt"] #propertiesContent #mineral-belt-modal-wrapper-div #_articlesTab,
  #propertiesWrapper[data-type="mineral-belt"] #propertiesContent #mineral-belt-modal-wrapper-div #_rankedDrillResultsTab,
  #propertiesWrapper[data-type="mineral-belt"] #propertiesContent #mineral-belt-modal-wrapper-div #_summaryTab {
    padding: 0 !important;
  }
  
  /* Top Navbar */
  #companies-search-autocomplete {
    width: 80px !important;
    display: none !important;
  }

  /* #wm-nav-btn {
    margin-right: 10px;
  } */
  
  #wm-nav-btn #tooltiptext {
    right: -5px !important;
  }

  .cta-btn-mobile {
    padding: 8px 10px !important;
  }
  .cta-btn-mobile:before {
    animation: none !important;
  }
  .cta-btn-mobile i {
    font-size: inherit !important;
  }

  #user-menu-item-unauth, #user-menu-item-auth {
    right: 0 !important;
    top: 29px !important;
  }

  div.nav > div.menu > div.nav-divider {
    height: 35px !important;
    margin-left: 20px !important;
    margin-right: 10px !important;
  }

  #static-menu-link {
    display: flex !important;
    padding: 0 10px !important;
    align-items: center !important;
  }
  #static-menu {
    z-index: 9999 !important;
  }

  #companies-searchbarautocomplete-list {
    z-index: 1000 !important;
  }
  
  /* Mineral Belt Modal Style */
  #propertiesWrapper[data-type="mineral-belt"] #propertiesContent {
    padding: 0 10px 0 0 !important;
  }
  #propertiesWrapper[data-type="mineral-belt"] #propertiesContent #mineral-belt-properties {
    padding: 0 !important;
  }
  #propertiesWrapper[data-type="mineral-belt"] #propertiesContent #mineral-belt-properties div:last-of-type {
    flex-wrap: wrap !important;
  }
  #propertiesWrapper[data-type="mineral-belt"] #propertiesContent #mineral-belt-properties div:last-of-type input[type="button"] {
    flex-grow: 1 !important;
    width: 33% !important;
    font-size: 12px !important;
    padding: 5px 10px !important;
    margin: 0 5px 10px !important;
    height: 40px !important;
  }
  #propertiesWrapper[data-type="mineral-belt"] #propertiesContent #mineral-belt-modal-wrapper-div #_mineralBeltProjects,
  #propertiesWrapper[data-type="mineral-belt"] #propertiesContent #mineral-belt-modal-wrapper-div #_newsTab,
  #propertiesWrapper[data-type="mineral-belt"] #propertiesContent #mineral-belt-modal-wrapper-div #_articlesTab,
  #propertiesWrapper[data-type="mineral-belt"] #propertiesContent #mineral-belt-modal-wrapper-div #_rankedDrillResultsTab,
  #propertiesWrapper[data-type="mineral-belt"] #propertiesContent #mineral-belt-modal-wrapper-div #_summaryTab {
    padding: 0 !important;
  }

  /* Service Providers */
  #service-provider-autocomplete {
    width: 94% !important;
  }
  #service-provider-types-autocomplete, #service-provider-location-autocomplete {
    width: 100% !important;
  }

  /* serviceProviderDataModal */
  #serviceProviderDataModal .modal-header {
    padding: 8px !important;
  }
  #serviceProviderDataModal .modal-logo {
    width: 230px !important;
    padding: 10px 8px !important;
  }
  #serviceProviderDataModal #serviceProviderDataModalBody {
    padding: 8px !important;
  }
  #serviceProviderDataModal #service-providers-tabs-wrapper {
    flex-direction: column !important;
  }
  #serviceProviderDataModal #service-providers-tabs-wrapper .b-nav-tab {
    width: 100% !important;
    margin-bottom: 5px !important;
  }
  #serviceProviderDataModal #service-providers-tabs .b-tab {
    max-height: 438px !important;
  }
  
  #_footer {
    position: relative !important;
  }


  #registerModal .reg-type-wrapper {
    flex-wrap: wrap;
  }

  #registerModal .auth-wrapper {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  #registerModal .auth-wrapper span {
    white-space: nowrap;
  }

  #registerModal .auth-wrapper > div {
    margin-top: 0;
  }

  #registerModal .modal-content {
    min-width: unset;
  }

  #registerModal .auth-div {
    width: 100%;
    margin-top: 10px;
    margin-bottom: 10px;
    height: 20px;
  }

  #registerModal .auth-div::after, #registerModal .auth-div::before {
    display: none;
  }

  #registerModal .user-details.form-wrapper {
    margin-top: 0;
  }

  #registerModal .group-field {
    flex-wrap: wrap;
  }

  #registerModal .group-field input, 
  #registerModal .group-field select {
    width: 100% !important;
  }

  #share-social-img-btn-wrapper {
    display: none;
  }


  #share-link-btn-wrapper {
    position: fixed !important;
    top: 116px !important;
    right: 6px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2),0 -1px 0px rgba(0,0,0,0.02);
    border-radius: 4px;
    overflow: hidden;
  }

  #measure-tool-btn-wrapper {
    position: fixed !important;
    top: 154px !important;
    right: 6px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2),0 -1px 0px rgba(0,0,0,0.02);
    border-radius: 4px;
    overflow: hidden;
  }

  #layers-tool-btn-wrapper {
    display: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2),0 -1px 0px rgba(0,0,0,0.02);
  }

  .eleInfo.left-panel-menu-closed #leftMenuBtn {
    top: 116px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2),0 -1px 0px rgba(0,0,0,0.02);
    right: -37px;
  }

  #leftMenuBtn {
    top: 60px !important;
    height: 38px;
    width: 45px;
    right: 0px;
    box-shadow: none;
    text-align: center;
  }

  #leftPanelMenu #mobile-logo-wrap {
    height: 60px !important;
  }

  #sidebar-tabs-wrapper {
    justify-content: flex-start !important;
    margin-top: 60px !important;
    padding: 0;
    order: 1;
  }

  .sidebar-tab[data-tab="pro-ui"] {
    border: 0;
    border-radius: 0;
    transform: translateX(-2px);
  }

  #sidebar-terms-and-logos-wrapper {
    order: 2;
    background-color: white;
    position: relative;
  }

  #sidebar-content-wrapper-menu {
    order: 3;
    background-color: white;
    position: relative;
    height: calc(100% - 218px) !important;
  }

  /* #sidebar-content-wrapper-menu {
    height: calc(100% - 160px);
  } */

  #companies-carousal {
    margin: 0 !important;
    min-height: unset !important;
    border-top: 1px solid lightgray;
    border-bottom: 1px solid lightgray;
  }

  #share-link-btn-wrapper .active-layer,
  #share-link-btn-wrapper .new-brand-btn {
    background-color: white !important;
    color: #333;
  }

  #measure-tool-btn-wrapper .active-layer,
  #measure-tool-btn-wrapper .new-brand-btn {
    background-color: white !important;
    color: #333;
  }

  #featuredCompaniesCollapse {
    margin: 0 !important;
    width: 100% !important;
    font-size: 11px !important;
    background-color: white !important;
    border-radius: 20px 20px 0 0;
    overflow: hidden;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.2),0 -1px 0px rgba(0,0,0,0.02);
  }

  #featuredCompaniesCollapse img {
    width: 12px !important;
  }

  #featuredCompaniesCollapse label {
    padding: 10px;
    padding-top: 12px;
    background: #e8e8e8 !important;
    font-weight: bold;
  }

  .featuredCompaniesAccordion > input[type="checkbox"]:checked ~ .content {
    height: var(--legend-height-mobile) !important;
    overflow: visible;
  }

  #featuredCompaniesCollapse .content {
    padding: 8px;
    padding-top: 0 !important;
    max-height: 50dvh;
    overflow: auto;
  }

  #featuredCompaniesCollapse .f-companies-list {
    max-height: unset;
  }

  #featuredCompaniesCollapse .fa-chevron-up,
  #featuredCompaniesCollapse .fa-chevron-down {
    position: absolute;
    right: 12px;
    color: #333;
  }

  #featuredCompaniesCollapse .handle {
    color: #e8e8e8;
    user-select: none;
    position: relative;
  }

  #legend-handle-mobile-event-catcher {
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
  }

  #featuredCompaniesCollapse .handle::before {
    content: '';
    height: 4px;
    background-color: rgba(0,0,0,0.2);
    width: 40px;
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-20px);
    border-radius: 1000px;
    pointer-events: none;
  }

  .leaflet-bottom.leaflet-right {
    width: 100%;
  }

  #customControls {
    display: block !important;
    width: 100%;
  }

  #propertiesWrapper {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: var(--sidebar-height-mobile) !important;
    background-color: white !important;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.2),0 -1px 0px rgba(0,0,0,0.02);
    top: unset;
    margin-top: 0 !important;
    padding-top: 30px !important;
  }

  #propertiesWrapper::before {
    content: '';
    height: 4px;
    background-color: rgba(0,0,0,0.2);
    width: 40px;
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-20px);
    border-radius: 1000px;
    pointer-events: none;
    z-index: 9;
  }

  #_projectSummaryShareIframe {
    display: none !important;
  }

  #propertiesWrapperDraghandle {
    display: block;
    position: absolute;
    width: 100%;
    height: 30px;
    top: 0;
    left: 0;
  }

  #floating-loader {
    display: none !important;
  }

  .share-content-modal {
    position: relative !important;
  }

  #article-navbar {
    padding: 0 !important;
    margin-bottom: 0 !important;
  }

  #projectDetail, #remove {
    padding: 6px !important;
  }

  #news-article-wrapper {
    margin-top: 0 !important;
  }

}

@media only screen and (max-width: 345px) {
  .cta-btn-mobile {
    padding: 5px !important;
  }
  .cta-btn-mobile i {
    font-size: small !important;
  }
}