body {
  margin: 0;
  font-family: 'Alef', 'Open Sans', Arial, sans-serif;
  background: #f7f9fa;
  direction: rtl;
}

.mikoom-banner {
  background: linear-gradient(90deg, #2b5876 0%, #4e4376 100%);
  color: #fff;
  padding: 0;
  border-radius: 0 0 18px 18px;
  box-shadow: 0 2px 8px rgba(44, 62, 80, 0.08);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  min-height: 100px;
}

.mikoom-banner-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  justify-items: center;
  width: 100%;
  margin: 0 auto;
  max-width: 900px;
  position: relative;
  padding-left: 0;
}

.mikoom-title-group {
  grid-column: 2;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  flex: 0 1 auto;
  position: relative;
  z-index: 1;
  max-width: 90%;
  text-align: right;
  gap: 8px;
}

.mikoom-logo-link {
  grid-column: 3;
  justify-self: end;
  position: relative;
  left: 0;
  top: 0;
  transform: none;
  z-index: 2;
  display: block;
}

.mikoom-logo {
  height: 54px;
  width: auto;
  display: block;
}

.mikoom-banner h1 {
  font-size: 1.75em;
  margin: 0;
  font-family: 'Alef', 'Open Sans', Arial, sans-serif;
  letter-spacing: 0.5px;
  text-align: inherit;
  white-space: normal;
  line-height: 1.3;
}

.mikoom-subtitle {
  font-size: 1.1em;
  opacity: 0.92;
  margin-top: 0;
  text-align: inherit;
  line-height: 1.5;
}

.mikoom-container {
  max-width: 900px;
  margin: 32px auto 18px auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(44, 62, 80, 0.1);
  padding: 32px 28px 28px 28px;
  direction: rtl;
  font-family: 'Alef', 'Open Sans', Arial, sans-serif;
}

.section-title {
  font-size: 1.3em;
  margin-bottom: 18px;
  color: #2b5876;
  font-weight: bold;
}

.search-main-title {
  font-size: 2em;
  margin: 0 0 18px 0;
  color: #2b5876;
  font-weight: bold;
  text-align: right;
  line-height: 1.2;
}

label {
  display: inline-block;
  width: 90px;
  font-weight: 500;
}

input[type=number],
input[type=text] {
  width: 160px;
  padding: 6px 8px;
  border: 1px solid #bfc9d1;
  border-radius: 4px;
  margin: 5px 0 10px 0;
  font-size: 1em;
  font-family: 'Alef', 'Open Sans', Arial, sans-serif;
}

.mikoom-btn {
  background: linear-gradient(90deg, #2b5876 0%, #4e4376 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 32px;
  font-size: 1.1em;
  font-weight: bold;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.2s;
  font-family: 'Alef', 'Open Sans', Arial, sans-serif;
}

.mikoom-btn:hover {
  background: linear-gradient(90deg, #4e4376 0%, #2b5876 100%);
}

.mikoom-btn.secondary {
  background: #edf2f7;
  color: #1f3b57;
}

.mikoom-btn.secondary:hover {
  background: #e2e8f0;
  color: #0f2740;
}

#output {
  margin-top: 18px;
  font-size: 1.1em;
  color: #333;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(44, 62, 80, 0.1);
  padding: 24px 28px 18px 28px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  overflow-x: auto;
  display: none;
}

#output.flash {
  box-shadow: 0 0 0 3px #97b6ff inset, 0 4px 24px rgba(44, 62, 80, 0.18);
  transition: box-shadow 0.6s ease;
}

.loading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #2b5876;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #cdd6e1;
  border-top-color: #2b5876;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

table {
  width: 100%;
  background: #fafbfc;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #d8e2ef;
  border-collapse: collapse;
}

th,
td {
  font-size: 1em;
}

caption {
  font-size: 1.1em;
  padding-bottom: 0.5em;
}

.table-subcaption {
  font-weight: normal;
}

thead tr {
  background: #e6f0fa;
}

tbody tr:nth-child(even) {
  background: #f5f7fa;
}

tbody tr:nth-child(odd) {
  background: #fff;
}

th,
td {
  border: 1px solid #e0e0e0;
}

