/* Integrated Marker Styles */
.integrated-div-icon {
  background: transparent;
  border: none;
  pointer-events: auto; /* pane là none; bật lại để marker tích hợp click được */
}

.integrated-marker-icon {
  position: relative;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #0d9488, #dc2626);
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 10px;
  font-weight: bold;
  text-align: center;
  line-height: 1.1;
  transition: transform 0.2s;
  cursor: pointer;
}

.integrated-marker-icon:hover {
  transform: scale(1.1);
}

.integrated-marker-core {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 30px;
}

.integrated-marker-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background-color: #f59e0b;
  color: #fff;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Integrated Popup Styles */
.integrated-popup-container .leaflet-popup-content-wrapper {
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
}

.integrated-popup-container .leaflet-popup-content {
  margin: 0;
  width: 700px !important;
  max-width: 100%;
}

.integrated-popup-wrapper {
  display: flex;
  flex-direction: column;
  background: #fff;
}

.integrated-tabs-header {
  display: flex;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  overflow-x: auto;
}

.integrated-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 8px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.integrated-tab-btn:hover {
  color: #0f172a;
  background: #e2e8f0;
}

.integrated-tab-btn.active {
  color: #0284c7;
  border-bottom-color: #0284c7;
  background: #fff;
}

.integrated-tabs-body {
  padding: 0;
  max-height: 600px;
  overflow-y: auto;
}

.integrated-tab-content {
  display: none;
  padding: 12px;
}

.integrated-tab-content.active {
  display: block;
  animation: fadeIn 0.2s;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Override widths for popups rendered inside integrated tabs */
.integrated-tab-content .tram-popup-card,
.integrated-tab-content .dnc-popup {
  max-width: 100% !important;
  width: 100% !important;
}

/* Customer-resources marker (KH SOS) */
.custres-div-icon { background: transparent; border: none; }
.custres-marker {
  width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px;
}
.custres-marker.co_so { background: #0d9488; }
.custres-marker.co_quan { background: #b45309; }

/* Hàng nút trong popup KH SOS */
.custres-popup-actions {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-top: 10px;
}
.custres-popup-actions .tram-action-btn { padding: 0 4px; font-size: 11px; }
