/* cignyl-sftp 20260824 */
/* ------------------------------ */
/* v2 Checkbox (shadcn-like)      */
/* ------------------------------ */

.v2-theme .v2-checkbox-field {
  display: inline-flex;
  align-items: center;
  gap: var(--v2-space-sm);
  vertical-align: middle;
}

.v2-theme .v2-checkbox__label {
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: hsl(var(--foreground));
  user-select: none;
}

.v2-theme .v2-checkbox-field--label-clickable-true .v2-checkbox__label {
  cursor: pointer;
}

.v2-theme .v2-checkbox-field--disabled-true .v2-checkbox__label {
  opacity: 0.7;
  cursor: default;
}

.v2-theme .v2-checkbox {
  --v2-checkbox-size: 1.125rem; /* default */
  position: relative;
  width: var(--v2-checkbox-size);
  height: var(--v2-checkbox-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
}

.v2-theme .v2-checkbox--size-xsm {
  --v2-checkbox-size: 0.875rem; /* 14px */
}

.v2-theme .v2-checkbox--size-sm {
  --v2-checkbox-size: 1rem; /* 16px */
}

.v2-theme .v2-checkbox--size-default {
  --v2-checkbox-size: 1.125rem; /* 18px */
}

.v2-theme .v2-checkbox--size-lg {
  --v2-checkbox-size: 1.25rem; /* 20px */
}

.v2-theme .v2-checkbox--size-xlg {
  --v2-checkbox-size: 1.375rem; /* 22px */
}

.v2-theme .v2-checkbox__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: inherit;
}

.v2-theme .v2-checkbox__box {
  width: 100%;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid hsl(var(--input));
  background-color: hsl(var(--background));
  color: hsl(var(--primary-foreground));
  transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease, color 120ms ease;
}

.v2-theme .v2-checkbox__input:focus-visible + .v2-checkbox__box {
  box-shadow: 0 0 0 2px hsl(var(--background)), 0 0 0 4px hsl(var(--ring));
}

.v2-theme .v2-checkbox--disabled-true {
  opacity: 0.5;
  pointer-events: none;
}

.v2-theme .v2-checkbox__icon {
  display: none;
  line-height: 1;
  font-size: 0.75rem;
}

.v2-theme .v2-checkbox[data-state="checked"] .v2-checkbox__icon--check {
  display: inline-block;
}

/* checked visual state */
.v2-theme .v2-checkbox--checked-true .v2-checkbox__box {
  border-color: hsl(var(--primary));
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.v2-theme .v2-checkbox--checked-true.v2-checkbox--variant-secondary .v2-checkbox__box {
  border-color: hsl(var(--secondary));
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
}

.v2-theme .v2-checkbox--checked-true.v2-checkbox--variant-destructive .v2-checkbox__box {
  border-color: hsl(var(--destructive));
  background-color: hsl(var(--destructive));
  color: hsl(var(--destructive-foreground));
}

.v2-theme .v2-checkbox--checked-true.v2-checkbox--variant-success .v2-checkbox__box {
  border-color: hsl(var(--success));
  background-color: hsl(var(--success));
  color: hsl(var(--success-foreground));
}

.v2-theme .v2-checkbox--checked-true.v2-checkbox--variant-warning .v2-checkbox__box {
  border-color: hsl(var(--warning));
  background-color: hsl(var(--warning));
  color: hsl(var(--warning-foreground));
}

.v2-theme .v2-checkbox--checked-true.v2-checkbox--variant-info .v2-checkbox__box {
  border-color: hsl(var(--info));
  background-color: hsl(var(--info));
  color: hsl(var(--info-foreground));
}

