/* falcon-map.css — Falcon portfolio map sub-view */

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

/* ── Toolbar ── */
.fm-toolbar {
  padding: 8px 12px 6px;
  background: #0d1e35;
  border-bottom: 1px solid rgba(0, 174, 239, 0.14);
  flex-shrink: 0;
}

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

.fm-select {
  background: #0B1729;
  border: 1px solid rgba(0, 174, 239, 0.2);
  color: #94a3b8;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
  outline: none;
  max-width: 160px;
}

.fm-select:focus { border-color: #00AEEF; color: #E6EDF7; }

.fm-legal-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #94a3b8;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}

.fm-legal-toggle input[type="checkbox"] {
  accent-color: #ef4444;
  cursor: pointer;
}

.fm-view-toggle {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.fm-filter-btn {
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(0, 174, 239, 0.2);
  background: transparent;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.fm-filter-btn:hover { background: #1e3a5f; color: #e2e8f0; }

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

/* ── Map ── */
.fm-map-wrap {
  flex: 1;
  min-height: 0;
  position: relative;
}

/* Leaflet tooltip override */
.fm-tt-wrap.leaflet-tooltip {
  background: rgba(11, 23, 41, 0.95);
  border: 1px solid rgba(0, 174, 239, 0.3);
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.fm-tt-wrap.leaflet-tooltip::before { display: none; }

.fm-tooltip {
  padding: 10px 12px;
  min-width: 200px;
  max-width: 260px;
}

.fm-tt-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}

.fm-tt-name {
  font-size: 13px;
  font-weight: 600;
  color: #E6EDF7;
  flex: 1;
}

.fm-badge-legal {
  font-size: 9px;
  font-weight: 700;
  color: #0B1729;
  background: #ef4444;
  border-radius: 4px;
  padding: 1px 5px;
  letter-spacing: 0.05em;
}

.fm-tt-addr {
  font-size: 11px;
  color: #8899AA;
  margin-bottom: 6px;
}

.fm-tt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px 10px;
  margin-bottom: 6px;
}

.fm-tt-label {
  font-size: 10px;
  color: #566980;
  margin-right: 4px;
}

.fm-tt-val {
  font-size: 11px;
  color: #E6EDF7;
  font-weight: 500;
}

.fm-tt-footer {
  font-size: 10px;
  color: #00AEEF;
  opacity: 0.7;
  text-align: right;
}

/* ── List view ── */
.fm-list-wrap {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.fm-list-scroll {
  height: 100%;
  overflow-y: auto;
}

.fm-list-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  color: #E6EDF7;
}

.fm-list-table thead {
  position: sticky;
  top: 0;
  background: #0d1e35;
  z-index: 2;
}

.fm-list-table th {
  padding: 8px 10px;
  color: #8899AA;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.03em;
  border-bottom: 1px solid rgba(0, 174, 239, 0.14);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}

.fm-list-table th:hover { color: #00AEEF; }
.fm-list-table th.fm-sorted { color: #00AEEF; }

.fm-list-table tbody tr {
  border-bottom: 1px solid rgba(0, 174, 239, 0.06);
  cursor: pointer;
  transition: background 0.1s;
}

.fm-list-table tbody tr:hover { background: rgba(0, 174, 239, 0.06); }

.fm-list-table td {
  padding: 7px 10px;
  white-space: nowrap;
}

.fm-td-loan { font-weight: 500; color: #E6EDF7; }
.fm-row-legal td { color: #f87171; }

.al-l { text-align: left; }
.al-c { text-align: center; }
.al-r { text-align: right; }

/* ── Drawer ── */
.fm-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 300px;
  background: #0d1e35;
  border-left: 1px solid rgba(0, 174, 239, 0.18);
  transform: translateX(100%);
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

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

.fm-drawer-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  color: #566980;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
  z-index: 1;
}

.fm-drawer-close:hover { color: #E6EDF7; }

.fm-drawer-photo {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.fm-drawer-pad {
  padding: 14px 16px 20px;
}

.fm-drawer-eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #00AEEF;
  margin-bottom: 4px;
}

.fm-drawer-title {
  font-size: 15px;
  font-weight: 700;
  color: #E6EDF7;
  line-height: 1.3;
  margin-bottom: 3px;
}

.fm-drawer-addr {
  font-size: 11px;
  color: #8899AA;
  margin-bottom: 10px;
}

.fm-drawer-legal-badge {
  display: inline-block;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  font-size: 10px;
  font-weight: 600;
  border-radius: 4px;
  padding: 2px 8px;
  margin-bottom: 10px;
  letter-spacing: 0.03em;
}

.fm-drawer-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.fm-ds {
  background: rgba(0, 174, 239, 0.05);
  border-radius: 6px;
  padding: 7px 9px;
}

.fm-ds-label {
  font-size: 9px;
  color: #566980;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}

.fm-ds-val {
  font-size: 13px;
  font-weight: 600;
  color: #E6EDF7;
}

.fm-drawer-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.fm-link {
  font-size: 11px;
  color: #00AEEF;
  text-decoration: none;
  padding: 3px 10px;
  border: 1px solid rgba(0, 174, 239, 0.3);
  border-radius: 12px;
  transition: background 0.15s;
}

.fm-link:hover { background: rgba(0, 174, 239, 0.12); }

/* ── Meta bar ── */
.fm-meta {
  padding: 4px 12px;
  font-size: 10px;
  color: #566980;
  font-family: ui-monospace, monospace;
  background: #0d1e35;
  border-top: 1px solid rgba(0, 174, 239, 0.08);
  flex-shrink: 0;
}
