/* Page: Chi tiết dự án - Tab Mặt bằng - Bảng hàng */

.project-inventory-page {
  --pi-blue: #075fda;
  --pi-blue-dark: #071d4d;
  --pi-cyan: #10b9e8;
  --pi-orange: #f07b16;
  --pi-green: #12a564;
  --pi-red: #e4474f;
  --pi-muted: #68758b;
  --pi-border: #dce6f2;
  --pi-soft: #f6f9fd;
}

.project-inventory-page .inventory-hero::after {
  background: linear-gradient(90deg, #fff 0%, rgba(255,255,255,.99) 31%, rgba(255,255,255,.76) 47%, rgba(255,255,255,.04) 78%);
}

.project-inventory-page .inventory-hero .project-detail-hero__media {
  inset: 0 0 0 34%;
}

.project-inventory-page .inventory-hero .project-detail-hero__media img {
  object-position: center right;
}

.inventory-hero-facts {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-inventory-page .project-key-stats__panel article:nth-child(5) strong {
  font-size: var(--font-small);
  line-height: 1.5;
}

.project-inventory-page .project-key-stats__panel span.is-orange {
  color: var(--pi-orange);
  background: #fff3e6;
}

.inventory-map-section {
  padding: 18px 0 16px;
}

.inventory-section-heading h2,
.inventory-table-header h2,
.inventory-featured__header h2 {
  color: var(--pi-blue-dark);
  font-size: var(--font-subsection-title);
  line-height: 1.3;
}

.inventory-section-heading p,
.inventory-table-header p {
  margin-top: 4px;
  color: var(--pi-muted);
  font-size: var(--font-small);
}

.inventory-map {
  position: relative;
  min-height: 455px;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--pi-border);
  border-radius: 14px;
  background: #dbe9ef;
  box-shadow: 0 14px 34px rgba(20, 62, 117, .09);
}

.inventory-map__viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  transition: background 180ms ease;
}

.inventory-map__viewport img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(var(--map-scale, 1));
  transform-origin: center;
  transition: transform 220ms ease, filter 220ms ease;
}

.inventory-map.is-3d .inventory-map__viewport img {
  transform: perspective(1200px) rotateX(13deg) scale(var(--map-scale, 1.03));
  transform-origin: center bottom;
}

.inventory-map.is-layer-muted .inventory-map__viewport img {
  filter: saturate(.4) brightness(1.08);
}

.inventory-map:fullscreen {
  border: 0;
  border-radius: 0;
}

.inventory-map__legend {
  position: absolute;
  z-index: 4;
  top: 18px;
  left: 18px;
  width: 150px;
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 9px;
  background: rgba(255,255,255,.95);
  box-shadow: 0 8px 22px rgba(8, 37, 80, .18);
  backdrop-filter: blur(8px);
}

.inventory-map__legend h3 {
  margin-bottom: 1px;
  color: var(--pi-blue-dark);
  font-size: var(--font-small);
}

.inventory-map__legend h3:nth-of-type(2) {
  margin-top: 8px;
}

.inventory-map__legend button,
.inventory-map__legend span {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0;
  color: #34435f;
  border: 0;
  background: transparent;
  font-size: var(--font-caption);
  text-align: left;
}

.inventory-map__legend button:hover {
  color: var(--pi-blue);
}

.inventory-map__legend i {
  width: 10px;
  height: 10px;
  display: inline-block;
  flex: 0 0 auto;
  border-radius: 2px;
}