.mikoom-explain {
  max-width: 900px;
  margin: 32px auto 18px auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(44, 62, 80, 0.1);
  padding: 24px 28px 18px 28px;
  direction: rtl;
  font-family: 'Alef', 'Open Sans', Arial, sans-serif;
  font-size: 1.25em;
  color: #222;
  line-height: 1.7;
  text-align: right;
}

.mikoom-explain h3 {
  color: #2b5876;
  font-size: 1.4em;
  margin-top: 0;
  margin-bottom: 20px;
  text-align: center;
}

.mikoom-explain h4 {
  color: #4e4376;
  font-size: 1.15em;
  margin-top: 24px;
  margin-bottom: 12px;
  font-weight: bold;
}

.mikoom-explain ul {
  list-style-type: disc;
  margin: 12px 0;
  padding-right: 20px;
}

.mikoom-explain li {
  margin: 8px 0;
  line-height: 1.6;
}

.mikoom-explain p {
  margin: 12px 0;
}

.rtl-list {
  text-align: right;
  direction: rtl;
  padding-right: 20px;
}

.data-source-note {
  font-size: 0.95em;
  color: #666;
}

.update-date {
  font-size: 1.5em;
  font-weight: bold;
}

.opensource-note {
  font-size: 0.85em;
  font-style: italic;
}

.section-divider {
  margin: 20px 0;
  border: none;
  border-top: 1px solid #ddd;
}

#free-text-container,
#address-search-wrap {
  margin-bottom: 1.2em;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3em;
  position: relative;
  width: 100%;
}

.search-field-label {
  white-space: nowrap;
  font-size: 1.1em;
  margin-bottom: 0.3em;
}

.search-input-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5em;
  width: 100%;
  position: relative;
}

#freeText {
  flex: 1 1 260px;
  min-width: 120px;
  max-width: 340px;
  font-size: 1.15em;
  padding: 0.7em;
  border-radius: 8px;
  border: 1px solid #bbb;
  box-sizing: border-box;
  text-align: right;
}

#autocomplete {
  position: absolute;
  right: 0;
  left: 0;
  top: calc(100% + 2px);
  z-index: 10;
}

.section-or-divider-text {
  text-align: right;
  margin: 18px 0;
  font-size: 1.3em;
  color: #2b5876;
  font-weight: bold;
}

.section-thin-divider {
  border: none;
  border-top: 1px solid #d8e2ef;
  margin: 14px 0;
  width: 100%;
}

.classic-search-fields {
  display: flex;
  flex-direction: column;
  gap: 0.7em;
  align-items: flex-start;
  margin-bottom: 0.7em;
  position: relative;
}

.ac-wrap--field {
  position: relative;
  display: block;
  width: 100%;
  max-width: 160px;
}

.field-input {
  width: 100%;
  max-width: 160px;
  font-size: 1.15em;
  padding: 0.7em;
  border-radius: 8px;
  border: 1px solid #bbb;
}

.classic-search-btn {
  margin-top: 0.7em;
  font-size: 1.15em;
  padding: 0.7em;
  line-height: 1.2;
  height: auto;
  width: 100%;
  max-width: 220px;
}

#addressSearch {
  flex: 1 1 260px;
  min-width: 120px;
  max-width: 520px;
  font-size: 1.15em;
  padding: 0.7em;
  border-radius: 8px;
  border: 1px solid #bbb;
  box-sizing: border-box;
  text-align: right;
}

#address-autocomplete {
  display: none;
}

.address-result-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
}

#addressParcelResult {
  display: none;
  flex: 1 1 auto;
  padding: 10px 12px;
  border: 1px solid #d8e2ef;
  border-radius: 8px;
  background: #f8fbff;
  color: #1f3b57;
  font-size: 1.05em;
}

.export-toolbar {
  display: none;
  max-width: 956px;
  box-sizing: border-box;
  margin: 8px auto 12px auto;
  padding: 12px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(44, 62, 80, 0.1);
}

.export-toolbar-inner {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
}

.export-btn {
  padding: 8px 16px;
  font-size: 0.95em;
}

.export-note {
  color: #667;
  font-size: 0.95em;
}

.results-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.results-pager-status {
  color: #667;
  font-size: 0.95em;
}

.results-pager-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.results-pager-page {
  color: #1f3b57;
  font-size: 0.95em;
  font-weight: 700;
}

.results-pager-btn {
  display: inline-flex;
}

.results-pager-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

