/* FileCard — vanilla port of the shadcn component.
   Used as the preview fallback when an image or PDF can't render. */

.filecard {
  position: relative;
  width: 56px;
  height: 72px;
  flex-shrink: 0;
}

.filecard-body {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  padding: 8px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border-color);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow: hidden;
}

.filecard-body::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.02) 0%,
    transparent 30%,
    rgba(var(--accent-color-rgb), 0.04) 100%);
  pointer-events: none;
}

.filecard-banner {
  position: absolute;
  right: -6px;
  bottom: 6px;
  z-index: 2;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: white;
  font-family: var(--font-mono);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* Banner colors per format */
.filecard-banner-pdf { background: #ef4444; }
.filecard-banner-png { background: #525252; }
.filecard-banner-jpg,
.filecard-banner-jpeg { background: #15803d; }
.filecard-banner-img { background: #ec4899; }
.filecard-banner-doc { background: #2563eb; }
.filecard-banner-zip,
.filecard-banner-rar { background: #a855f7; }
.filecard-banner-csv { background: #0f766e; }
.filecard-banner-xls,
.filecard-banner-xlsx { background: #059669; }
.filecard-banner-txt { background: #6b7280; }
.filecard-banner-json { background: #ca8a04; }
.filecard-banner-code,
.filecard-banner-js,
.filecard-banner-html { background: #ea580c; }

/* Inner placeholder lines */
.fc-line {
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}
.fc-line-strong { background: rgba(255, 255, 255, 0.22); }
.fc-row {
  display: flex;
  gap: 3px;
}

/* Image-format placeholder: small framed box with dot + two lines */
.filecard-img-placeholder {
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.fc-mini-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: rgba(var(--accent-color-rgb), 0.35);
}

/* When used inline next to other preview thumbnails */
.fc-thumb .filecard {
  margin: 0 auto;
}
