/* !RedDataviz — [redmap_rcip] Frameless Interactive Map + Anti-Copy Footprint
   Version: 1.1.0 */

.rcip-map-widget,
.rcip-map-widget *,
.rcip-mobile-portal,
.rcip-mobile-portal * {
  box-sizing: border-box;
}

.rcip-map-widget {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #0f172a;
  overflow-x: clip;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.rcip-map-widget .rcip-title {
  margin: 0 0 10px !important;
  padding: 0 !important;
  font-size: 16px !important;
  line-height: 1.3 !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  text-align: center;
}

/* Compact Frameless Toolbar */
.rcip-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 8px;
  padding: 0;
  background: transparent;
  border: 0;
}

/* Stream Filter Segmented Control */
.rcip-stream-group {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 7px;
  flex-shrink: 0;
}

.rcip-map-widget button.rcip-btn {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px !important;
  margin: 0 !important;
  border: 1px solid transparent !important;
  border-radius: 5px !important;
  background: transparent;
  color: #475569 !important;
  font-family: inherit !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: none !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

.rcip-map-widget button.rcip-btn:hover {
  color: #0f172a !important;
  background: rgba(255, 255, 255, 0.75);
}

.rcip-map-widget button.rcip-btn.is-active {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06) !important;
}

.rcip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.rcip-dot-rcip { background: #0033cc; }
.rcip-dot-fcip { background: #0f766e; }

/* Region Zoom Pills */
.rcip-zoom-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  margin: 0;
  border: 0;
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.rcip-zoom-bar::-webkit-scrollbar {
  display: none;
}

.rcip-map-widget button.rcip-zoom-btn {
  height: 28px;
  padding: 0 10px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 6px !important;
  background: rgba(248, 250, 252, 0.85);
  color: #334155 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  flex-shrink: 0;
}

.rcip-map-widget button.rcip-zoom-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1 !important;
}

.rcip-map-widget button.rcip-zoom-btn.is-active {
  background: #0f172a !important;
  border-color: #0f172a !important;
  color: #ffffff !important;
}

/* Bottom Helper Caption + Bottom-Right Copyright */
.rcip-bottom-meta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  margin-top: 8px;
  padding: 0 78px;
}

.rcip-map-widget p.rcip-helper-note {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 12.5px !important;
  line-height: 1.4 !important;
  font-weight: 500 !important;
  color: #64748b !important;
  text-align: center;
}

.rcip-helper-icon {
  width: 15px;
  height: 15px;
  color: #0033cc;
  flex-shrink: 0;
}

.rcip-hint-mobile {
  display: none;
}

/* Frameless SVG Stage + Single Central Brand Watermark */
.rcip-stage {
  position: relative;
  width: 100%;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  overflow: visible;
}

.rcip-svg-holder {
  position: relative;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  background: transparent;
  border: 0;
}

.rcip-map-widget svg.rcip-stage-wm {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  width: clamp(92px, 19%, 248px);
  max-height: 66%;
  height: auto;
  z-index: 2;
  pointer-events: none;
  fill: #0f172a;
  opacity: 0.045;
}

.rcip-corner-fp {
  position: absolute;
  right: 2px;
  bottom: 2px;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: 0.015em;
  color: rgba(100, 116, 139, 0.62);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  white-space: nowrap;
}

.rcip-map-widget[data-watermark="false"] .rcip-corner-fp {
  display: none;
}

.rcip-map-widget svg.rcip-svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

@media (min-width: 768px) {
  .rcip-map-widget svg.rcip-svg:not([viewBox^="0 0"]) {
    max-height: 780px;
  }
}

/* Stream Filtering States inside SVG */
.rcip-map-widget svg.rcip-svg .city-node.is-dimmed {
  opacity: 0.15;
  pointer-events: none;
}

.rcip-map-widget svg.rcip-svg circle.pin-fcip,
.rcip-map-widget svg.rcip-svg .stream-fcip circle.city-pin {
  fill: #0f766e;
}

/* Floating Card (Desktop) & Docked Bottom Sheet (Mobile) */
.rcip-card {
  position: absolute;
  z-index: 60;
  width: 334px;
  max-width: calc(100vw - 24px);
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 13px 14px 11px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.06);
  color: #0f172a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  text-align: start;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.rcip-card[hidden] {
  display: none !important;
}

.rcip-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.rcip-card-title-group {
  min-width: 0;
  flex: 1;
}

.rcip-card-topmeta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 3px;
}

