.agrexa-booths-live {
  --agrexa-red: #dc2626;
  --agrexa-yellow: #facc15;
  --agrexa-border: #e2e8f0;
  --agrexa-muted: #64748b;
  --agrexa-surface: #ffffff;
  color: #0f172a;
  font-family: inherit;
  margin: 1.5rem 0;
  min-width: 0;
}

.agrexa-booths-live *,
.agrexa-booths-live *::before,
.agrexa-booths-live *::after { box-sizing: border-box; }

.agrexa-booths-live__header {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.agrexa-booths-live__header.is-title-hidden { justify-content: flex-end; }

.agrexa-booths-live__title {
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  line-height: 1.2;
  margin: 0;
}

.agrexa-booths-live__summary {
  color: var(--agrexa-muted);
  font-size: .92rem;
  margin: .35rem 0 0;
}

.agrexa-booths-live__connection {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--agrexa-border);
  border-radius: 999px;
  color: var(--agrexa-muted);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: .78rem;
  gap: .45rem;
  padding: .4rem .7rem;
}

.agrexa-booths-live__connection-dot {
  background: #94a3b8;
  border-radius: 50%;
  height: .55rem;
  width: .55rem;
}

.agrexa-booths-live__connection.is-online .agrexa-booths-live__connection-dot {
  background: #16a34a;
  box-shadow: 0 0 0 4px rgb(22 163 74 / 12%);
}

.agrexa-booths-live__connection.is-offline .agrexa-booths-live__connection-dot { background: #f59e0b; }

.agrexa-booths-live__tabs {
  background: #f1f5f9;
  border-radius: .8rem;
  display: inline-flex;
  gap: .25rem;
  margin-bottom: 1rem;
  padding: .25rem;
}

.agrexa-booths-live__tab,
.agrexa-booths-live__zoom-button,
.agrexa-booths-live__dialog-close {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.agrexa-booths-live__tab {
  align-items: center;
  background: transparent;
  border-radius: .6rem;
  color: #475569;
  display: inline-flex;
  font-weight: 700;
  gap: .45rem;
  padding: .65rem 1rem;
}

.agrexa-booths-live__tab.is-active {
  background: var(--agrexa-surface);
  box-shadow: 0 1px 4px rgb(15 23 42 / 12%);
  color: #0f172a;
}

.agrexa-booths-live__notice,
.agrexa-booths-live__empty {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--agrexa-border);
  border-radius: .8rem;
  color: var(--agrexa-muted);
  display: flex;
  justify-content: center;
  min-height: 9rem;
  padding: 1.5rem;
  text-align: center;
}

.agrexa-booths-live__notice.is-hidden { display: none; }

.agrexa-booths-live__notice.is-error {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #9f1239;
}

.agrexa-booths-live__spinner {
  animation: agrexa-booths-spin .8s linear infinite;
  border: 2px solid #cbd5e1;
  border-radius: 50%;
  border-top-color: #2563eb;
  height: 1rem;
  margin-right: .6rem;
  width: 1rem;
}

.agrexa-booths-live__panel {
  display: none;
  min-width: 0;
}

.agrexa-booths-live__panel.is-active,
.agrexa-booths-live[data-view="map"] .agrexa-booths-live__panel--visual,
.agrexa-booths-live[data-view="image"] .agrexa-booths-live__panel--visual,
.agrexa-booths-live[data-view="visual"] .agrexa-booths-live__panel--visual,
.agrexa-booths-live[data-view="list"] .agrexa-booths-live__panel--list,
.agrexa-booths-live[data-view="booths"] .agrexa-booths-live__panel--booths { display: block; }

.agrexa-booths-live__map,
.agrexa-booths-live__image-viewport {
  background: #e2e8f0;
  border: 1px solid var(--agrexa-border);
  border-radius: .9rem;
  height: var(--agrexa-booths-visual-height, 620px);
  max-height: 82vh;
  min-height: 360px;
  overflow: hidden;
}

.agrexa-booths-live__image-toolbar {
  align-items: center;
  background: var(--agrexa-surface);
  border: 1px solid var(--agrexa-border);
  border-radius: .7rem;
  display: inline-flex;
  gap: .65rem;
  margin-bottom: .65rem;
  padding: .35rem;
}

.agrexa-booths-live__zoom-button {
  align-items: center;
  background: #e2e8f0;
  border-radius: .45rem;
  color: #0f172a;
  display: inline-flex;
  font-size: 1.25rem;
  height: 2rem;
  justify-content: center;
  width: 2rem;
}

.agrexa-booths-live__zoom-label {
  color: #475569;
  font-size: .85rem;
  font-weight: 700;
  min-width: 3rem;
  text-align: center;
}

.agrexa-booths-live__image-viewport { overflow: auto; }

.agrexa-booths-live__image-stage {
  line-height: 0;
  min-width: 100%;
  position: relative;
}

.agrexa-booths-live__layout-image {
  display: block;
  height: auto;
  max-width: none !important;
  width: 100%;
}

.agrexa-booths-live__image-booth {
  background: var(--agrexa-red);
  border: 1px solid #7f1d1d;
  border-radius: .2rem;
  box-shadow: 0 1px 3px rgb(15 23 42 / 28%);
  cursor: pointer;
  min-height: 5px;
  min-width: 5px;
  opacity: .86;
  padding: 0;
  position: absolute;
  transform-origin: center;
}

.agrexa-booths-live__image-booth.is-partial {
  background: var(--agrexa-yellow);
  border-color: #854d0e;
}

.agrexa-booths-live__image-booth:hover,
.agrexa-booths-live__image-booth:focus-visible {
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px #2563eb;
  opacity: 1;
  outline: 0;
  z-index: 2;
}

.agrexa-booths-live__image-tooltip {
  background: #fff;
  border: 0;
  border-radius: .6rem;
  box-shadow: 0 8px 24px rgb(15 23 42 / 24%);
  cursor: pointer;
  line-height: normal;
  padding: .7rem .8rem;
  position: absolute;
  transform: translate(-50%, calc(-100% - 12px));
  width: max-content;
  z-index: 20;
}

.agrexa-booths-live__image-tooltip[hidden] {
  display: none !important;
}

.agrexa-booths-live__image-tooltip::after {
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 8px solid #fff;
  bottom: -8px;
  content: "";
  left: 50%;
  position: absolute;
  transform: translateX(-50%);
}

.agrexa-booths-live__image-tooltip.is-below {
  transform: translate(-50%, 12px);
}

.agrexa-booths-live__image-tooltip.is-below::after {
  border-bottom: 8px solid #fff;
  border-top: 0;
  bottom: auto;
  top: -8px;
}

.agrexa-booths-live__search {
  display: block;
  margin-bottom: 1rem;
}

.agrexa-booths-live__search-input {
  background: var(--agrexa-surface);
  border: 1px solid #cbd5e1;
  border-radius: .7rem;
  color: #0f172a;
  font: inherit;
  max-width: 32rem;
  padding: .75rem .9rem;
  width: 100%;
}

.agrexa-booths-live__search-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgb(37 99 235 / 14%);
  outline: 0;
}

