.ps-attachment {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  margin: 12px 0;
  background: #fff;
  border: 1px solid #e6e8ee;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.06);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.ps-attachment:hover {
  transform: translateY(-2px);
  border-color: #d0d7e2;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.10);
}

.ps-attachment__icon {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  position: relative;
}

.ps-file-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: none;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .5px;
  text-transform: uppercase;
  user-select: none;
}

.ps-file-icon--default {
  display: flex;
  background: #f3f5f9;
  color: #667085;
}

.ps-file-icon--stl {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #fff;
}

.ps-file-icon--3mf {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
}

.ps-file-icon--pdf {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  color: #fff;
}

.ps-file-icon--zip,
.ps-file-icon--rar {
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
  color: #fff;
}

.ps-attachment[data-ext="stl"] .ps-file-icon--stl,
.ps-attachment[data-ext="3mf"] .ps-file-icon--3mf,
.ps-attachment[data-ext="pdf"] .ps-file-icon--pdf,
.ps-attachment[data-ext="zip"] .ps-file-icon--zip,
.ps-attachment[data-ext="rar"] .ps-file-icon--rar {
  display: flex;
}

.ps-attachment[data-ext="stl"] .ps-file-icon--default,
.ps-attachment[data-ext="3mf"] .ps-file-icon--default,
.ps-attachment[data-ext="pdf"] .ps-file-icon--default,
.ps-attachment[data-ext="zip"] .ps-file-icon--default,
.ps-attachment[data-ext="rar"] .ps-file-icon--default {
  display: none;
}

.ps-attachment__body {
  flex: 1 1 auto;
  min-width: 0;
}

.ps-attachment__top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.ps-attachment__name {
  color: #111827;
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  word-break: break-word;
}

.ps-attachment__name:hover {
  color: #d61212;
}

.ps-attachment__ext {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.ps-attachment__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.45;
}

.ps-attachment__dot {
  opacity: .55;
}

.ps-attachment__actions {
  flex: 0 0 auto;
}

.ps-attachment__download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: 10px;
  background: #d61212;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  transition: background .18s ease, transform .18s ease;
}

.ps-attachment__download:hover {
  background: #b80f0f;
  transform: translateY(-1px);
}

.ps-attachment__download svg {
  flex: 0 0 18px;
}

@media (max-width: 767px) {
  .ps-attachment {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px;
  }

  .ps-attachment__icon {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
  }

  .ps-file-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    font-size: 13px;
  }

  .ps-attachment__actions {
    width: 100%;
  }

  .ps-attachment__download {
    width: 100%;
    justify-content: center;
  }
}