@font-face {
  font-family: 'yekan';
  src: url('fonts/yekan.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'vazir';
  src: url('fonts/vazir.ttf') format('truetype');
}

.geocontainer {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-height: max-content;
  font-family: 'vazir' !important;
}

.map-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.header-controls {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
  margin-bottom: 1rem !important;
  max-width: 100% !important;
  flex-direction: row-reverse !important;
      gap: 8px !important;
}

#back-to-iran {
     padding: 5px 10px !important;
    font-size: 15px !important;
    background-color: #007bff !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    font-family: 'yekan' !important;
    margin: 0px !important;
    height: 40px !important;
}

#back-to-iran:hover {
  background-color: #0056b3;
}

.iran-map {
  width: 100%;
  max-width: 750px;
  margin: 0 auto;
}

.content-wrapper {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  width: 100%;
  gap: 1rem;
  direction: ltr;
}

#province-svg-container {
  flex: 1;
  max-width: 50%;
}

#city-descriptions {
  flex: 1;
  max-width: 50%;
}

#city-descriptions[style*="display: none"] {
  display: none;
}

.content-wrapper:has(#city-descriptions[style*="display: none"]) #province-svg-container {
  max-width: 100%;
}

.iran-map svg,
#province-svg-container svg {
  width: 100%;
  height: auto;
  display: block;
  max-width: 700px;
  margin: auto;
}

#city-descriptions {
  margin-top: 0;
}

.city-description-table {
  width: 100%;
  border-collapse: collapse;
  background-color: #f9f9f9;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  direction: ltr;
  font-family: 'vazir';
}

.city-description-table th,
.city-description-table td {
  padding: 10px !important;
  border: 1px solid #ddd !important;
  text-align: right !important;
  font-size: 14px !important;
  color: #333 !important;
  line-height: 1.5 !important;
}

.city-description-table th {
background-color: #0b81ff !important;
    color: #fff !important;
    font-weight: bold !important;
    font-family: 'yekan';
}

.city-description-table td {
  background-color: #fff !important;
}

.city-description-table tr:nth-child(even) td {
  background-color: #f5f5f5 !important;
}

.city-description-table .city-link {
  color: #007bff !important;
  text-decoration: none;
}

.city-description-table .city-link:hover {
  text-decoration: underline !important;
}

#province-title {
font-size: 16px !important;
    color: #333 !important;
    text-align: center !important;
    flex-grow: 1 !important;
    background: #f3f8ff !important;
    padding: 10px !important;
    border-radius: 10px !important;
    font-family: 'yekan' !important;
    margin: 0px !important;
height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.iran-map svg text {
  font-family: 'vazir';
  fill: #454545;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
}

.react-map-water {
  fill: #7bdaff !important;
}

.city-path {
  cursor: pointer;
}

.text-gilan { font-size: 20px; }
.text-alborz { font-size: 18px; }
.text-khorasan-razavi { font-size: 21px; }
.text-khorasan-shomali { font-size: 18px; }
.text-golestan { font-size: 21px; }
.text-mazandaran { font-size: 20px; }
.text-ardabil { font-size: 15px; }
.text-azarbayjan-sharghi { font-size: 18px; }
.text-azarbayjan-gharbi { font-size: 19px; }
.text-zanjan { font-size: 20px; }
.text-kordestan { font-size: 20px; }
.text-kermanshah { font-size: 20px; }
.text-ilam { font-size: 20px; }
.text-hamedan { font-size: 19px; }
.text-qazvin { font-size: 20px; }
.text-lorestan { font-size: 21px; }
.text-khuzestan { font-size: 21px; }
.text-kohgiluyeh { font-size: 12px; }
.text-chaharmahal { font-size: 13px; }
.text-markazi { font-size: 19px; }
.text-qom { font-size: 18px; }
.text-esfahan { font-size: 21px; }
.text-tehran { font-size: 21px; }
.text-semnan { font-size: 21px; }
.text-khorasan-jonobi { font-size: 21px; }
.text-yazd { font-size: 21px; }
.text-fars { font-size: 21px; }
.text-kerman { font-size: 21px; }
.text-sistan-baluchistan { font-size: 21px; }
.text-bushehr { font-size: 21px; }
.text-hormozgan { font-size: 21px; }

@media (max-width: 768px) {
  .content-wrapper {
    flex-direction: column;
  }

  #province-svg-container,
  #city-descriptions {
    max-width: 100%;
  }

  .iran-map {
    max-width: 100%;
  }

  .iran-map svg,
  #province-svg-container svg {
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  #back-to-iran {
    margin-bottom: 0.5rem;
  }

  .city-description-table th,
  .city-description-table td {
    font-size: 12px;
    padding: 0.5rem;
  }
}

.iran-map svg .tooltip {
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  opacity: 1 !important;
  color: #5a5a5a !important;
}


.tooltip {
    position: fixed !important;
    padding: 5px !important;
    font-size: 12px !important;
    font-family: 'vazir', Arial, sans-serif !important;
    color: #333 !important;
    line-height: 1.4 !important;
    max-width: 300px !important;
    background: #fff !important;
    border: 1px solid #ccc !important;
    border-radius: 5px !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2) !important;
    pointer-events: none !important;
    z-index: 1000 !important;
    display: block !important;
    opacity:1 !important;
}

.iran-map svg .tooltip div {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  cursor: default;
  opacity: 1 !important;
  color: #5a5a5a !important;
}

.iran-map svg image[data-marker-id] {
  pointer-events: none;
}

.iran-map svg text[class^="text-"] {
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  cursor: default;
}

#legend-container {
  margin-top: 0px;
}

.legend-content {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  padding: 0px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  display: inline-block;
}

.legend-text {
  font-size: 14px; 
  font-family: 'Vazir', Arial, sans-serif;
  color: #333 !important;
}