/* tevel-map.css — Tevel Poland collateral map */

.tm-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #0B1729;
  position: relative;
}

.tm-toolbar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px 6px;
  background: #0d1e35;
  border-bottom: 1px solid #1e3a5f;
  flex-shrink: 0;
}

.tm-filter-row {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.tm-filter-row--right {
  justify-content: flex-start;
}

.tm-filter-btn {
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid #1e3a5f;
  background: transparent;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.tm-filter-btn:hover:not(:disabled) {
  background: #1e3a5f;
  color: #e2e8f0;
}

.tm-filter-btn.active {
  background: #00AEEF;
  border-color: #00AEEF;
  color: #0B1729;
  font-weight: 600;
}

.tm-filter-btn--disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.tm-loan-select {
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid #1e3a5f;
  background: #0B1729;
  color: #94a3b8;
  font-size: 12px;
  cursor: pointer;
  outline: none;
}

.tm-loan-select:focus {
  border-color: #00AEEF;
  color: #e2e8f0;
}

.tm-map-wrap {
  flex: 1;
  position: relative;
  min-height: 0;
}

/* CartoDB Positron → IBI light-blue/navy */
.tm-map-wrap .leaflet-tile-pane {
  filter: hue-rotate(190deg) saturate(0.4);
}

/* ── Tooltip ── */
.tm-popup .leaflet-popup-content-wrapper {
  background: #0d1e35;
  border: 1px solid #1e3a5f;
  border-radius: 10px;
  padding: 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.tm-popup .leaflet-popup-tip-container {
  display: none;
}

.tm-tooltip {
  padding: 12px 14px;
  min-width: 210px;
}

.tm-tt-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.tm-tt-loan {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}

.tm-badge-xc {
  font-size: 10px;
  font-weight: 700;
  background: #c084fc22;
  border: 1px solid #c084fc;
  color: #c084fc;
  border-radius: 10px;
  padding: 1px 7px;
  letter-spacing: 0.04em;
}

.tm-tt-name {
  font-size: 13px;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.3;
}

.tm-tt-value {
  font-size: 18px;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 10px;
}

.tm-tt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
  margin-bottom: 10px;
}

.tm-tt-label {
  display: block;
  font-size: 10px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tm-tt-val {
  display: block;
  font-size: 13px;
  color: #e2e8f0;
  font-weight: 500;
}

.tm-tt-footer {
  font-size: 11px;
  color: #00AEEF;
  text-align: right;
  margin-top: 4px;
}

/* ── Side Drawer ── */
.tm-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: 340px;
  height: 100%;
  background: #0d1e35;
  border-left: 1px solid #1e3a5f;
  box-shadow: -4px 0 24px rgba(0,0,0,0.5);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  z-index: 1000;
}

.tm-drawer--open {
  transform: translateX(0);
}

.tm-drawer-inner {
  padding: 16px;
}

.tm-drawer-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #1e3a5f;
  border: none;
  color: #94a3b8;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.tm-drawer-close:hover {
  background: #263f5e;
  color: #f1f5f9;
}

.tm-photo-placeholder {
  width: 100%;
  height: 140px;
  background: #111f35;
  border-radius: 8px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #475569;
  font-size: 12px;
  border: 1px dashed #1e3a5f;
}

.tm-drawer-collateral-name {
  font-size: 16px;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.3;
  margin-bottom: 4px;
}

.tm-drawer-client {
  font-size: 12px;
  font-weight: 600;
  color: #00AEEF;
  margin-bottom: 8px;
}

.tm-drawer-value {
  font-size: 22px;
  font-weight: 700;
  color: #f1f5f9;
  margin: 12px 0 8px;
}

.tm-drawer-city {
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 3px;
}

.tm-drawer-address {
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 12px;
  line-height: 1.4;
}

.tm-drawer-xc {
  background: #c084fc15;
  border: 1px solid #c084fc44;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
  color: #c084fc;
  margin-bottom: 12px;
}

.tm-loan-card {
  background: #111f35;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid #1e3a5f;
}

.tm-loan-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.tm-loan-id {
  font-size: 13px;
  font-weight: 700;
  color: #00AEEF;
}

.tm-loan-type {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: capitalize;
}

.tm-type-residential { background: #00AEEF22; color: #00AEEF; }
.tm-type-commercial  { background: #c084fc22; color: #c084fc; }
.tm-type-land        { background: #4ade8022; color: #4ade80; }

.tm-loan-name {
  font-size: 13px;
  color: #cbd5e1;
  margin-bottom: 10px;
  line-height: 1.4;
}

.tm-loan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.tm-loan-field {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.tm-lf-label {
  font-size: 10px;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tm-lf-val {
  font-size: 13px;
  color: #e2e8f0;
  font-weight: 500;
}

/* ── Meta bar ── */
.tm-meta {
  padding: 5px 12px;
  font-size: 11px;
  color: #475569;
  background: #0d1e35;
  border-top: 1px solid #1e3a5f;
  flex-shrink: 0;
  text-align: center;
}