.agrexa-booths-live__company-grid {
  display: grid;
  gap: .85rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
}

.agrexa-booths-live__company-card {
  background: var(--agrexa-surface);
  border: 1px solid var(--agrexa-border);
  border-radius: .8rem;
  box-shadow: 0 1px 2px rgb(15 23 42 / 5%);
  padding: 1rem;
}

.agrexa-booths-live__company-name {
  font-size: 1.05rem;
  line-height: 1.35;
  margin: 0 0 .3rem;
}

.agrexa-booths-live__company-category {
  color: var(--agrexa-muted);
  font-size: .82rem;
  line-height: 1.35;
  margin: 0 0 .75rem;
}

.agrexa-booths-live__booth-list {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.agrexa-booths-live__booth-chip {
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: 999px;
  color: #991b1b;
  font-size: .82rem;
  line-height: 1.25;
  padding: .35rem .6rem;
}

.agrexa-booths-live__booth-index {
  border: 1px solid var(--agrexa-border);
  border-radius: .85rem;
  overflow: hidden;
}

.agrexa-booths-live__booth-index-row {
  align-items: center;
  background: var(--agrexa-surface);
  border-left: .3rem solid var(--agrexa-red);
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(8rem, .65fr) minmax(12rem, 1.35fr);
  padding: .85rem 1rem;
}

.agrexa-booths-live__booth-index-row + .agrexa-booths-live__booth-index-row {
  border-top: 1px solid var(--agrexa-border);
}

.agrexa-booths-live__booth-index-row.is-partial {
  border-left-color: var(--agrexa-yellow);
}

.agrexa-booths-live__booth-index-identity,
.agrexa-booths-live__booth-index-companies {
  display: grid;
  gap: .2rem;
}

.agrexa-booths-live__booth-index-code {
  color: #0f172a;
  font-size: 1rem;
}

.agrexa-booths-live__booth-index-title {
  color: var(--agrexa-muted);
  font-size: .82rem;
}

.agrexa-booths-live__booth-index-company {
  color: #334155;
  font-size: .92rem;
  line-height: 1.35;
}

.agrexa-booths-live__booth-index-exhibitor,
.agrexa-booths-live__booth-detail-exhibitor {
  display: grid;
  gap: .12rem;
}

.agrexa-booths-live__booth-index-category,
.agrexa-booths-live__booth-detail-category {
  color: var(--agrexa-muted);
  font-size: .78rem;
  line-height: 1.35;
}

.agrexa-booths-live__dialog {
  background: var(--agrexa-surface);
  border: 0;
  border-radius: .9rem;
  box-shadow: 0 24px 70px rgb(15 23 42 / 35%);
  color: #0f172a;
  max-height: 80vh;
  max-width: min(92vw, 34rem);
  padding: 1.5rem;
  position: fixed;
  width: 100%;
}

.agrexa-booths-live__dialog::backdrop { background: rgb(15 23 42 / 58%); }

.agrexa-booths-live__dialog-close {
  align-items: center;
  background: #e2e8f0;
  border-radius: 50%;
  color: #334155;
  display: flex;
  font-size: 1.2rem;
  height: 2rem;
  justify-content: center;
  margin-left: auto;
  width: 2rem;
}

.agrexa-booths-live__booth-details h3 {
  font-size: 1.2rem;
  margin: .25rem 0 .35rem;
}

.agrexa-booths-live__booth-details ul {
  margin: .75rem 0 0;
  padding-left: 1.2rem;
}

.agrexa-booths-live__booth-state {
  color: var(--agrexa-muted);
  font-size: .88rem;
  margin: 0;
}

.agrexa-booths-live__sr-only {
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.agrexa-booths-live .leaflet-popup-content { margin: .85rem 1rem; }
.agrexa-booths-live .leaflet-popup-content-wrapper { border-radius: .75rem; }

.agrexa-booths-live .leaflet-tooltip.agrexa-booths-live__map-tooltip {
  border: 0;
  border-radius: .6rem;
  box-shadow: 0 8px 24px rgb(15 23 42 / 20%);
  padding: .7rem .8rem;
}

.agrexa-booths-live__tooltip-content {
  display: grid;
  gap: .45rem;
  min-width: 14rem;
  max-width: 18rem;
  overflow: hidden;
  white-space: normal;
}

.agrexa-booths-live__tooltip-image {
  border-radius: .45rem;
  display: block;
  height: 7rem;
  object-fit: cover;
  width: 100%;
}

.agrexa-booths-live__tooltip-header {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .45rem;
}

.agrexa-booths-live__tooltip-code {
  color: #0f172a;
  font-size: .9rem;
}

.agrexa-booths-live__tooltip-title {
  color: #475569;
  font-size: .78rem;
}

.agrexa-booths-live__tooltip-state {
  background: #fee2e2;
  border-radius: 999px;
  color: #991b1b;
  font-size: .7rem;
  font-weight: 700;
  justify-self: start;
  padding: .2rem .5rem;
}

.agrexa-booths-live__tooltip-state.is-partial {
  background: #fef3c7;
  color: #92400e;
}

.agrexa-booths-live__tooltip-meta {
  color: #475569;
  display: grid;
  font-size: .72rem;
  gap: .1rem;
}

.agrexa-booths-live__tooltip-exhibitors {
  border-top: 1px solid #e2e8f0;
  display: grid;
  gap: .45rem;
  padding-top: .45rem;
}

.agrexa-booths-live__tooltip-exhibitor {
  display: grid;
  gap: .1rem;
}

.agrexa-booths-live__tooltip-company {
  color: #1e293b;
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.3;
}

.agrexa-booths-live__tooltip-category {
  color: var(--agrexa-muted);
  font-size: .72rem;
  line-height: 1.3;
}

@keyframes agrexa-booths-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
  .agrexa-booths-live__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .agrexa-booths-live__tabs {
    display: flex;
    width: 100%;
  }

  .agrexa-booths-live__tab {
    flex: 1;
    justify-content: center;
  }

  .agrexa-booths-live__booth-index-row {
    align-items: start;
    gap: .55rem;
    grid-template-columns: 1fr;
  }

  .agrexa-booths-live__map,
  .agrexa-booths-live__image-viewport {
    height: min(var(--agrexa-booths-visual-height, 620px), 68vh);
    min-height: 320px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .agrexa-booths-live__spinner { animation: none; }
}