.rcip-badges-slot {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.rcip-badge {
  display: inline-flex;
  align-items: center;
  height: 19px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
}
.rcip-badge-rcip {
  background: #eff6ff;
  color: #0033cc;
  border: 1px solid #bfdbfe;
}
.rcip-badge-fcip {
  background: #f0fdfa;
  color: #0f766e;
  border: 1px solid #99f6e4;
}

.rcip-prov-label {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
}

.rcip-card h4.rcip-card-name {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 15px !important;
  line-height: 1.25 !important;
  font-weight: 700 !important;
  color: #0f172a !important;
}

.rcip-card p.rcip-card-sub {
  margin: 2px 0 0 !important;
  padding: 0 !important;
  font-size: 11.5px !important;
  line-height: 1.35 !important;
  color: #64748b !important;
}

.rcip-card button.rcip-card-close {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0 !important;
  margin: -2px -4px 0 0 !important;
  border: 1px solid transparent !important;
  border-radius: 6px !important;
  background: transparent;
  color: #64748b !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  cursor: pointer;
  flex-shrink: 0;
}

.rcip-card button.rcip-card-close:hover {
  background: #f1f5f9;
  color: #0f172a !important;
}

.rcip-card-sec-lbl {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
  margin: 8px 0 5px !important;
}

.rcip-card-sectors {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 8px !important;
  padding: 0 !important;
  list-style: none !important;
}

.rcip-card-sectors li {
  margin: 0 !important;
  padding: 3px 7px !important;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  font-size: 11.5px !important;
  line-height: 1.25 !important;
  font-weight: 500 !important;
  color: #1e293b !important;
  list-style: none !important;
}

.rcip-card p.rcip-card-focus {
  margin: 0 0 10px !important;
  padding: 7px 9px !important;
  background: #f8fafc;
  border-inline-start: 2.5px solid #0033cc;
  border-radius: 0 5px 5px 0;
  font-size: 12px !important;
  line-height: 1.45 !important;
  color: #334155 !important;
}

.rcip-card-foot {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
}

.rcip-card-edo-text {
  font-size: 11px;
  line-height: 1.35;
  color: #64748b;
}

.rcip-card-edo-text strong {
  font-weight: 600;
  color: #334155;
}

.rcip-card a.rcip-card-cta {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 32px;
  padding: 0 12px !important;
  background: #0033cc !important;
  color: #ffffff !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  text-decoration: none !important;
  transition: background-color 0.15s ease;
}

.rcip-card a.rcip-card-cta:hover {
  background: #002699 !important;
  color: #ffffff !important;
}

.rcip-card-fp {
  font-size: 10px;
  line-height: 1.2;
  color: #94a3b8;
  text-align: right;
  letter-spacing: 0.01em;
  margin-top: 1px;
}

/* Unauthorized Domain Notice */
.rcip-origin-stamp {
  padding: 6px 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  text-align: center;
  margin-bottom: 8px;
}

/* Mobile Portal & Backdrop */
.rcip-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.34);
  z-index: 2147483640;
}
.rcip-backdrop[hidden] {
  display: none !important;
}

.rcip-card.is-mobile-sheet {
  position: fixed !important;
  left: 12px !important;
  right: 12px !important;
  top: auto !important;
  bottom: max(12px, env(safe-area-inset-bottom)) !important;
  width: auto !important;
  max-width: none !important;
  max-height: 74vh;
  overflow-y: auto;
  z-index: 2147483645 !important;
  padding: 15px 16px 13px !important;
  border-radius: 12px !important;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.28) !important;
}

.rcip-card.is-mobile-sheet button.rcip-card-close {
  width: 32px;
  height: 32px;
  background: #f1f5f9;
  font-size: 20px !important;
}

.rcip-card.is-mobile-sheet a.rcip-card-cta {
  height: 38px;
  font-size: 13px !important;
}

/* Responsive Mobile Rules (<= 767px) */
@media (max-width: 767px) {
  .rcip-map-widget {
    margin: 8px auto 16px;
  }

  .rcip-hint-desktop {
    display: none;
  }
  .rcip-hint-mobile {
    display: inline;
  }

  .rcip-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
    margin-bottom: 6px;
  }

  .rcip-stream-group {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .rcip-map-widget button.rcip-btn {
    height: 32px;
    padding: 0 6px !important;
  }

  .rcip-zoom-bar {
    flex-wrap: wrap;
    justify-content: center;
    overflow-x: visible;
    gap: 5px;
  }

  .rcip-map-widget button.rcip-zoom-btn {
    height: 29px;
    padding: 0 9px !important;
    font-size: 11.5px !important;
  }

  .rcip-bottom-meta {
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0 2px;
    margin-top: 6px;
  }

  .rcip-map-widget p.rcip-helper-note {
    font-size: 11.5px !important;
    margin: 0 !important;
  }

  .rcip-corner-fp {
    position: static;
    align-self: flex-end;
    font-size: 10.5px;
  }
}
