/* ============================================================
   Villa Plumbing Field Portal — Revenue + Contract Source CSS
   Reuses the existing .vpcc-* tokens (chips, signals, group
   title).  Only the new locals (open-link buttons + missing
   line) get rules of their own so the chip strip looks
   identical to the Profitability report.
   ============================================================ */

.vpcc.vpcc-rcs {
  margin-top: 12px;
}

.vpcc-rcs .vpcc-rcs-signals {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.vpcc-rcs-missing {
  background: var(--bd-lt);
  border: 1px dashed var(--bd);
  border-radius: 10px;
  padding: 8px 10px;
  margin: 8px 0;
  font-family: 'Barlow', sans-serif;
  font-size: 13px;
  color: var(--tx-md);
}

.vpcc-rcs-empty {
  background: var(--bd-lt);
  border: 1px dashed var(--bd);
  border-radius: 10px;
  padding: 10px;
  font-family: 'Barlow', sans-serif;
  font-size: 13px;
  color: var(--tx-md);
}

.vpcc-rcs-restricted {
  font-family: 'Barlow', sans-serif;
  font-size: 13px;
  color: var(--tx-md);
  font-style: italic;
  padding: 6px 0;
}

.vpcc-rcs-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.vpcc-rcs-link {
  border: 1px solid var(--bd);
  background: #fff;
  color: var(--tx);
  border-radius: 999px;
  padding: 4px 10px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .3px;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
}
.vpcc-rcs-link:hover,
.vpcc-rcs-link:focus {
  background: var(--bd-lt);
  border-color: var(--tx-lt);
  outline: none;
}
.vpcc-rcs-link.is-disabled,
.vpcc-rcs-link[disabled],
.vpcc-rcs-link[aria-disabled="true"] {
  opacity: .45;
  cursor: not-allowed;
  background: var(--bd-lt);
}
.vpcc-rcs-link.is-disabled:hover,
.vpcc-rcs-link[disabled]:hover,
.vpcc-rcs-link[aria-disabled="true"]:hover {
  background: var(--bd-lt);
  border-color: var(--bd);
}

/* Appendix wrapper around AH export preview when mounted under
   the RCS section.  Adds a separator so the two surfaces read
   as distinct cards on the same Reports tab. */
.vpcc-rcs-ah-appendix {
  margin-top: 12px;
}

/* Drill-down chips — visible affordance that the chip is active.
   When a chip carries .vpcc-rcs-drill it is a <button>, not a
   <div>, and clicking emits a vpcc-rcs-open event with target +
   filter so the user lands in the related filtered list.  We
   keep the chip's visual silhouette identical to the passive
   chips so the section reads as one unit; the affordance is in
   the hover state, the cursor, and the title attribute. */
button.vpcc-sig.vpcc-rcs-drill {
  cursor: pointer;
  background: #fff;
  border: 1px solid var(--bd);
  border-radius: 10px;
  padding: 6px 10px;
  text-align: left;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: background .12s ease, border-color .12s ease, box-shadow .12s ease;
}
button.vpcc-sig.vpcc-rcs-drill:hover,
button.vpcc-sig.vpcc-rcs-drill:focus {
  background: var(--bd-lt);
  border-color: var(--tx-lt);
  outline: none;
  box-shadow: 0 1px 0 var(--bd) inset, 0 0 0 2px rgba(98, 154, 255, .25);
}
/* Match the existing .attn / .ok status colours when on a drill chip. */
button.vpcc-sig.vpcc-rcs-drill.attn { border-color: var(--warn, #c98a00); }
button.vpcc-sig.vpcc-rcs-drill.ok   { border-color: var(--ok, #2e7d32); }
/* Passive chip layout shouldn't get the cursor/hover treatment. */
.vpcc-rcs-signals > .vpcc-sig:not(button) {
  cursor: default;
}

/* Landing flash — brief outline pulse so the user sees where an
   Open button just took them.  Used by the navigator after
   scrollIntoView. */
.vpcc-rcs-landing-flash {
  animation: vpcc-rcs-landing-flash 1.5s ease-out 1;
  box-shadow: 0 0 0 3px rgba(98, 154, 255, .35);
  border-radius: 12px;
}
@keyframes vpcc-rcs-landing-flash {
  0%   { box-shadow: 0 0 0 3px rgba(98, 154, 255, .55); }
  100% { box-shadow: 0 0 0 3px rgba(98, 154, 255, 0); }
}

@media (max-width: 540px) {
  .vpcc-rcs .vpcc-rcs-signals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .vpcc-rcs-links {
    flex-direction: column;
  }
  .vpcc-rcs-link {
    width: 100%;
    text-align: center;
  }
}
