/* JMA Explorer Custom Styles */

/* Make modal title take full width so flexbox alignment works */
.modal-header .modal-title {
  flex: 1 !important;
  width: 100% !important;
}

/* Frozen overlay - blocks all interactions during data loading */
.frozen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3);
  z-index: 9999;
  display: none;
  cursor: wait;
}

.frozen-overlay.active {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: flex-end !important;
  padding: 80px 30px 30px 30px !important;
}

.frozen-overlay-content {
  position: relative;
  background: white;
  width: 400px;
  min-height: 200px;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.frozen-overlay-content .spinner-border {
  width: 3rem;
  height: 3rem;
  margin-bottom: 15px;
}

.frozen-overlay-content p {
  margin: 0;
  font-size: 1.1rem;
  color: #333;
}

.frozen-overlay-station {
  font-size: 1.3rem;
  font-weight: bold;
  color: #007bff;
  margin-bottom: 10px;
}

.frozen-overlay-close {
  position: absolute;
  top: 10px;
  right: 15px;
  border: none;
  background: none;
  font-size: 1.5rem;
  color: #666;
  cursor: pointer;
  line-height: 1;
}

.frozen-overlay-close:hover {
  color: #000;
}

/* Disable pointer events on sidebar when frozen */
body.ui-frozen .bslib-sidebar-layout>.sidebar {
  pointer-events: none;
  opacity: 0.6;
}

body.ui-frozen .navbar {
  pointer-events: none;
  opacity: 0.6;
}

/* Move plotly modebar to bottom */
.plotly .modebar-container {
  top: auto !important;
  bottom: 10px !important;
}

.plotly .modebar {
  background: rgba(255, 255, 255, 0.9) !important;
  border-radius: 4px;
  padding: 2px 5px;
}

/* Leaflet Legend Customization if needed */
.leaflet-control-layers-overlays label {
    font-size: 14px;
}

div.outer {
  position: relative;
  height: calc(100vh - 100px);
}

/* Position layers control below the home button */
/* Position layers control below the home button */
.map-layer-control {
  background: white;
  padding: 8px;
  border-radius: 4px;
  box-shadow: 0 0 15px rgba(0,0,0,0.2);
  width: 36px;
  height: 36px;
  overflow: hidden;
  transition: width 0.3s ease, height 0.3s ease;
  cursor: pointer;
}

.map-layer-control:hover, .map-layer-control.expanded {
  width: 220px;
  height: auto;
}

.map-layer-control .control-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.map-layer-control .control-content {
  display: none;
  margin-top: 10px;
  min-width: 200px;
}

.map-layer-control:hover .control-content, .map-layer-control.expanded .control-content {
  display: block;
}

#zoom_home_panel {
  z-index: 999 !important;
}

.btn-home {
  background: white;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  color: #444;
  width: 34px;
  height: 34px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-home:hover {
  background: #f4f4f4;
  color: #000;
}

