/* ─── LOCATION FORM FIELDS ──────────────────────────────── */
.field {
  margin-bottom: 12px;
}

label {
  display: block;
  font-size: .75rem;
  color: var(--dim);
  margin-bottom: 4px;
  font-weight: 500;
}

input,
select {
  width: 100%;
  background: var(--lightblue);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 9px 12px;
  color: var(--text);
  font-family: 'Vazirmatn', sans-serif;
  font-size: .88rem;
  transition: border-color .25s, background .25s;
  direction: ltr;
  text-align: right;
  font-size: max(.88rem, 16px);
  min-height: 44px;
}

@media(min-width:480px) {

  input,
  select {
    font-size: .88rem;
  }
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--submain);
  background: rgba(21, 125, 164, .08);
}

select option {
  background: var(--main);
  color: var(--text);
}

/* Geo inner grid */
.geo-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  align-items: end;
}

@media(max-width:540px) {
  .geo-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .field {
    margin-bottom: 10px;
  }

  label {
    font-size: .72rem;
  }

  input,
  select {
    padding: 10px 12px;
    font-size: .9rem;
  }

  .btn-geo {
    font-size: .8rem;
  }
}

@media(min-width:541px) and (max-width:720px) {
  .geo-inner {
    grid-template-columns: 1fr 1fr;
  }
}

.btn-geo {
  width: 100%;
  padding: 10px 12px;
  background: var(--submain);
  border: 1px solid var(--submain);
  border-radius: 9px;
  color: var(--main);
  font-family: 'Vazirmatn', sans-serif;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
  touch-action: manipulation;
  min-height: 44px;
}

.btn-geo:hover {
  background: var(--text);
  color: var(--main);
  transform: translateY(-1px);
}

.btn-geo:active {
  transform: translateY(0);
}

.btn-geo:disabled {
  opacity: .5;
  cursor: wait;
}

.btn-geo-edit {
  width: 100%;
  padding: 10px 12px;
  background: rgba(21, 125, 164, .1);
  border: 1px solid rgba(21, 125, 164, .2);
  color: var(--submain);
  border-radius: 9px;
  font-family: 'Vazirmatn', sans-serif;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  min-height: 44px;
}

.btn-geo-edit:hover {
  background: rgba(21, 125, 164, .14);
}

.geo-status {
  font-size: .73rem;
  padding: 7px 10px;
  border-radius: 8px;
  margin-top: 8px;
  display: none;
}

.geo-status.ok {
  background: rgba(21, 125, 164, .1);
  border: 1px solid rgba(21, 125, 164, .28);
  color: var(--submain);
  display: block;
}

.geo-status.err {
  background: rgba(244, 67, 54, .1);
  border: 1px solid rgba(244, 67, 54, .3);
  color: #EF9A9A;
  display: block;
}

.geo-status.loading {
  background: rgba(21, 125, 164, .1);
  border: 1px solid rgba(21, 125, 164, .28);
  color: var(--submain);
  display: block;
}

.loc-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(21, 125, 164, .08);
  border: 1px solid rgba(21, 125, 164, .24);
  border-radius: 20px;
  padding: 4px 11px;
  font-size: .72rem;
  color: var(--submain);
  margin-top: 7px;
  flex-wrap: wrap;
}

/* Monthly chart */
.monthly-chart {
  margin-top: 12px;
}

.month-bars {
  display: flex;
  gap: 2px;
  align-items: flex-end;
  height: 65px;
  overflow: hidden;
}

.m-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 0;
}

.m-bar {
  width: 100%;
  border-radius: 3px 3px 0 0;
  transition: height .6s ease;
  min-height: 2px;
}

.m-label {
  font-size: clamp(6px, 1.5vw, 8px);
  color: var(--dim);
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  max-width: 100%;
}

.m-val {
  font-size: clamp(5px, 1.3vw, 7px);
  color: var(--submain);
  font-weight: 600;
}

#geoMap {
  position: relative;
  width: 100%;
  height: 320px;   /* explicit, not just 100% */
  display: none;
  overflow: hidden;
}
#geoMapLeaflet {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.geo-map iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  margin: 0 auto;
}

@media (max-width: 480px) {
  .geo-map { padding-bottom: 66%; }
}