#map-summary-section {
  max-width: 956px;
  box-sizing: border-box;
  margin: 12px auto;
  padding: 14px 18px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(44, 62, 80, 0.1);
}

#map-summary-section h2 {
  margin: 0 0 8px 0;
  color: #2b5876;
  font-size: 1.35em;
}

.map-summary-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

#mapCalculatedDetails {
  display: none;
  flex: 1 1 auto;
  font-size: 1.05em;
  color: #1f3b57;
}

#map-section {
  position: relative;
  max-width: 956px;
  margin: 32px auto 24px auto;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(44, 62, 80, 0.1);
}

#map {
  width: 100%;
  height: 800px;
}

.footer-disclaimer {
  margin-top: 16px;
  font-size: 0.95em;
  color: #3c3c3c;
  line-height: 1.6;
}

.contact-social img {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  max-width: 28px !important;
  max-height: 28px !important;
}

.contact-row.contact-socials {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.contact-row.contact-socials .mikoom-contact-logo {
  height: 28px;
  width: 28px;
}

.contact-row.contact-socials .logo-social {
  margin-left: 6px;
}

.contact-logo-center {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  text-align: left;
  margin-top: 12px;
}

.contact-logo-center .mikoom-contact-logo {
  height: 40px;
  width: auto;
}

.mikoom-contact-section {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(44, 62, 80, 0.1);
  max-width: 900px;
  margin: 40px auto 24px auto;
  padding: 32px 28px 28px 28px;
  font-family: 'Alef', 'Open Sans', Arial, sans-serif;
  direction: rtl;
  position: relative;
  overflow: hidden;
}

.mikoom-contact-inner {
  position: relative;
  min-height: 120px;
  padding-bottom: 0;
  box-sizing: border-box;
  width: 100%;
  display: block;
}

.contact-title {
  color: #2b5876;
  font-size: 2em;
  margin-bottom: 18px;
  text-align: center;
  font-weight: bold;
}

.mikoom-contact-logo-link {
  position: absolute;
  left: 0;
  bottom: 0;
  margin: 0;
  text-align: left;
  z-index: 2;
}

.mikoom-contact-logo {
  height: 60px;
  width: auto;
  display: inline-block;
}

.autocomplete-open {
  padding-bottom: 180px !important;
}

.classic-ac {
  display: none;
  position: absolute;
  right: 0;
  left: 0;
  top: calc(100% + 2px);
  bottom: auto;
  z-index: 10;
  background: #fff;
  border: 1px solid #ccc;
  max-height: 200px;
  overflow-y: auto;
  width: 100%;
  box-shadow: 0 2px 8px #0001;
}

.ac-item {
  padding: 8px 10px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
  background: #fff;
  text-align: right;
}

.ac-item:last-child {
  border-bottom: none;
}

.ac-item:hover {
  background: #f6f9ff;
}

.mapbox-ac-item.active {
  background: #eaf2ff;
}

.large-check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  font-size: 1.2em;
  color: #1f3b57;
  font-weight: 600;
}

.large-check-row input[type="checkbox"] {
  width: 22px;
  height: 22px;
  accent-color: #2b5876;
  cursor: pointer;
  margin: 0;
  flex: 0 0 auto;
}

.large-check-row label {
  width: auto;
  margin: 0;
  cursor: pointer;
}

.inline-copy-btn {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border: 1px solid #98abc0;
  border-radius: 8px;
  background: #eef3f8;
  color: #1f3b57;
  font-size: 0.95em;
  font-family: 'Alef', 'Open Sans', Arial, sans-serif;
  cursor: pointer;
  white-space: nowrap;
}

.inline-copy-btn:hover {
  background: #e2ebf5;
}

.results-pager .results-pager-btn {
  display: inline-flex;
}

.popup-copy-btn {
  margin-top: 6px;
  padding: 4px 8px;
  border: 1px solid #98abc0;
  border-radius: 6px;
  background: #eef3f8;
  color: #1f3b57;
  font-size: 0.85em;
  font-family: 'Alef', 'Open Sans', Arial, sans-serif;
  cursor: pointer;
}

.popup-copy-btn:hover {
  background: #e2ebf5;
}

.popup-card {
  text-align: center;
  background-color: rgba(255, 255, 255, 0.6);
  padding: 8px;
  border-radius: 4px;
}

.mapbox-geocode-logo-wrap {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 6;
  background: rgba(243, 244, 246, 0.08);
  border-radius: 6px;
  padding: 0;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  line-height: 0;
}

