/* Frontend styles */

.tochki {
  display: block;
  max-width: 100%;
}

.tochki__wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.tochki__img {
  display: block;
  max-width: 100%;
  height: auto;
}

.tochki__layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.tochki__dot {
  position: absolute;
  transform: translate(-50%, -50%);
  /* Strong reset to avoid theme button styles stretching the dot */
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  border-radius: 999px;
  border: 2px solid #fff !important;
  background: rgba(255, 106, 42, 0.95) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
  cursor: pointer;
  pointer-events: auto;
  padding: 0 !important;
  line-height: 0 !important;
  font-size: 0 !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  appearance: none !important;
}

.tochki__dot:focus {
  outline: 2px solid rgba(0, 0, 0, 0.75);
  outline-offset: 2px;
}

.tochki__dot-inner {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
}

.tochki__tooltip {
  position: absolute;
  z-index: 9999;
  width: 280px;
  max-width: min(280px, calc(100% - 16px));
  background: #fff;
  /* Force readable text on dark-themed pages (prevent inherited light text) */
  color: #111 !important;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.20);
  padding: 12px;
  box-sizing: border-box;
}

.tochki__tooltip-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  margin: 0 0 10px 0;
}

.tochki__tooltip-text {
  font-size: 14px;
  line-height: 1.35;
  color: #111 !important;
}

/* Ensure nested formatting (strong/em/a etc.) stays dark even under theme overrides */
.tochki__tooltip-text * {
  color: #111 !important;
}

.tochki__tooltip-text p {
  margin: 0 0 8px 0;
}

.tochki__tooltip-text p:last-child {
  margin-bottom: 0;
}

.tochki__tooltip-text ul,
.tochki__tooltip-text ol {
  margin: 0 0 8px 18px;
  padding: 0;
}

.tochki__tooltip-text li {
  margin: 0 0 4px 0;
}

.tochki__tooltip-text a {
  text-decoration: underline;
  color: #111 !important;
}
