.advanced-map-container {
    width: 100%;
    height: 0;
    padding-bottom: 35%;
    position: relative;
}

@media screen and (max-device-width: 768px) { 
    .advanced-map-container {
        padding-bottom: 70%;
    }
}
@media screen and (min-device-width: 769px) { 
    .advanced-map-container {
        padding-bottom: 440px;
    }
}

.advanced-map-container svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.advanced-map-legend {
    margin-top: 1em;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.advanced-map-legend-item {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1em;
    margin-bottom: 0.5em;
}

.advanced-map-legend-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 0.5em;
    border: none;
}

.advanced-map-legend-label {
    font-size: 1rem;
}

.advanced-label-manager-color-picker {
    width: 20px;
    height: 20px;
    background-color: #000;
    border-radius: 50%;
    margin-right: 10px;
    cursor: pointer;
    border: 1px solid black;
}

@media screen and (max-width: 758px) {
    .advanced-map-legend {
        justify-content: center;
    }

    .advanced-map-legend-item {
        flex: 0 1 auto;
        margin: 0 auto 1em;
        width: 100%;
        max-width: 400px;
        justify-content: center;
    }
}

.wp-block-advanced-map-visualization-map-block {
    display: block;
    max-width: var(--paragraph-width);
}

.advanced-map-visualization-svg * {
  pointer-events: auto !important;
}

.block-editor-rich-text__toolbar {
    z-index: 100001 !important;
    position: relative !important;
}

.components-popover__content{
    z-index: 100001 !important;
    position: relative !important;
}

.block-editor-rich-text__toolbar {
  z-index: 100000 !important;
  position: relative !important;
}

.components-modal__screen-overlay {
  z-index: 10000 !important;
}

.advanced-state-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.4);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.advanced-state-modal-content {
  background: white;
  padding: 0.5rem;
  border-radius: 10px;
  max-width: 400px;
  width: 90%;
  position: relative;
  font-size: 1rem;
}

.advanced-state-modal-close {
  position: absolute;
  top: 10px; right: 10px;
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
}

.advanced-copy-email-btn {
  margin-left: 0.5rem;
  font-size: 1rem;
  background: none;
  border: none;
  cursor: pointer;
}

.advanced-state-email-link {
  text-decoration: underline;
  font-weight: bold;
}

.advanced-state-modal-overlay {
  position: fixed;
  z-index: 999999;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
}

.advanced-state-modal-box {
  background: white;
  padding: 1.5rem;
  border-radius: 10px;
  max-width: 420px;
  width: 90%;
  position: relative;
  font-size: 1rem;
}

.advanced-state-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
}

.advanced-copy-email-btn {
  margin-left: 0.5rem;
  font-size: 1rem;
  background: none;
  border: none;
  cursor: pointer;
}

.advanced-state-email-link {
  text-decoration: underline;
  font-weight: bold;
}


.advanced-custom-assign-modal {
  position: fixed;
  z-index: 1000000;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
}

.advanced-custom-assign-modal-inner {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  max-width: 700px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.advanced-label-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.advanced-label-card {
  border: 2px solid #ccc;
  border-radius: 8px;
  padding: 1rem;
  cursor: pointer;
  transition: border-color 0.2s;
  background-color: #fafafa;
}

.advanced-label-card:hover {
  border-color: #007cba;
  background-color: #f0f8ff;
}

.advanced-label-card-content {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.advanced-label-card-email {
  font-size: 0.85rem;
  color: #555;
}

.advanced-custom-assign-modal {
  position: fixed;
  z-index: 1000000;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
}

.advanced-custom-assign-modal-inner {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  max-width: 700px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.advanced-label-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.advanced-label-card {
  border: 2px solid #ccc;
  border-radius: 8px;
  padding: 1rem;
  cursor: pointer;
  transition: border-color 0.2s;
  background-color: #fafafa;
}

.advanced-label-card:hover {
  border-color: #007cba;
  background-color: #f0f8ff;
}

.advanced-label-card-content {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.advanced-label-card-email {
  font-size: 0.85rem;
  color: #555;
}

.advanced-state-modal-content h3{
  font-size: 1.5rem !important;
}

.advanced-state-email-wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 0.5rem;
  width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.advanced-state-email-link {
  flex: 1;
  min-width: 0;
}

.advanced-label-card.selected {
  border: 2px solid #007cba;
  background-color: #f0f8ff;
}

.advanced-map-remove-label{
  border: 1px solid;
}