/* cignyl-sftp 20260826 */
/* ------------------------------ */
/* v2 Button (shadcn-like)        */
/* ------------------------------ */

.v2-theme .v2-btn {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--v2-space-xsm);
  white-space: nowrap;
  vertical-align: middle;

  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;

  border-radius: var(--radius);
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
  cursor: pointer;
  user-select: none;
}

.v2-theme .v2-btn:focus-visible {
  box-shadow: 0 0 0 2px hsl(var(--background)), 0 0 0 4px hsl(var(--ring));
}

.v2-theme .v2-btn:disabled,
.v2-theme .v2-btn--disabled-true {
  opacity: 0.5;
  pointer-events: none;
}

.v2-theme .v2-btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.v2-theme .v2-btn--icon-right {
  flex-direction: row-reverse;
}

/* sizes */
.v2-theme .v2-btn--size-xsm {
  height: 1.75rem; /* 28px */
  padding: 0 var(--v2-space-xsm); /* 8px */
}

.v2-theme .v2-btn--size-default {
  /* default is now the old "sm" size */
  height: 2.25rem; /* 36px */
  padding: 0 var(--v2-space-sm); /* 12px */
}

.v2-theme .v2-btn--size-sm {
  /* new "sm" is smaller than the previous "sm" */
  height: 2rem; /* 32px */
  padding: 0 var(--v2-space-xsm); /* 8px */
}

.v2-theme .v2-btn--size-lg {
  /* "lg" is now the old default */
  height: 2.5rem; /* 40px */
  padding: 0 var(--v2-space-md); /* 16px */
}

.v2-theme .v2-btn--size-xlg {
  height: 2.75rem; /* 44px */
  padding: 0 var(--v2-space-xl); /* 32px */
}

/* icon-only (auto-detected when title is empty + icon is set) */
.v2-theme .v2-btn--icon-only-true.v2-btn--size-xsm {
  width: 1.75rem; /* matches height */
  padding: 0;
}

.v2-theme .v2-btn--icon-only-true.v2-btn--size-default {
  width: 2.25rem; /* matches height */
  padding: 0;
}

.v2-theme .v2-btn--icon-only-true.v2-btn--size-sm {
  width: 2rem; /* matches height */
  padding: 0;
}

.v2-theme .v2-btn--icon-only-true.v2-btn--size-lg {
  width: 2.5rem; /* matches height */
  padding: 0;
}

.v2-theme .v2-btn--icon-only-true.v2-btn--size-xlg {
  width: 2.75rem; /* matches height */
  padding: 0;
}

/* variants */
.v2-theme .v2-btn--variant-default {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.v2-theme .v2-btn--variant-default:hover {
  background-color: hsl(var(--primary) / 0.9);
}

.v2-theme .v2-btn--variant-secondary {
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
}

.v2-theme .v2-btn--variant-secondary:hover {
  background-color: hsl(var(--secondary) / 0.8);
}

.v2-theme .v2-btn--variant-destructive {
  background-color: hsl(var(--destructive));
  color: hsl(var(--destructive-foreground));
}

.v2-theme .v2-btn--variant-destructive:hover {
  background-color: hsl(var(--destructive) / 0.9);
}

.v2-theme .v2-btn--variant-success {
  background-color: hsl(var(--success));
  color: hsl(var(--success-foreground));
}

.v2-theme .v2-btn--variant-success:hover {
  background-color: hsl(var(--success) / 0.9);
}

.v2-theme .v2-btn--variant-warning {
  background-color: hsl(var(--warning));
  color: hsl(var(--warning-foreground));
}

.v2-theme .v2-btn--variant-warning:hover {
  background-color: hsl(var(--warning) / 0.9);
}

.v2-theme .v2-btn--variant-info {
  background-color: hsl(var(--info));
  color: hsl(var(--info-foreground));
}

.v2-theme .v2-btn--variant-info:hover {
  background-color: hsl(var(--info) / 0.9);
}

.v2-theme .v2-btn--variant-outline {
  background-color: transparent;
  color: hsl(var(--foreground));
  border: 1px solid hsl(var(--input));
}

.v2-theme .v2-btn--variant-outline:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.v2-theme .v2-btn--variant-ghost {
  background-color: transparent;
  color: hsl(var(--foreground));
}

.v2-theme .v2-btn--variant-ghost:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.v2-theme .v2-btn--variant-link {
  background-color: transparent;
  color: hsl(var(--primary));
  text-decoration: underline;
  text-underline-offset: 4px;
}

.v2-theme .v2-btn--variant-link:hover {
  color: hsl(var(--primary) / 0.85);
}

/* Dark-only primary: royal #0747a6. Tight corners. */
html.v2-theme-dark .v2-theme .v2-btn {
  border-radius: 0.125rem;
}

html.v2-theme-dark .v2-theme .v2-btn--variant-default {
  background: #0747a6;
  color: #ffffff;
  border: 1px solid rgba(7, 71, 166, 0.55);
}

html.v2-theme-dark .v2-theme .v2-btn--variant-default:hover {
  background: #0052cc;
}

html.v2-theme-dark .v2-theme .v2-btn--variant-secondary {
  background: #0f172a;
  color: #e2e8f0;
  border: 1px solid rgba(7, 71, 166, 0.55);
}

html.v2-theme-dark .v2-theme .v2-btn--variant-secondary:hover {
  background: #0747a6;
  color: #ffffff;
}

html.v2-theme-dark .v2-theme .v2-btn--variant-outline {
  color: hsl(var(--primary));
  border-color: hsl(var(--primary) / 0.45);
}

html.v2-theme-dark .v2-theme .v2-btn--variant-outline:hover,
html.v2-theme-dark .v2-theme .v2-btn--variant-ghost:hover {
  background-color: hsl(var(--primary) / 0.15);
  color: hsl(var(--primary));
}

