/* Value.IO Design System — Buttons (site-wide)
   File kept as vio-hero.css to avoid mass <link> updates.
   Targets .cmn-btn globally. Inline style= overrides still win for ghost variants. */

/* ========================================
   PRIMARY CTA — .cmn-btn (red filled pill)
   ======================================== */

.cmn-btn {
  background: var(--vio-red) !important;
  color: #fff !important;
  border: 1px solid transparent !important;
  border-radius: var(--vio-r-pill) !important;
  padding: 12px 26px !important;
  font-family: var(--vio-font-body);
  font-weight: 500;
  font-size: var(--vio-text-base);
  line-height: 1.2;
  transition: background var(--vio-dur-2) var(--vio-ease),
              box-shadow var(--vio-dur-2) var(--vio-ease),
              transform var(--vio-dur-2) var(--vio-ease),
              border-color var(--vio-dur-2) var(--vio-ease),
              color var(--vio-dur-2) var(--vio-ease);
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.cmn-btn:hover {
  background: var(--vio-red-dark) !important;
  box-shadow: var(--vio-shadow-red) !important;
  transform: translateY(-1px);
  color: #fff !important;
}

.cmn-btn:active {
  transform: translateY(0);
  box-shadow: none !important;
}

.cmn-btn:focus-visible {
  outline: 2px solid var(--vio-red);
  outline-offset: 3px;
}

/* ========================================
   GHOST VARIANTS — driven by inline style=
   ======================================== */

/* When inline style sets background:transparent, hover should not flood red.
   We can't easily detect that with CSS alone, but we can soften the hover:
   for any .cmn-btn with attribute style containing 'transparent', invert hover. */

.cmn-btn[style*="transparent"]:hover {
  background: rgba(204, 36, 44, 0.08) !important;
  box-shadow: none !important;
  transform: translateY(-1px);
}

/* Ghost on dark sections (white text + white border via inline style) */
.cmn-btn[style*="color:#fff"][style*="transparent"]:hover,
.cmn-btn[style*="color: #fff"][style*="transparent"]:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
}

/* Hero-scope ghost CTA hover — soft red tint + red-dark text on light hero surfaces */
.pricing-hero .cmn-btn[style*="color:#fff"][style*="transparent"]:hover,
.pricing-hero .cmn-btn[style*="color: #fff"][style*="transparent"]:hover,
.why-hero .cmn-btn[style*="color:#fff"][style*="transparent"]:hover,
.why-hero .cmn-btn[style*="color: #fff"][style*="transparent"]:hover,
.routing-hero .cmn-btn[style*="color:#fff"][style*="transparent"]:hover,
.routing-hero .cmn-btn[style*="color: #fff"][style*="transparent"]:hover,
.safety-hero .cmn-btn[style*="color:#fff"][style*="transparent"]:hover,
.safety-hero .cmn-btn[style*="color: #fff"][style*="transparent"]:hover,
.faq-hero .cmn-btn[style*="color:#fff"][style*="transparent"]:hover,
.faq-hero .cmn-btn[style*="color: #fff"][style*="transparent"]:hover,
.dev-hero .cmn-btn[style*="color:#fff"][style*="transparent"]:hover,
.dev-hero .cmn-btn[style*="color: #fff"][style*="transparent"]:hover,
.agentic-hero .cmn-btn[style*="color:#fff"][style*="transparent"]:hover,
.agentic-hero .cmn-btn[style*="color: #fff"][style*="transparent"]:hover,
.proc-hero .cmn-btn[style*="color:#fff"][style*="transparent"]:hover,
.proc-hero .cmn-btn[style*="color: #fff"][style*="transparent"]:hover {
  background: rgba(204, 36, 44, 0.06) !important;
  color: var(--vio-red-dark) !important;
  border-color: var(--vio-ink) !important;
  box-shadow: none !important;
}

/* Inline ghost-on-light CTAs — `style="background:transparent;color:#CC242C;..."`
   Restores ghost intent: transparent bg, red text, hairline border (per design system,
   red borders are reserved for primary). Overrides base .cmn-btn !important fill. */
.cmn-btn[style*="color:#CC242C"][style*="transparent"],
.cmn-btn[style*="color: #CC242C"][style*="transparent"],
.cmn-btn[style*="color:#cc242c"][style*="transparent"],
.cmn-btn[style*="color: #cc242c"][style*="transparent"] {
  background: transparent !important;
  color: var(--vio-red) !important;
  border: 1px solid var(--vio-hairline) !important;
}

.cmn-btn[style*="color:#CC242C"][style*="transparent"]:hover,
.cmn-btn[style*="color: #CC242C"][style*="transparent"]:hover,
.cmn-btn[style*="color:#cc242c"][style*="transparent"]:hover,
.cmn-btn[style*="color: #cc242c"][style*="transparent"]:hover {
  background: rgba(204, 36, 44, 0.06) !important;
  color: var(--vio-red-dark) !important;
  border-color: var(--vio-ink) !important;
  box-shadow: none !important;
  transform: translateY(-1px);
}

/* ========================================
   .white-button .cmn-btn — Inverted CTAs on red containers
   (e.g., .get-started-with-us-inner has red bg)
   Restores design intent: white-filled CTA with red text +
   ghost CTA stays transparent + white text/border
   ======================================== */

.white-button .cmn-btn {
  background: #fff !important;
  color: var(--vio-red) !important;
  border: 1px solid #fff !important;
}

.white-button .cmn-btn:hover {
  background: rgba(255, 255, 255, 0.92) !important;
  color: var(--vio-red-dark) !important;
  box-shadow: none !important;
  transform: translateY(-1px);
}

/* Ghost CTA inside .white-button — keep transparent + white */
.white-button .cmn-btn[style*="color:#fff"][style*="transparent"],
.white-button .cmn-btn[style*="color: #fff"][style*="transparent"] {
  background: transparent !important;
  color: #fff !important;
  border: 1px solid #fff !important;
}

.white-button .cmn-btn[style*="color:#fff"][style*="transparent"]:hover,
.white-button .cmn-btn[style*="color: #fff"][style*="transparent"]:hover {
  background: rgba(255, 255, 255, 0.10) !important;
  color: #fff !important;
  border-color: #fff !important;
}

/* ========================================
   HEADER NAV — .cmn-btn.login-btn (ghost pill)
   ======================================== */

.header-right-part .cmn-btn.login-btn,
.cmn-btn.login-btn {
  background: transparent !important;
  color: var(--vio-red) !important;
  border: 1px solid var(--vio-hairline) !important;
  border-radius: var(--vio-r-pill) !important;
  padding: 9px 20px !important;
  font-family: var(--vio-font-body);
  font-weight: 500;
  font-size: var(--vio-text-sm);
  transition: all var(--vio-dur-2) var(--vio-ease);
  text-decoration: none !important;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.header-right-part .cmn-btn.login-btn:hover,
.cmn-btn.login-btn:hover {
  background: transparent !important;
  border-color: var(--vio-ink) !important;
  color: var(--vio-red-dark) !important;
  transform: none;
  box-shadow: none !important;
}
