/* cignyl-sftp 20260824 */
/* ------------------------------ */
/* v2 Image (shadcn-like)         */
/* ------------------------------ */

.v2-theme .v2-image {
  display: block;
  max-width: 100%;
}

.v2-theme .v2-image__wrap {
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--muted));
  position: relative;
}

/* ratio / height */
.v2-theme .v2-image__wrap--ratio-16-9 { aspect-ratio: 16 / 9; }
.v2-theme .v2-image__wrap--ratio-4-3  { aspect-ratio: 4 / 3; }
.v2-theme .v2-image__wrap--ratio-1-1  { aspect-ratio: 1 / 1; }

.v2-theme .v2-image__wrap--height-sm { height: 140px; }
.v2-theme .v2-image__wrap--height-md { height: 180px; }
.v2-theme .v2-image__wrap--height-lg { height: 240px; }

.v2-theme .v2-image__link {
  display: block;
}

.v2-theme .v2-image__img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center;
}

/* When the wrapper defines a fixed box, make the image fill it. */
.v2-theme .v2-image__wrap--ratio-16-9 .v2-image__img,
.v2-theme .v2-image__wrap--ratio-4-3 .v2-image__img,
.v2-theme .v2-image__wrap--ratio-1-1 .v2-image__img,
.v2-theme .v2-image__wrap--height-sm .v2-image__img,
.v2-theme .v2-image__wrap--height-md .v2-image__img,
.v2-theme .v2-image__wrap--height-lg .v2-image__img {
  height: 100%;
}

.v2-theme .v2-image__img--fit-contain {
  object-fit: contain;
  background: hsl(var(--muted));
}

.v2-theme .v2-image__img--pos-top { object-position: top; }
.v2-theme .v2-image__img--pos-bottom { object-position: bottom; }
.v2-theme .v2-image__img--pos-left { object-position: left; }
.v2-theme .v2-image__img--pos-right { object-position: right; }
.v2-theme .v2-image__img--pos-center { object-position: center; }

/* clickable */
.v2-theme .v2-image--clickable-true {
  cursor: pointer;
}

.v2-theme .v2-image--clickable-true:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px hsl(var(--background)), 0 0 0 4px hsl(var(--ring));
  border-radius: var(--radius);
}

.v2-theme .v2-image--disabled-true {
  opacity: 0.6;
  pointer-events: none;
}

/* placeholder */
.v2-theme .v2-image__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--v2-space-md);
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
}

.v2-theme .v2-image__skeleton {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, hsl(var(--border)) 25%, hsl(var(--border) / 0.55) 37%, hsl(var(--border)) 63%);
  background-size: 400% 100%;
  animation: v2ImageSkeleton 1.2s ease-in-out infinite;
  border-radius: var(--radius);
}

@keyframes v2ImageSkeleton {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

.v2-theme .v2-image__placeholder-text {
  font-size: 0.875rem;
  line-height: 1.35;
  text-align: center;
}

/* error overlay */
.v2-theme .v2-image__error {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--v2-space-md);
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
}

.v2-theme .v2-image__error-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed hsl(var(--border));
  border-radius: var(--radius);
  padding: var(--v2-space-md);
  width: 100%;
  height: 100%;
}

.v2-theme .v2-image__error-text {
  font-size: 0.875rem;
  line-height: 1.35;
  text-align: center;
}