.legend-blue { background: #156ee5; }
.legend-pink { background: #ef5d91; }
.legend-red { background: #f17779; }
.legend-yellow { background: #ffc44d; }
.legend-cyan { background: #18afd2; }
.legend-green { background: #0aa95a; border-radius: 50% !important; }
.legend-orange { background: #f19516; border-radius: 50% !important; }
.legend-gray { background: #b6bdc8; border-radius: 50% !important; }
.legend-darkred { background: #df2634; border-radius: 50% !important; }

.inventory-map__view-toggle {
  position: absolute;
  z-index: 4;
  top: 18px;
  right: 20px;
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 7px 18px rgba(15, 48, 92, .15);
}

.inventory-map__view-toggle button {
  min-width: 42px;
  height: 28px;
  color: #31415d;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: var(--font-caption);
  font-weight: 700;
}

.inventory-map__view-toggle button.is-active {
  color: #fff;
  background: var(--pi-blue);
}

.inventory-map__controls {
  position: absolute;
  z-index: 4;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 8px;
}

.inventory-map__controls button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--pi-blue-dark);
  border: 1px solid var(--pi-border);
  border-radius: 8px;
  background: rgba(255,255,255,.95);
  box-shadow: 0 7px 18px rgba(15, 48, 92, .13);
}

.inventory-map__controls svg {
  width: 17px;
  height: 17px;
}

.inventory-map__marker {
  position: absolute;
  z-index: 3;
  width: 35px;
  height: 35px;
  color: #fff;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #0b6dde;
  box-shadow: 0 5px 14px rgba(0, 50, 125, .25);
  font-size: var(--font-small);
  font-weight: 800;
  transform: translate(-50%, -50%);
}

.inventory-map__marker:hover,
.inventory-map__marker:focus-visible {
  background: var(--pi-orange);
}

.marker-01 { left: 37%; top: 30%; }
.marker-04 { left: 53%; top: 40%; }
.marker-02 { left: 70%; top: 72%; }

.inventory-table-section {
  padding: 0 0 17px;
}

.inventory-table-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 11px;
}

.inventory-table-actions {
  display: flex;
  gap: 9px;
}

.inventory-table-actions button,
.inventory-table-actions a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  color: var(--pi-blue);
  border: 1px solid #aac8ef;
  border-radius: 8px;
  background: #fff;
  font-size: var(--font-caption);
  font-weight: 700;
}

.inventory-table-actions svg {
  width: 15px;
  height: 15px;
}

.inventory-filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr)) auto auto;
  gap: 9px;
  align-items: end;
}

.inventory-filters label > span {
  display: block;
  margin-bottom: 5px;
  color: #59667d;
  font-size: var(--font-caption);
  font-weight: 600;
}

.inventory-filters select,
.inventory-filters input {
  width: 100%;
  height: 39px;
  padding: 0 11px;
  color: #34425d;
  border: 1px solid var(--pi-border);
  border-radius: 7px;
  background: #fff;
  outline: 0;
  font-size: var(--font-caption);
}

.inventory-filters select:focus,
.inventory-filters input:focus {
  border-color: #7eb2f4;
  box-shadow: 0 0 0 3px rgba(9, 104, 228, .1);
}

.inventory-filter-more,
.inventory-filter-reset {
  min-height: 39px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 11px;
  border-radius: 7px;
  font-size: var(--font-caption);
  font-weight: 700;
  white-space: nowrap;
}

.inventory-filter-more {
  color: var(--pi-blue);
  border: 1px solid var(--pi-blue);
  background: #fff;
}

.inventory-filter-reset {
  color: #45536b;
  border: 1px solid var(--pi-border);
  background: #fff;
}

.inventory-filter-more svg,
.inventory-filter-reset svg {
  width: 14px;
  height: 14px;
}

.inventory-advanced-filters {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--pi-border);
  border-radius: 9px;
  background: var(--pi-soft);
}

.inventory-advanced-filters[hidden] {
  display: none;
}

.inventory-search {
  position: relative;
}

.inventory-search input {
  padding-right: 35px;
}

.inventory-search svg {
  position: absolute;
  top: 50%;
  right: 11px;
  width: 15px;
  height: 15px;
  color: var(--pi-blue);
  transform: translateY(-50%);
}

.inventory-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid var(--pi-border);
  border-bottom: 0;
  border-radius: 11px 11px 0 0;
  background: #fff;
}

.inventory-summary article {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
}

.inventory-summary article + article {
  border-left: 1px solid var(--pi-border);
}

.inventory-summary article > span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--pi-blue);
  border-radius: 50%;
  background: #edf6ff;
}

.inventory-summary article > span svg {
  width: 19px;
  height: 19px;
}

.inventory-summary small {
  display: block;
  color: #66738a;
  font-size: var(--font-caption);
}

.inventory-summary strong {
  display: block;
  margin-top: 2px;
  color: var(--pi-blue);
  font-size: var(--font-body-lg);
}

