/* ==========================================================================
   Texora IT — BUTTON SYSTEM
   Built on Bootstrap's .btn primitive. All variants use design tokens so
   they respond automatically to the active color theme.
   ========================================================================== */

.btn {
  --bs-btn-font-family: var(--nx-font-body);
  --bs-btn-font-weight: var(--nx-fw-semibold);
  --bs-btn-border-radius: var(--nx-radius-pill);
  --bs-btn-padding-x: 1.75rem;
  --bs-btn-padding-y: 0.75rem;
  --bs-btn-font-size: var(--nx-fs-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--nx-space-2);
  letter-spacing: var(--nx-ls-normal);
  transition: var(--nx-transition-base);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn .bi,
.btn .nx-icon {
  font-size: 1.05em;
}

/* ---------------- Primary ---------------- */
.btn-primary {
  --bs-btn-bg: var(--nx-primary);
  --bs-btn-border-color: var(--nx-primary);
  --bs-btn-color: var(--nx-primary-contrast);
  --bs-btn-hover-bg: var(--nx-primary-hover);
  --bs-btn-hover-border-color: var(--nx-primary-hover);
  --bs-btn-hover-color: var(--nx-primary-contrast);
  --bs-btn-active-bg: var(--nx-primary-hover);
  --bs-btn-active-border-color: var(--nx-primary-hover);
  --bs-btn-disabled-bg: var(--nx-primary);
  --bs-btn-disabled-border-color: var(--nx-primary);
  box-shadow: var(--nx-shadow-glow);
}

/* ---------------- Secondary (teal accent) ---------------- */
.btn-secondary {
  --bs-btn-bg: var(--nx-secondary);
  --bs-btn-border-color: var(--nx-secondary);
  --bs-btn-color: var(--nx-secondary-contrast);
  --bs-btn-hover-bg: var(--nx-secondary-hover);
  --bs-btn-hover-border-color: var(--nx-secondary-hover);
  --bs-btn-hover-color: var(--nx-secondary-contrast);
  --bs-btn-active-bg: var(--nx-secondary-hover);
  --bs-btn-active-border-color: var(--nx-secondary-hover);
}

/* ---------------- Outline ---------------- */
.btn-outline-primary {
  --bs-btn-color: var(--nx-primary);
  --bs-btn-border-color: var(--nx-border-color-strong);
  --bs-btn-hover-bg: var(--nx-primary);
  --bs-btn-hover-border-color: var(--nx-primary);
  --bs-btn-hover-color: var(--nx-primary-contrast);
  --bs-btn-active-bg: var(--nx-primary);
  --bs-btn-active-border-color: var(--nx-primary);
  background: transparent;
}

/* ---------------- Ghost / link-style ---------------- */
.btn-ghost {
  --bs-btn-color: var(--nx-text-primary);
  --bs-btn-bg: transparent;
  --bs-btn-border-color: transparent;
  --bs-btn-hover-color: var(--nx-primary);
  --bs-btn-hover-bg: var(--nx-primary-soft);
  --bs-btn-hover-border-color: transparent;
}

/* ---------------- Light (for use on dark/footer surfaces) ---------------- */
.btn-light {
  --bs-btn-bg: var(--nx-white);
  --bs-btn-border-color: var(--nx-white);
  --bs-btn-color: var(--nx-ink-900);
  --bs-btn-hover-bg: var(--nx-slate-100);
  --bs-btn-hover-border-color: var(--nx-slate-100);
  --bs-btn-hover-color: var(--nx-ink-900);
}

.btn-outline-light {
  --bs-btn-color: var(--nx-white);
  --bs-btn-border-color: rgba(255, 255, 255, 0.28);
  --bs-btn-hover-bg: var(--nx-white);
  --bs-btn-hover-color: var(--nx-ink-900);
  --bs-btn-hover-border-color: var(--nx-white);
  background: transparent;
}

/* ---------------- Sizes ---------------- */
.btn-lg {
  --bs-btn-padding-x: 2.25rem;
  --bs-btn-padding-y: 0.9rem;
  --bs-btn-font-size: var(--nx-fs-md);
}

.btn-sm {
  --bs-btn-padding-x: 1.25rem;
  --bs-btn-padding-y: 0.5rem;
  --bs-btn-font-size: var(--nx-fs-xs);
}

/* ---------------- Icon-only (circular) button ---------------- */
.btn-icon {
  --bs-btn-padding-x: 0;
  --bs-btn-padding-y: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--nx-radius-circle);
  flex-shrink: 0;
}

.btn-icon.btn-sm {
  width: 38px;
  height: 38px;
}

/* ---------------- Signature: bracket-corner reticle ----------------
   A quiet nod to terminal/PCB corner traces. Corners draw in on hover/
   focus for primary and outline buttons — the template's one recurring
   motion signature, used sparingly across buttons, cards and images. */
.btn-bracket {
  --bracket-size: 10px;
}

.btn-bracket::before,
.btn-bracket::after {
  content: "";
  position: absolute;
  width: var(--bracket-size);
  height: var(--bracket-size);
  border: 1.5px solid currentColor;
  opacity: 0;
  transition: opacity var(--nx-duration-base) var(--nx-ease-standard),
    transform var(--nx-duration-base) var(--nx-ease-emphasized);
  pointer-events: none;
}

.btn-bracket::before {
  top: 10px;
  left: 10px;
  border-right: none;
  border-bottom: none;
  transform: translate(4px, 4px);
}

.btn-bracket::after {
  bottom: 10px;
  right: 10px;
  border-left: none;
  border-top: none;
  transform: translate(-4px, -4px);
}

.btn-bracket:hover::before,
.btn-bracket:focus-visible::before,
.btn-bracket:hover::after,
.btn-bracket:focus-visible::after {
  opacity: 0.85;
  transform: translate(0, 0);
}

/* ---------------- Disabled state ---------------- */
.btn:disabled,
.btn.disabled {
  opacity: 0.55;
  box-shadow: none;
  cursor: not-allowed;
}

/* Custom cursor — replaces the native pointer with a two-part
   dot + ring cursor; positions are updated via JS on mousemove. */
.cursor_body {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
}

.cursor_body .cursor-in,
.cursor_body .cursor-out {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
}

/* Inner dot */
.cursor_body .cursor-in {
  width: 10px;
  height: 10px;
  background-color: var(--nx-primary);
  transition: all 0.25s ease-out;
}

/* Outer ring */
.cursor_body .cursor-out {
  width: 40px;
  height: 40px;
  border: 1px solid var(--nx-primary);
  opacity: 0.5;
  transition: all 0.2s ease;
}  
