.file-upload {
  align-items: center;
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 18px;
}

.file-upload.has-error {
  border-color: #dc2626;
}

.file-upload__input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.file-upload__button {
  align-items: center;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  color: var(--color-primary);
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  gap: 10px;
  min-height: 46px;
  padding: 0 16px;
  transition: var(--transition);
}

.file-upload__button:hover,
.file-upload:has(.file-upload__input:focus-visible) .file-upload__button {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(14, 141, 219, 0.12);
}

.file-upload.has-error .file-upload__button {
  border-color: #dc2626;
}

.file-upload__icon {
  align-items: center;
  background: #fff;
  border-radius: 8px;
  display: inline-flex;
  font-size: 12px;
  height: 26px;
  justify-content: center;
  width: 30px;
}

.file-upload__meta {
  display: flex;
  flex: 1 1 220px;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.file-upload-card {
  min-width: 0;
}

.file-upload-card__preview {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  color: var(--color-text-light);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 800;
  height: 64px;
  justify-content: center;
  overflow: hidden;
  text-align: center;
  width: 64px;
}

.file-upload-card__preview--cover {
  aspect-ratio: 16 / 9;
  height: 82px;
  width: 146px;
}

.file-upload-card__preview img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.file-upload-card__preview img[hidden],
.file-upload-card__preview span[hidden] {
  display: none;
}

.file-upload__native {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.file-upload__meta small {
  color: var(--color-text-light);
  line-height: 1.5;
}

.file-upload__meta span {
  color: var(--color-text);
  overflow-wrap: anywhere;
}

.resume-card.is-delete-pending .file-upload-card__preview {
  opacity: .45;
}

.resume-action--secondary:focus-visible,
.resume-card:has(.file-upload__input:focus-visible) label.resume-action {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(14, 141, 219, 0.12);
  color: var(--color-primary);
  outline: none;
}

.resume-card {
  border: 1px solid var(--color-border);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
}

.resume-card.has-error {
  border-color: #dc2626;
}

.resume-card__title {
  color: var(--color-text);
  font-size: 16px;
  font-weight: 800;
}

.resume-card__current,
.resume-card__actions {
  align-items: center;
  display: flex;
  gap: 12px;
}

.resume-card__current {
  justify-content: space-between;
}

.resume-card__actions {
  flex-wrap: wrap;
}

.resume-card__file {
  align-items: center;
  display: flex;
  flex: 1 1 auto;
  gap: 10px;
  min-width: 0;
}

.resume-card__file-icon {
  align-items: center;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  color: var(--color-primary);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  width: 38px;
}

.resume-card__file strong,
.resume-card__selected {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resume-card__file strong {
  flex: 1 1 auto;
}

.resume-card__selected {
  color: var(--color-text-light);
  flex: 1 1 180px;
}

.resume-card__hint {
  color: var(--color-text-light);
  line-height: 1.5;
}

.resume-card__delete-state {
  align-items: center;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  color: #92400e;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  padding: 12px 14px;
}

.resume-card__delete-state[hidden] {
  display: none;
}

.resume-card__delete-state button {
  background: transparent;
  border: 0;
  color: var(--color-primary);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 0;
}

.resume-card__delete-state button:hover,
.resume-card__delete-state button:focus-visible {
  color: #0369a1;
  outline: none;
  text-decoration: underline;
}

.resume-action {
  align-items: center;
  border: 1px solid #dbe3ef;
  border-radius: var(--radius);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 800;
  gap: 8px;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  transition: var(--transition);
  white-space: nowrap;
}

.resume-action img {
  flex-shrink: 0;
  height: 17px;
  width: 17px;
}

.resume-action--secondary {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #334155;
}

.resume-action--secondary:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: var(--color-primary);
  box-shadow: none;
}

.resume-action--danger {
  background: #fff;
  border-color: #e2e8f0;
  color: #dc2626;
}

.resume-action--danger:hover {
  background: #fef2f2;
  border-color: #cbd5e1;
  color: #b91c1c;
  box-shadow: none;
}

.resume-action--danger:focus-visible {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
  outline: none;
}

.resume-card.is-delete-pending .resume-action--danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
  box-shadow: none;
}

@media (max-width: 560px) {
  .file-upload,
  .file-upload__button,
  .resume-card__current,
  .resume-card__actions,
  .resume-action {
    width: 100%;
  }

  .resume-card__current,
  .resume-card__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .resume-card__selected {
    flex-basis: auto;
    width: 100%;
  }
}