.inventory-summary .is-green > span,
.inventory-summary .is-green strong {
  color: var(--pi-green);
}

.inventory-summary .is-green > span {
  background: #ebf9f1;
}

.inventory-summary .is-orange > span,
.inventory-summary .is-orange strong {
  color: var(--pi-orange);
}

.inventory-summary .is-orange > span {
  background: #fff4e8;
}

.inventory-summary .is-gray > span,
.inventory-summary .is-gray strong {
  color: #667184;
}

.inventory-summary .is-gray > span {
  background: #f1f4f7;
}

.inventory-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--pi-border);
  border-radius: 0 0 11px 11px;
  background: #fff;
}

.inventory-table {
  width: 100%;
  min-width: 950px;
  border-collapse: collapse;
}

.inventory-table th,
.inventory-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #e8edf4;
  text-align: center;
  font-size: var(--font-caption);
  white-space: nowrap;
}

.inventory-table th {
  color: #485670;
  background: #f6f9fc;
  font-weight: 700;
}

.inventory-table td:first-child strong {
  color: var(--pi-blue-dark);
}

.inventory-table tbody tr:last-child td {
  border-bottom: 0;
}

.inventory-table tbody tr:hover {
  background: #fbfdff;
}

.inventory-table td button {
  padding: 0;
  color: var(--pi-blue);
  border: 0;
  background: transparent;
  font-size: var(--font-caption);
  font-weight: 700;
}

.inventory-status {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: var(--font-caption);
  font-weight: 700;
}

.inventory-status--available {
  color: #068b4b;
  background: #e6f8ee;
  border: 1px solid #b9ead0;
}

.inventory-status--hold {
  color: #df7200;
  background: #fff1df;
  border: 1px solid #ffd19e;
}

.inventory-status--sold {
  color: #687284;
  background: #edf0f4;
  border: 1px solid #d5dae1;
}

.inventory-status--locked {
  color: #d92835;
  background: #ffe7e9;
  border: 1px solid #ffc0c5;
}

.inventory-empty {
  padding: 30px 16px;
  color: var(--pi-muted);
  text-align: center;
  font-size: var(--font-small);
}

.inventory-pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}

.inventory-pagination label {
  color: #56647c;
  font-size: var(--font-caption);
}

.inventory-pagination select {
  height: 29px;
  margin-left: 6px;
  padding: 0 9px;
  border: 1px solid var(--pi-border);
  border-radius: 6px;
  background: #fff;
  font-size: var(--font-caption);
}

.inventory-pagination nav {
  display: flex;
  align-items: center;
  gap: 3px;
}

.inventory-pagination nav button {
  min-width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  color: #33425d;
  border: 0;
  border-radius: 5px;
  background: transparent;
  font-size: var(--font-caption);
}

.inventory-pagination nav button.is-active {
  color: #fff;
  background: var(--pi-blue);
}

.inventory-pagination > strong {
  justify-self: end;
  color: #44526b;
  font-size: var(--font-caption);
}

.inventory-featured {
  position: relative;
  padding: 0 0 17px;
}

.inventory-featured__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.inventory-featured__header button {
  color: var(--pi-blue);
  border: 0;
  background: transparent;
  font-size: var(--font-caption);
  font-weight: 700;
}

.inventory-featured__viewport {
  overflow: hidden;
}

.inventory-featured__track {
  display: flex;
  gap: 15px;
  transition: transform 240ms ease;
}

.inventory-featured__track > article {
  flex: 0 0 calc((100% - 45px) / 4);
  min-width: 220px;
  overflow: hidden;
  border: 1px solid var(--pi-border);
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(20, 62, 117, .06);
}

.inventory-featured figure {
  position: relative;
  margin: 0;
}

.inventory-featured figure img {
  width: 100%;
  aspect-ratio: 2.56 / 1;
  object-fit: cover;
}

.inventory-featured figure > span {
  position: absolute;
  top: 9px;
  left: 9px;
  padding: 5px 9px;
  color: #fff;
  border-radius: 999px;
  font-size: var(--font-caption);
  font-weight: 700;
}