.mapbox-geocode-logo {
  height: 30px;
  max-height: 30px;
  width: auto;
  display: block;
}

.mapbox-geocode-logo-link {
  display: block;
  pointer-events: auto;
}

.map-mikoom-logo-wrap {
  position: absolute;
  left: 50%;
  bottom: 4px;
  transform: translateX(-50%);
  z-index: 6;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  padding: 2px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  line-height: 0;
}

.map-mikoom-logo-link {
  display: block;
  pointer-events: auto;
}

.map-mikoom-logo {
  height: 28px;
  width: auto;
  display: block;
}

#map-section .maplibregl-ctrl-group {
  background: rgba(255, 255, 255, 0.42) !important;
  box-shadow: 0 2px 10px rgba(15, 39, 64, 0.14) !important;
  border: 1px solid rgba(27, 63, 95, 0.28) !important;
}

#map-section .basemap-toggle-ctrl {
  background: rgba(255, 255, 255, 0.92) !important;
  border: 2px solid rgba(43, 53, 66, 0.9) !important;
  box-shadow: 0 2px 10px rgba(15, 39, 64, 0.2) !important;
  opacity: 1 !important;
}

#map-section .maplibregl-ctrl-group button {
  background: rgba(255, 255, 255, 0.28) !important;
}

#map-section .maplibregl-ctrl-group button:hover {
  background: rgba(255, 255, 255, 0.45) !important;
}

#map-section .maplibregl-ctrl-attrib {
  background: rgba(255, 255, 255, 0.36) !important;
  border-radius: 6px 0 0 0;
}

#map-section .maplibregl-ctrl-bottom-right .maplibregl-ctrl {
  margin-bottom: 4px !important;
  margin-right: 0 !important;
}

#map-section .maplibregl-ctrl-bottom-left .maplibregl-ctrl {
  margin-bottom: 4px !important;
}

#map-section .maplibregl-ctrl-bottom-left .maplibregl-ctrl-group {
  margin-left: 8px !important;
}

#map-section .maplibregl-ctrl-attrib-inner {
  background: transparent !important;
}

.maplibregl-ctrl-attrib-button {
  display: none !important;
}

.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner {
  display: block !important;
}

.ac-wrap {
  position: relative !important;
}

.is-visible-block {
  display: block !important;
}

.is-visible-flex {
  display: flex !important;
}

.is-visible-inline-flex {
  display: inline-flex !important;
}

.clipboard-fallback {
  position: fixed;
  top: -9999px;
}

.maplibregl-ctrl.basemap-toggle-ctrl {
  background: #ffffff;
  border: 2px solid rgba(43, 53, 66, 0.9);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(15, 39, 64, 0.2);
  padding: 10px 18px;
  cursor: pointer;
  font-size: 17px;
  font-weight: 700;
  color: #4b5563;
  line-height: 1.2;
  user-select: none;
}

@media (max-width: 600px) {
  .mikoom-container,
  #output {
    padding: 18px 8px 18px 8px;
    max-width: 98vw;
  }

  .mikoom-banner-inner {
    grid-template-columns: 1fr 1fr 1fr;
    padding: 0 8px;
  }

  .mikoom-logo {
    height: 36px;
  }

  .mikoom-title-group h1 {
    font-size: 1.4em;
    white-space: normal;
    line-height: 1.3;
    padding: 0 4px;
  }

  .mikoom-subtitle {
    font-size: 1.1em;
    margin-top: 12px;
    line-height: 1.4;
    padding: 0 4px;
  }

  .mikoom-title-group {
    padding: 8px 4px;
    align-items: center;
    text-align: center;
  }

  .mikoom-contact-section {
    padding: 18px 8px 18px 8px;
  }

  .mikoom-contact-inner {
    max-width: 100%;
  }

  .mikoom-contact-logo {
    height: 40px;
  }

  .mikoom-contact-logo-link {
    left: 8px;
    bottom: 8px;
  }

  .mikoom-explain {
    padding: 18px 12px;
    font-size: 1.1em;
  }

  .mikoom-explain h3 {
    font-size: 1.3em;
    margin-bottom: 16px;
  }

  .mikoom-explain h4 {
    font-size: 1.2em;
    margin-top: 20px;
    margin-bottom: 10px;
  }
}
