/* Map privats FAB + modal (site style) */

.map-fab-dock {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 11000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 14px;
  pointer-events: none;
}

.map-fab-dock > button {
  pointer-events: auto;
}

.map-fab-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 78px;
  height: 86px;
  padding: 8px 8px 6px;
  border: none;
  border-radius: 18px;
  cursor: pointer;
  color: #fff8e8;
  font-family: var(--site-font-body, "Segoe UI", sans-serif);
  -webkit-tap-highlight-color: transparent;
  appearance: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.map-fab-btn__glow {
  position: absolute;
  inset: -6px;
  border-radius: 22px;
  pointer-events: none;
  animation: map-fab-pulse 2.4s ease-in-out infinite;
}

.map-fab-btn__icon {
  width: 46px;
  height: 46px;
  display: block;
  position: relative;
  z-index: 1;
  image-rendering: pixelated;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.45));
}

.map-fab-btn__label {
  position: relative;
  z-index: 1;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

#privats-btn {
  background: linear-gradient(180deg, #1a3a22 0%, #0e1f12 100%);
  box-shadow:
    0 0 0 2px rgba(72, 200, 110, 0.55),
    0 0 22px rgba(72, 200, 110, 0.35),
    0 10px 28px rgba(0, 0, 0, 0.55);
}

#privats-btn .map-fab-btn__glow {
  background: radial-gradient(circle at 50% 30%, rgba(120, 255, 160, 0.28), transparent 65%);
}

#privats-btn .map-fab-btn__label {
  color: #b8ffd0;
}

#privats-btn:hover {
  transform: translateY(-3px);
  background: linear-gradient(180deg, #245030 0%, #142818 100%);
  box-shadow:
    0 0 0 2px rgba(140, 255, 170, 0.85),
    0 0 28px rgba(120, 255, 160, 0.5),
    0 14px 32px rgba(0, 0, 0, 0.55);
}

#privats-btn:active {
  transform: translateY(0);
}

#privats-btn:focus-visible {
  outline: 2px solid #8cffaa;
  outline-offset: 3px;
}

#webinv-btn {
  position: relative !important;
  left: auto !important;
  bottom: auto !important;
  transform: none !important;
  z-index: auto !important;
}

#webinv-btn.webinv-btn--hidden {
  transform: translateY(18px) !important;
}

#webinv-btn:hover {
  transform: translateY(-3px) !important;
}

#webinv-btn:active {
  transform: translateY(0) !important;
}

@keyframes map-fab-pulse {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}

.privats-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(5, 31, 69, 0.78);
  backdrop-filter: blur(4px);
}

.privats-overlay[hidden] {
  display: none !important;
}

.privats-modal {
  width: min(540px, 100%);
  max-height: min(88vh, 760px);
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid rgba(252, 212, 138, 0.28);
  background: linear-gradient(180deg, #314354, #051f45);
  box-shadow: 0 24px 60px rgba(5, 31, 69, 0.55);
  color: var(--site-cream, #d0d0b4);
  overflow: hidden;
  font-family: var(--site-font-body, "Segoe UI", sans-serif);
}

.privats-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 14px;
  border-bottom: 1px solid rgba(252, 212, 138, 0.16);
}

.privats-modal__head-main {
  min-width: 0;
  flex: 1;
}

.privats-modal__title {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  color: #ffe2a8;
}

.privats-modal__count {
  margin-top: 6px;
  font-size: 15px;
  color: var(--site-muted, rgba(208, 208, 180, 0.72));
}

.privats-modal__summary {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(154, 228, 255, 0.28);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.privats-modal__summary-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 246, 230, 0.65);
}

.privats-modal__summary-value {
  font-size: 1.55rem;
  font-weight: 800;
  color: #9ae4ff;
  line-height: 1.2;
}

.privats-modal__close {
  border: 1px solid rgba(252, 212, 138, 0.22);
  background: rgba(0, 0, 0, 0.22);
  color: #ffe2a8;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.privats-modal__close:hover {
  background: rgba(255, 255, 255, 0.08);
}

.privats-modal__body {
  padding: 14px 18px 18px;
  overflow: auto;
  font-size: 15px;
}

.privats-status {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  background: rgba(154, 228, 255, 0.12);
  border: 1px solid rgba(154, 228, 255, 0.28);
  color: #9ae4ff;
}

.privats-status.is-ok {
  background: rgba(107, 191, 110, 0.16);
  border-color: rgba(107, 191, 110, 0.35);
  color: #b8ffd0;
}

.privats-status.is-error {
  background: rgba(255, 80, 80, 0.14);
  border-color: rgba(255, 120, 120, 0.35);
  color: #ffb0b0;
}

.privats-status.is-loading {
  background: rgba(252, 212, 138, 0.12);
  border-color: rgba(252, 212, 138, 0.28);
  color: #ffe2a8;
}

.privats-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.privats-card {
  border-radius: 16px;
  border: 1px solid rgba(252, 212, 138, 0.28);
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(252, 212, 138, 0.1), transparent 55%),
    linear-gradient(165deg, rgba(8, 34, 70, 0.96), rgba(5, 18, 40, 0.98));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  padding: 16px 16px 14px;
  color: #f5ecd6;
}