.inventory-featured .is-featured { background: var(--pi-orange); }
.inventory-featured .is-available { background: var(--pi-green); }
.inventory-featured .is-hold { background: #ee8722; }

.inventory-featured figure > button {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  color: #31506f;
  border: 1px solid #d7e1ec;
  border-radius: 50%;
  background: rgba(255,255,255,.93);
  font-size: var(--font-body-lg);
}

.inventory-featured figure > button.is-active {
  color: #e43e51;
}

.inventory-featured article > div {
  padding: 10px 12px 12px;
}

.inventory-featured h3 {
  color: var(--pi-blue-dark);
  font-size: var(--font-small);
}

.inventory-featured article p,
.inventory-featured article footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
}

.inventory-featured article p span,
.inventory-featured article footer small {
  color: #68758b;
  font-size: var(--font-caption);
}

.inventory-featured article footer strong {
  color: var(--pi-blue);
  font-size: var(--font-body);
}

.inventory-featured__controls {
  position: absolute;
  right: 27px;
  top: 50%;
  display: flex;
  gap: 6px;
  transform: translateY(-10%);
}

.inventory-featured__controls button {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  color: var(--pi-blue);
  border: 1px solid var(--pi-border);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 6px 16px rgba(20, 62, 117, .12);
}

.inventory-featured__controls svg {
  width: 14px;
  height: 14px;
}

.inventory-cta {
  padding: 0 0 20px;
}

.inventory-cta__inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 14px 28px;
  overflow: hidden;
  border: 1px solid #bfd3ee;
  border-radius: 13px;
  background:
    linear-gradient(90deg, rgba(10,196,235,.18), rgba(255,255,255,.96) 28%, rgba(255,255,255,.96) 70%, rgba(9,103,223,.11)),
    #fff;
}

.inventory-cta h2 {
  color: var(--pi-blue-dark);
  font-size: var(--font-card-title);
}

.inventory-cta p {
  margin-top: 4px;
  color: var(--pi-muted);
  font-size: var(--font-caption);
}

.inventory-cta__inner > div:last-child {
  display: flex;
  gap: 12px;
}

.inventory-dialog {
  width: min(92vw, 620px);
  padding: 0;
  border: 0;
  border-radius: 14px;
  box-shadow: 0 26px 70px rgba(4, 25, 65, .28);
}

.inventory-dialog::backdrop {
  background: rgba(4, 20, 50, .58);
  backdrop-filter: blur(3px);
}

.inventory-dialog__close {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  color: #31415d;
  border: 1px solid var(--pi-border);
  border-radius: 50%;
  background: #fff;
  font-size: var(--font-card-title);
}

.inventory-dialog [data-unit-dialog-content],
.inventory-guide-dialog {
  padding: 25px;
}

.inventory-dialog h2 {
  color: var(--pi-blue-dark);
  font-size: var(--font-subsection-title);
}

.inventory-unit-detail {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 22px;
  align-items: start;
}

.inventory-unit-detail img {
  width: 100%;
  border-radius: 10px;
  aspect-ratio: 1.5 / 1;
  object-fit: cover;
}

.inventory-unit-detail dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 15px;
}

.inventory-unit-detail dt {
  color: #7a8599;
  font-size: var(--font-caption);
}

.inventory-unit-detail dd {
  margin: 3px 0 0;
  color: #263653;
  font-size: var(--font-small);
  font-weight: 700;
}

.inventory-unit-detail__actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.inventory-guide-dialog ol {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-left: 20px;
  color: #4f5e76;
  font-size: var(--font-small);
  line-height: 1.6;
}

@media (max-width: 1199px) {
  .inventory-hero-facts {
    grid-template-columns: 1fr 1fr;
  }

  .inventory-filters {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .inventory-filter-more,
  .inventory-filter-reset {
    width: 100%;
  }

  .inventory-featured__track > article {
    flex-basis: calc((100% - 30px) / 3);
  }
}

@media (max-width: 1023px) {
  .project-inventory-page .inventory-hero .project-detail-hero__media {
    inset: 0 0 0 24%;
  }

  .inventory-map {
    min-height: 410px;
  }

  .inventory-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .inventory-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inventory-summary article:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--pi-border);
  }

  .inventory-summary article:nth-child(4) {
    border-top: 1px solid var(--pi-border);
  }

  .inventory-featured__track > article {
    flex-basis: calc((100% - 15px) / 2);
  }
}

