/* Cubino map chrome — cool-stone + Leaflet Voyager tiles */

.cubino-map-field,
.cubino-map-view {
  display: grid;
  gap: 0.65rem;
  min-width: 0;
}

.cubino-map-canvas {
  background:
    linear-gradient(145deg, rgba(20, 33, 61, 0.06), rgba(20, 33, 61, 0.05));
  border: 1px solid var(--cubino-line, rgba(20, 33, 61, 0.08));
  border-radius: var(--cubino-radius, 1rem);
  height: 16rem;
  overflow: hidden;
  position: relative;
  width: 100%;
  z-index: 0;
}

.cubino-map-view .cubino-map-canvas,
.cubino-map-view.cubino-map-canvas {
  height: 14rem;
}

.cubino-map-tools {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.75rem;
  justify-content: space-between;
}

.cubino-map-hint {
  color: var(--cubino-muted, #5b6b7a);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.45;
  margin: 0;
}

.cubino-map-privacy {
  display: grid;
  gap: 0.55rem;
}

.cubino-map-privacy-label {
  color: var(--cubino-navy, #14213d);
  font-size: 0.78rem;
  font-weight: 800;
}

.cubino-map-privacy-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.cubino-map-privacy-chip {
  align-items: center;
  background: rgba(20, 33, 61, 0.06);
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--cubino-navy, #14213d);
  cursor: pointer;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 800;
  gap: 0.35rem;
  min-height: 2.2rem;
  padding: 0.3rem 0.85rem;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.cubino-map-privacy-chip input {
  accent-color: var(--cubino-navy, #14213d);
  margin: 0;
}

.cubino-map-privacy-chip:has(input:checked) {
  background: var(--cubino-navy, #14213d);
  color: #fff;
}

.cubino-map-radius {
  display: grid;
  gap: 0.35rem;
}

.cubino-map-radius[hidden] {
  display: none !important;
}

.cubino-map-privacy-note {
  color: var(--cubino-muted, #5b6b7a);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.45;
  margin: 0;
}

.cubino-map-field.is-approximate .cubino-map-hint {
  color: #0f766e;
}

.cubino-map-clear {
  align-items: center;
  appearance: none;
  background: rgba(20, 33, 61, 0.05);
  border: 1px solid rgba(20, 33, 61, 0.1);
  border-radius: 999px;
  color: var(--cubino-navy, #14213d);
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  gap: 0.3rem;
  min-height: 2.35rem;
  padding: 0.35rem 0.85rem;
}

.cubino-map-clear:hover {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.2);
  color: var(--cubino-danger, #dc2626);
}

.cubino-map-clear[hidden] {
  display: none !important;
}

.cubino-map-coords {
  align-items: center;
  background: rgba(20, 33, 61, 0.08);
  border: 1px solid rgba(20, 33, 61, 0.14);
  border-radius: 999px;
  color: var(--cubino-teal, #14213d);
  display: inline-flex;
  font-size: 0.76rem;
  font-weight: 800;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  width: fit-content;
}

.cubino-map-coords[hidden] {
  display: none !important;
}

.cubino-map-coords::before {
  content: "";
  background: currentColor;
  border-radius: 999px;
  display: block;
  height: 0.45rem;
  width: 0.45rem;
}

.cubino-map-marker {
  background: transparent !important;
  border: 0 !important;
  direction: ltr;
  line-height: 0;
  margin: 0 !important;
  padding: 0 !important;
}

.cubino-map-marker-dot {
  background: var(--cubino-navy, #14213d);
  border: 2px solid #fff;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(20, 33, 61, 0.28);
  box-sizing: border-box;
  color: #5eead4;
  display: block;
  height: 100%;
  margin: 0;
  padding: 0;
  position: relative;
  width: 100%;
}

.cubino-map-marker.is-center .cubino-map-marker-center {
  background: #fff;
  border: 3px solid var(--cubino-navy, #14213d);
  box-shadow: 0 0 0 4px rgba(20, 33, 61, 0.16), 0 6px 14px rgba(20, 33, 61, 0.22);
}

.cubino-map-marker-dot svg {
  display: block;
  height: 16px;
  left: 50%;
  margin: 0;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
}

.cubino-map-unreachable {
  align-items: center;
  background: rgba(244, 247, 246, 0.94);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 1rem;
  position: absolute;
  z-index: 1200;
}

.cubino-map-unreachable[hidden] {
  display: none !important;
}

.cubino-map-unreachable-card {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(20, 33, 61, 0.1);
  border-radius: 1.15rem;
  box-shadow: 0 14px 36px rgba(20, 33, 61, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-width: 18rem;
  padding: 1.15rem 1.25rem;
  text-align: center;
}

.cubino-map-unreachable-icon {
  align-items: center;
  background: rgba(20, 33, 61, 0.06);
  border-radius: 999px;
  color: var(--cubino-navy, #14213d);
  display: inline-flex;
  font-size: 1.45rem;
  height: 2.75rem;
  justify-content: center;
  margin-bottom: 0.25rem;
  width: 2.75rem;
}

.cubino-map-unreachable-title {
  color: var(--cubino-navy, #14213d);
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1.45;
}

.cubino-map-unreachable-copy {
  color: var(--cubino-muted, #5b6b7a);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.65;
  margin: 0;
}

.leaflet-container {
  background: #eef3f2;
  direction: ltr !important;
  font-family: var(--cubino-font, "Estedad-VF", Tahoma, sans-serif);
  text-align: left;
}

.cubino-map-canvas .leaflet-pane,
.cubino-map-canvas .leaflet-map-pane,
.cubino-map-canvas .leaflet-marker-pane,
.cubino-map-canvas .leaflet-overlay-pane {
  direction: ltr !important;
}

.cubino-map-drag-handle {
  background: transparent !important;
  border: 0 !important;
  cursor: grab;
}

.cubino-map-drag-handle-hit {
  background: transparent;
  border-radius: 999px;
  display: block;
  height: 100%;
  width: 100%;
}

.leaflet-marker-draggable.cubino-map-drag-handle {
  cursor: grab;
}

.leaflet-marker-draggable.cubino-map-drag-handle:active {
  cursor: grabbing;
}

/* Zoom controls — soft Cubino chrome */
.cubino-map-canvas .leaflet-top.leaflet-left {
  left: 0.7rem;
  top: 0.7rem;
}

.cubino-map-canvas .leaflet-control-zoom.leaflet-bar {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(20, 33, 61, 0.1);
  border-radius: 0.85rem;
  box-shadow: 0 10px 24px rgba(20, 33, 61, 0.12);
  margin: 0;
  overflow: hidden;
  padding: 0.2rem;
}

.cubino-map-canvas .leaflet-control-zoom.leaflet-bar a {
  align-items: center;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0.65rem !important;
  color: var(--cubino-navy, #14213d) !important;
  display: flex !important;
  font-family: inherit;
  font-size: 1.15rem !important;
  font-weight: 800;
  height: 2.15rem !important;
  justify-content: center;
  line-height: 1 !important;
  margin: 0;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
  width: 2.15rem !important;
}

.cubino-map-canvas .leaflet-control-zoom.leaflet-bar a + a {
  margin-top: 0.12rem;
}

.cubino-map-canvas .leaflet-control-zoom.leaflet-bar a:hover,
.cubino-map-canvas .leaflet-control-zoom.leaflet-bar a:focus-visible {
  background: rgba(20, 33, 61, 0.08) !important;
  color: var(--cubino-navy, #14213d) !important;
}

.cubino-map-canvas .leaflet-control-zoom.leaflet-bar a:active {
  background: rgba(20, 33, 61, 0.14) !important;
  transform: scale(0.96);
}

.cubino-map-canvas .leaflet-control-zoom.leaflet-bar a.leaflet-disabled {
  color: rgba(20, 33, 61, 0.28) !important;
  cursor: default;
  opacity: 1;
}

.cubino-map-canvas .leaflet-bar a,
.cubino-map-canvas .leaflet-bar a:hover {
  background-image: none;
  border-bottom: 0;
}

.leaflet-control-attribution {
  background: rgba(255, 255, 255, 0.88) !important;
  border-radius: 0.55rem 0 0 0;
  color: var(--cubino-muted, #5b6b7a);
  font-size: 0.62rem !important;
  margin: 0 !important;
  padding: 0.2rem 0.45rem !important;
}

.leaflet-popup-content-wrapper {
  border-radius: 0.85rem;
  box-shadow: 0 10px 28px rgba(20, 33, 61, 0.14);
  color: var(--cubino-navy, #14213d);
  font-weight: 800;
}

.project-panel .cubino-map-canvas {
  height: 15rem;
}

.cubino-vr-app .cubino-vr-location-map {
  margin-top: 0.15rem;
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

.cubino-vr-app .cubino-vr-location-map .cubino-map-canvas {
  display: block;
  max-width: 100%;
  width: 100%;
}

.cubino-vr-app .cubino-map-canvas {
  border-radius: 0.95rem;
  height: 13.5rem;
}

.cubino-vr-app .cubino-vr-location {
  display: grid;
  gap: 0.75rem;
}

.cubino-vr-app .cubino-vr-location-head {
  align-items: flex-start;
  display: flex;
  gap: 0.7rem;
  min-width: 0;
}

.cubino-vr-app .cubino-vr-location-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}

.cubino-vr-app .cubino-vr-building-map-card {
    margin: 0;
}

.cubino-vr-app .cubino-vr-building-map-card .cubino-vr-section-title {
    margin-bottom: .55rem;
}

.cubino-vr-app .cubino-vr-building-map-wrap {
  margin-bottom: 0.85rem;
}

.cubino-vr-app .cubino-vr-building-map-wrap[hidden] {
  display: none !important;
}


@media (max-width: 767.98px) {
  .cubino-map-canvas,
  .project-panel .cubino-map-canvas,
  .cubino-vr-app .cubino-map-canvas {
    height: 13rem;
  }

  .cubino-map-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .cubino-map-clear {
    justify-content: center;
    width: 100%;
  }
}