.privats-card__flash {
  display: none;
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.privats-card__flash:not(:empty) {
  display: block;
}

.privats-card__flash--ok {
  background: rgba(107, 191, 110, 0.2);
  border: 1px solid rgba(107, 191, 110, 0.4);
  color: #d4ffe0;
}

.privats-card__flash--err {
  background: rgba(255, 80, 80, 0.16);
  border: 1px solid rgba(255, 120, 120, 0.35);
  color: #ffc8c8;
}

.privats-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.privats-card__title-wrap {
  min-width: 0;
  flex: 1;
}

.privats-card__name {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 800;
  color: #ffe2a8;
  line-height: 1.25;
  word-break: break-word;
}

.privats-card__id {
  margin: 5px 0 0;
  font-size: 0.88rem;
  color: rgba(255, 246, 230, 0.55);
  word-break: break-all;
}

.privats-badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.privats-badge--owner {
  background: rgba(107, 191, 110, 0.22);
  color: #b8ffd0;
  border: 1px solid rgba(107, 191, 110, 0.35);
}

.privats-badge--member {
  background: rgba(90, 160, 255, 0.2);
  color: #b8d8ff;
  border: 1px solid rgba(90, 160, 255, 0.35);
}

.privats-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-bottom: 8px;
}

.privats-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 246, 230, 0.88);
}

.privats-tax-box {
  margin: 10px 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(154, 228, 255, 0.24);
}

.privats-tax-box__amount {
  font-size: 1.2rem;
  font-weight: 800;
  color: #9ae4ff;
  line-height: 1.3;
}

.privats-tax-box__when-label {
  margin-top: 10px;
  font-size: 0.92rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 246, 230, 0.68);
}

.privats-tax-box__when-date {
  margin-top: 6px;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.25;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.privats-members {
  margin: 0 0 12px;
  font-size: 0.98rem;
  color: rgba(255, 246, 230, 0.88);
  line-height: 1.45;
}

.privats-members strong {
  color: #fff;
}

.privats-section {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.privats-section__label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 246, 230, 0.68);
}

.privats-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.privats-row input[type="text"],
.privats-row select {
  flex: 1;
  min-width: 0;
  border-radius: 10px;
  border: 1px solid rgba(232, 240, 228, 0.18);
  background: rgba(0, 0, 0, 0.28);
  color: var(--site-cream, #d0d0b4);
  padding: 11px 13px;
  font: inherit;
  font-size: 15px;
}

.privats-row input:focus,
.privats-row select:focus {
  outline: 1px solid rgba(107, 191, 110, 0.55);
  border-color: rgba(107, 191, 110, 0.55);
}

.privats-btn {
  appearance: none;
  border: 1px solid rgba(212, 62, 20, 0.55);
  background: linear-gradient(180deg, #e24a1c, #b83410);
  color: #fff8f0;
  font: inherit;
  font-weight: 650;
  font-size: 15px;
  padding: 11px 14px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  min-width: 108px;
}

.privats-btn.is-loading {
  opacity: 0.75;
  cursor: wait;
}

.privats-btn.is-done {
  background: linear-gradient(180deg, #3a9a52, #267a3c);
  border-color: rgba(107, 191, 110, 0.55);
}

.privats-btn:hover:not(:disabled) {
  filter: brightness(1.08);
}

.privats-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.privats-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.privats-color-swatch {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  padding: 0;
  transition: transform 0.12s ease, border-color 0.12s ease;
}

.privats-color-swatch:hover {
  transform: scale(1.08);
}

.privats-color-swatch.is-active {
  border-color: #fcd48a;
  box-shadow: 0 0 0 2px rgba(252, 212, 138, 0.35);
}

.privats-color-input {
  width: 36px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.privats-color-preview {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  display: inline-block;
  vertical-align: middle;
  margin-right: 4px;
}

.map-privat-rect {
  stroke-width: 2;
}

.map-privat-popup {
  font-size: 13px;
  line-height: 1.35;
}

@media (max-width: 520px) {
  .privats-overlay {
    padding: 8px;
    align-items: flex-end;
  }

  .privats-modal {
    width: 100%;
    max-height: 92vh;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }

  .privats-modal__title {
    font-size: 22px;
  }

  .privats-modal__summary-value {
    font-size: 1.75rem;
  }

  .privats-tax-box__when-date {
    font-size: 1.5rem;
  }

  .map-fab-dock {
    bottom: 16px;
    gap: 10px;
  }

  #privats-btn.map-fab-btn {
    width: 72px !important;
    height: 80px !important;
  }

  #privats-btn .map-fab-btn__icon {
    width: 42px !important;
    height: 42px !important;
  }

  #webinv-btn {
    width: 72px !important;
    height: 80px !important;
    background: linear-gradient(180deg, #3a2a18 0%, #1e150c 100%) !important;
    box-shadow:
      0 0 0 2px rgba(212, 160, 23, 0.55),
      0 0 22px rgba(212, 160, 23, 0.35),
      0 10px 28px rgba(0, 0, 0, 0.55) !important;
  }

  #webinv-btn .webinv-fab-label {
    color: #ffe7a8 !important;
  }

  #webinv-btn > svg.webinv-fab-chest {
    width: 42px !important;
    height: 42px !important;
  }

  .privats-row {
    flex-wrap: wrap;
  }

  .privats-btn {
    width: 100%;
    min-width: 0;
  }
}
