.booth-map {
  font-family: Manrope, sans-serif;
  padding: 1rem;
  background-color: #f5f5f5;
}

.booth-map * {
  box-sizing: border-box;
}

.booth-map .container {
  max-width: 1200px;
  margin: 0 auto;
  background-color: #ffffff;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.booth-map h1 {
  text-align: center;
  margin-bottom: 1rem;
  color: #333;
}

.booth-map .legend {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.booth-map .legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.booth-map .legend-box {
  width: 30px;
  height: 20px;
  border: 2px solid #333;
}

.booth-map .legend-box.available {
  background-color: #ffffff;
}

.booth-map .legend-box.selected {
  background-color: #4caf50;
}

.booth-map .legend-box.reserved {
  background-color: #cccccc;
}

.booth-map .map-container {
  position: relative;
  width: 100%;
  max-width: 780px;
  padding: 0 3rem;
  margin: 0 auto;
  /* aspect-ratio: 1.1; */
  user-select: none;
}

.booth-map .map-container * {
  user-select: none;
}

.booth-map svg {
  width: 100%;
  height: 100%;
}

.booth-map .booth {
  cursor: pointer;
  transition: all 0.2s ease;
}

.booth-map .booth.available rect,
.booth-map .booth.available polygon {
  fill: #ffffff;
  stroke: #333333;
  stroke-width: 4;
  stroke-linejoin: miter;
  stroke-linecap: square;
}

.booth-map .booth[data-booth^="4"],
.booth-map .booth[data-booth^="ISRM"] {
  --booth-color: #157dd2;
  --booth-pulse-shadow-light: rgba(21, 125, 210, 0.55);
  --booth-pulse-shadow-strong: rgba(21, 125, 210, 0.9);
}

.booth-map .booth[data-booth^="4"] rect,
.booth-map .booth[data-booth^="4"] polygon,
.booth-map .booth[data-booth^="ISRM"] rect,
.booth-map .booth[data-booth^="ISRM"] polygon {
  stroke: var(--booth-color, #157dd2);
}

.booth-map .booth[data-booth^="6"] {
  --booth-color: #efa300;
  --booth-pulse-shadow-light: rgba(239, 163, 0, 0.55);
  --booth-pulse-shadow-strong: rgba(239, 163, 0, 0.9);
}

.booth-map .booth[data-booth^="6"] rect,
.booth-map .booth[data-booth^="6"] polygon {
  stroke: var(--booth-color, #efa300);
}

.booth-map .booth[data-booth^="8"] {
  --booth-color: #2ecc71;
  --booth-pulse-shadow-light: rgba(46, 204, 113, 0.55);
  --booth-pulse-shadow-strong: rgba(46, 204, 113, 0.9);
}

.booth-map .booth[data-booth^="8"] rect,
.booth-map .booth[data-booth^="8"] polygon {
  stroke: var(--booth-color, #2ecc71);
}

.booth-map .booth.booth--pulse {
  animation: booth-pulse 1.5s ease-in-out infinite;
}

.booth-map .booth.booth--pulse rect,
.booth-map .booth.booth--pulse polygon {
  stroke: var(--booth-color, #333333) !important;
  stroke-width: 3 !important;
  stroke-dasharray: 6 4;
  animation: booth-dash 2s linear infinite;
}

@keyframes booth-pulse {
  0% {
    filter: drop-shadow(0 0 6px var(--booth-pulse-shadow-light, rgba(51, 51, 51, 0.55)));
  }
  50% {
    filter: drop-shadow(0 0 18px var(--booth-pulse-shadow-strong, rgba(51, 51, 51, 0.9)));
  }
  100% {
    filter: drop-shadow(0 0 6px var(--booth-pulse-shadow-light, rgba(51, 51, 51, 0.55)));
  }
}

@keyframes booth-dash {
  from {
    stroke-dashoffset: 0;
  }
  to {
    stroke-dashoffset: 20;
  }
}

.booth-map .booth.available:hover rect,
.booth-map .booth.available:hover polygon {
  fill: #34d58c;
  stroke: #1fa463;
  stroke-width: 5;
  stroke-linejoin: miter;
  stroke-linecap: square;
}

.booth-map .booth.booth--static {
  cursor: default;
}

.booth-map .booth.booth--static rect,
.booth-map .booth.booth--static polygon {
  fill: #f8f4ec;
  stroke: #4f3524;
  stroke-width: 4;
}

.booth-map .booth.booth--static text {
  fill: #4f3524;
}

.booth-map .booth.selected rect,
.booth-map .booth.selected polygon {
  fill: #1fa463;
  stroke: #0f6b3f;
  stroke-width: 5;
  stroke-linejoin: miter;
  stroke-linecap: square;
}

.booth-map .booth.reserved {
  cursor: default;
  opacity: 0.6;
}

.booth-map .booth.reserved rect,
.booth-map .booth.reserved polygon {
  fill: #cccccc;
  stroke: #999999;
  stroke-width: 4;
  stroke-linejoin: miter;
  stroke-linecap: square;
}

.booth-map .booth.booth--has-sponsor rect,
.booth-map .booth.booth--has-sponsor polygon {
  fill: #bfc6cc;
}

.booth-reserved-tooltip {
  position: fixed;
  z-index: 1090;
  pointer-events: none;
  background: #ffffff;
  border-radius: 0.75rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
  padding: 0.85rem 1.05rem;
  max-width: 280px;
  opacity: 0;
  transform: translateY(-1rem);
  transition: opacity 0.18s ease, transform 0.18s ease;
  font-size: 0.92rem;
}

.booth-reserved-tooltip.is-visible {
  opacity: 1;
  transform: translateY(-1.35rem);
}

.booth-reserved-tooltip__inner {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.booth-reserved-tooltip__logo {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.8rem;
  padding: 0.35rem;
  background: linear-gradient(145deg, rgba(13, 110, 253, 0.15), rgba(13, 110, 253, 0.05));
}

.booth-reserved-tooltip__logo-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.booth-reserved-tooltip__logo-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: rgba(13, 110, 253, 0.65);
  font-size: 1.45rem;
}

.booth-reserved-tooltip__meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.booth-reserved-tooltip__label {
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6b7280;
}

.booth-reserved-tooltip__name {
  font-weight: 600;
  color: #1f2937;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.booth-map .booth.reserved text {
  fill: #666666;
}

.booth-map .booth.reserved:hover rect,
.booth-map .booth.reserved:hover polygon {
  fill: #cccccc;
  stroke: #999999;
  stroke-width: 5;
  stroke-linejoin: miter;
  stroke-linecap: square;
}

.booth-map .booth text {
  pointer-events: none;
  font-weight: bold;
  font-size: 18px;
  fill: #333333;
}

.booth-map .booth text.subtitle {
  font-size: 14px;
}

.booth-map .booth .booth-booked-label {
  font-style: italic;
  font-weight: 400;
}

.booth-map .booth.selected text {
  fill: #ffffff;
}

.booth-map .label {
  font-size: 26px;
  font-weight: bold;
  fill: #333333;
}

.booth-map .small-label {
  font-size: 16px;
  fill: #666666;
}

.booth-map .static-element {
  fill: none;
  stroke: #333333;
  stroke-width: 6;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.booth-map .controls {
  margin-top: 30px;
  text-align: center;
}

.booth-map .controls button {
  padding: 12px 24px;
  margin: 0 5px;
  font-size: 16px;
  cursor: pointer;
  border: none;
  border-radius: 5px;
  background-color: #2196f3;
  color: #ffffff;
  transition: background-color 0.2s;
}

.booth-map .controls button:hover {
  background-color: #1976d2;
}

.booth-map .controls button.danger {
  background-color: #f44336;
}

.booth-map .controls button.danger:hover {
  background-color: #d32f2f;
}

.booth-map #selected-booths {
  margin-top: 20px;
  padding: 15px;
  background-color: #f9f9f9;
  border-radius: 5px;
  min-height: 50px;
}

.booth-map #selected-booths h3 {
  margin-bottom: 10px;
  color: #555555;
}

.booth-map #booth-list {
  color: #333333;
  font-size: 16px;
}

.booth-map .join-handle {
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.booth-map .join-handle__circle {
  fill: #ffffff;
  stroke: #157dd2;
  stroke-width: 1.8;
  filter: drop-shadow(0 2px 4px rgba(31, 164, 99, 0.15));
  transition: fill 0.2s ease, stroke 0.2s ease, filter 0.2s ease;
}

.booth-map .join-handle__icon {
  fill: #157dd2;
  font-size: 16px;
  font-weight: 700;
  pointer-events: none;
  transition: fill 0.2s ease;
}

.booth-map .join-handle:hover .join-handle__circle,
.booth-map .join-handle:focus .join-handle__circle {
  fill: #157dd2;
  stroke: #157dd2;
  filter: drop-shadow(0 4px 6px rgba(31, 164, 99, 0.2));
}

.booth-map .join-handle:hover .join-handle__icon,
.booth-map .join-handle:focus .join-handle__icon {
  fill: #ffffff;
}

.booth-map .join-handle.selected .join-handle__circle {
  fill: #0f6b3f;
  stroke: #0f6b3f;
  filter: drop-shadow(0 4px 8px rgba(15, 107, 63, 0.25));
}

.booth-map .join-handle.selected .join-handle__icon {
  fill: #ffffff;
}

.booth-map .join-handle.disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.booth-map .join-handle.disabled .join-handle__circle {
  filter: none;
}

.booth-map .join-handle.disabled .join-handle__icon {
  fill: rgba(31, 164, 99, 0.35);
}

.booth-map .join-handle--hint:not(.selected) .join-handle__circle {
  fill: #24c274;
  stroke: #24c274;
  filter: drop-shadow(0 4px 10px rgba(36, 194, 116, 0.25));
}

.booth-map .join-handle--hint:not(.selected) .join-handle__icon {
  fill: #ffffff;
}

.tooltip.tooltip-light .tooltip-inner {
  background-color: #ffffff;
  color: var(--color-slate, #1d2c3b);
  border-radius: 0.5rem;
  padding: 0.45rem 0.75rem;
  box-shadow: 0 10px 30px rgba(13, 42, 67, 0.18);
  font-weight: 600;
}

.tooltip.tooltip-light .tooltip-arrow::before {
  border-top-color: #ffffff;
}