@media (max-width: 767px) {
  .project-inventory-page .inventory-hero .project-detail-hero__media {
    inset: 0;
    opacity: .42;
  }

  .project-inventory-page .inventory-hero::after {
    background: linear-gradient(180deg, rgba(255,255,255,.88), #fff 82%);
  }

  .inventory-hero-facts {
    grid-template-columns: 1fr;
  }

  .inventory-map {
    min-height: 360px;
  }

  .inventory-map__legend {
    top: 10px;
    left: 10px;
    width: 132px;
    max-height: 195px;
    overflow-y: auto;
  }

  .inventory-map__view-toggle {
    top: 10px;
    right: 10px;
  }

  .inventory-map__controls {
    right: 10px;
    bottom: 10px;
  }

  .inventory-table-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .inventory-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inventory-advanced-filters {
    grid-template-columns: 1fr;
  }

  .inventory-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .inventory-table,
  .inventory-table tbody {
    display: block;
    min-width: 0;
  }

  .inventory-table thead {
    display: none;
  }

  .inventory-table tbody {
    display: grid;
    gap: 11px;
  }

  .inventory-table tr {
    display: grid;
    padding: 14px;
    border: 1px solid var(--pi-border);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 7px 20px rgba(20, 62, 117, .06);
  }

  .inventory-table td {
    display: grid;
    grid-template-columns: 105px 1fr;
    padding: 6px 0;
    border: 0;
    text-align: left;
    white-space: normal;
  }

  .inventory-table td::before {
    content: attr(data-label);
    color: #7a8599;
    font-size: var(--font-caption);
    font-weight: 700;
    text-transform: uppercase;
  }

  .inventory-table td:last-child {
    display: block;
    padding-top: 10px;
  }

  .inventory-table td:last-child::before {
    display: none;
  }

  .inventory-table td:last-child button {
    width: 100%;
    min-height: 36px;
    border: 1px solid var(--pi-blue);
    border-radius: 7px;
  }

  .inventory-pagination {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .inventory-pagination > strong {
    justify-self: center;
  }

  .inventory-featured__track > article {
    flex-basis: 280px;
  }

  .inventory-featured__controls {
    display: none;
  }

  .inventory-cta__inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .inventory-unit-detail {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 479px) {
  .inventory-filters {
    grid-template-columns: 1fr;
  }

  .inventory-summary {
    grid-template-columns: 1fr;
  }

  .inventory-summary article + article {
    border-left: 0;
    border-top: 1px solid var(--pi-border);
  }

  .inventory-table-actions,
  .inventory-cta__inner > div:last-child {
    width: 100%;
    display: grid;
  }

  .inventory-map {
    min-height: 310px;
  }

  .inventory-map__legend {
    width: 118px;
    padding: 10px;
  }

  .inventory-map__marker {
    width: 29px;
    height: 29px;
    font-size: var(--font-caption);
  }
}

/* LeafletJS - bản đồ mặt bằng tương tác */
.inventory-map__leaflet {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #dbe9ef;
  cursor: grab;
}

.inventory-map__leaflet:active {
  cursor: grabbing;
}

.inventory-map__leaflet.is-fallback img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.inventory-map__leaflet .leaflet-pane,
.inventory-map__leaflet .leaflet-control {
  z-index: auto;
}

.inventory-map__leaflet .leaflet-map-pane {
  z-index: 1;
}

.inventory-map__leaflet .leaflet-overlay-pane {
  z-index: 2;
}

.inventory-map__leaflet .leaflet-marker-pane,
.inventory-map__leaflet .leaflet-tooltip-pane {
  z-index: 4;
}

.inventory-map__leaflet .leaflet-popup-pane {
  z-index: 5;
}

.inventory-map__leaflet .leaflet-image-layer {
  user-select: none;
  -webkit-user-drag: none;
}

.inventory-map__legend,
.inventory-map__controls,
.inventory-map__hint {
  z-index: 700;
}

.inventory-map__legend {
  width: 166px;
}

.inventory-map__legend button {
  width: 100%;
  min-height: 25px;
  padding: 3px 6px;
  border-radius: 6px;
  transition: color 160ms ease, background-color 160ms ease;
}

.inventory-map__legend button.is-active {
  color: var(--pi-blue);
  background: #eaf3ff;
  font-weight: 700;
}

.legend-purple { background: #805ad5; }

.inventory-map__hint {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  padding: 7px 12px;
  color: #30425f;
  border: 1px solid rgba(218, 229, 242, .96);
  border-radius: 999px;
  background: rgba(255, 255, 255, .93);
  box-shadow: 0 7px 18px rgba(15, 48, 92, .13);
  backdrop-filter: blur(7px);
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
}

.inventory-map__hint strong {
  color: var(--pi-blue);
}

.inventory-unit-marker-wrap {
  border: 0;
  background: transparent;
}

.inventory-unit-marker {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 5px;
  box-shadow: 0 6px 16px rgba(6, 33, 81, .28);
  transform: rotate(-45deg);
  transition: transform 160ms ease, filter 160ms ease;
}

.inventory-unit-marker b {
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  transform: rotate(45deg);
}

.inventory-unit-marker-wrap:hover .inventory-unit-marker,
.inventory-unit-marker-wrap:focus .inventory-unit-marker {
  filter: brightness(1.06);
  transform: rotate(-45deg) scale(1.14);
}

.inventory-unit-marker--available { background: #09a65b; }
.inventory-unit-marker--hold { background: #f09516; }
.inventory-unit-marker--sold { background: #929dab; }
.inventory-unit-marker--locked { background: #df2634; }

.inventory-leaflet-tooltip {
  padding: 6px 9px;
  color: #fff;
  border: 0;
  border-radius: 6px;
  background: rgba(7, 29, 77, .94);
  box-shadow: 0 7px 18px rgba(7, 29, 77, .22);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
}

.inventory-leaflet-tooltip::before {
  border-top-color: rgba(7, 29, 77, .94);
}

.inventory-leaflet-popup .leaflet-popup-content-wrapper {
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(7, 29, 77, .22);
}

.inventory-leaflet-popup .leaflet-popup-content {
  min-width: 235px;
  margin: 0;
  font-family: inherit;
}

.inventory-leaflet-popup .leaflet-popup-tip {
  box-shadow: 3px 3px 8px rgba(7, 29, 77, .12);
}

.inventory-leaflet-popup .leaflet-popup-close-button {
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  color: #53627b;
  border-radius: 50%;
  background: #fff;
  font-size: 20px;
}

.inventory-map-popup {
  padding: 14px;
}

.inventory-map-popup__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-right: 22px;
}

.inventory-map-popup__head > strong {
  color: var(--pi-blue-dark);
  font-size: 17px;
}

.inventory-map-popup .inventory-status {
  padding: 4px 7px;
  font-size: 10px;
}

.inventory-map-popup dl {
  display: grid;
  gap: 6px;
  margin: 12px 0;
}

.inventory-map-popup dl > div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px;
}

.inventory-map-popup dt {
  color: #7a8599;
  font-size: 11px;
}

.inventory-map-popup dd {
  margin: 0;
  color: #243453;
  font-size: 11px;
  font-weight: 700;
}

.inventory-map-popup button {
  width: 100%;
  min-height: 34px;
  color: #fff;
  border: 0;
  border-radius: 7px;
  background: var(--pi-blue);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
}

.inventory-map-popup button:hover {
  background: #064fb5;
}

.inventory-map:fullscreen {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #dbe9ef;
}

.inventory-map:fullscreen .inventory-map__leaflet {
  height: 100%;
}

@media (max-width: 767px) {
  .inventory-map__legend {
    width: 145px;
    max-height: 245px;
  }

  .inventory-map__hint {
    display: none;
  }

  .inventory-unit-marker {
    width: 27px;
    height: 27px;
  }

  .inventory-unit-marker b {
    font-size: 9px;
  }
}

@media (max-width: 479px) {
  .inventory-map__legend {
    width: 128px;
    max-height: 210px;
    padding: 9px;
  }

  .inventory-map__legend button {
    min-height: 23px;
    font-size: 11px;
  }

  .inventory-map__controls button {
    width: 34px;
    height: 34px;
  }
}
