#aiSerialModal .custom-file-upload {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  gap: 0.5rem;
}
#aiSerialModal .custom-file-upload .custom-file-name {
  -webkit-box-flex: 1;
      -ms-flex: 1;
          flex: 1;
  position: relative;
  min-height: 3rem;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  padding: 0.75rem 1rem;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  background-color: #f8f9fa;
}
#aiSerialModal .custom-file-upload .custom-file-name input[type=file] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
#aiSerialModal .custom-file-upload .custom-file-name .file-name-text {
  color: #6c757d;
  font-size: 0.875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}
#aiSerialModal .custom-file-upload .custom-file-label {
  margin-bottom: 0;
  cursor: pointer;
  white-space: nowrap;
  -ms-flex-negative: 0;
      flex-shrink: 0;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
}
#aiSerialModal .custom-file-preview {
  margin-top: 1rem;
}
#aiSerialModal .custom-file-preview .image-preview__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
      flex-wrap: wrap;
  gap: 1rem;
}
#aiSerialModal .custom-file-preview .image-preview__list li {
  position: relative;
  display: inline-block;
}
#aiSerialModal .custom-file-preview__img {
  max-width: 200px;
  max-height: 150px;
  width: 100%;
  height: auto;
  -o-object-fit: contain;
     object-fit: contain;
  border: 1px solid #ddd;
  border-radius: 4px;
  display: block;
  background-color: #f8f9fa;
}
#aiSerialModal .custom-file-preview__del {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: #dc3545;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  padding: 0;
  -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
          box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  -webkit-transition: background-color 0.2s ease;
  transition: background-color 0.2s ease;
}
#aiSerialModal .custom-file-preview__del:hover {
  background: #c82333;
}
#aiSerialModal .custom-file-preview__del i {
  font-size: 14px;
}
#aiSerialModal .form__file-text {
  font-size: 0.875rem;
  color: #6c757d;
  margin-top: 0.5rem;
  margin-bottom: 0;
}
#aiSerialModal .modal-footer {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  gap: 0.5rem;
}
#aiSerialModal .modal-footer button {
  -webkit-box-flex: 1;
      -ms-flex: 1;
          flex: 1;
  height: 3.5rem !important;
  font-size: 1rem !important;
  padding: 0 1.5rem !important;
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -webkit-box-align: center !important;
      -ms-flex-align: center !important;
          align-items: center !important;
  -webkit-box-pack: center !important;
      -ms-flex-pack: center !important;
          justify-content: center !important;
  line-height: 1 !important;
}
#aiSerialModal .modal-footer .btn-secondary {
  border-radius: 0.375rem;
  color: var(--custom-primary-blue) !important;
}
#aiSerialModal .modal-footer .btn-primary {
  border-radius: 0.625rem;
}

@media (max-width: 991.98px) {
  #aiSerialModal .custom-file-preview__img {
    max-width: 150px;
    max-height: 120px;
  }
}
@media (max-width: 768.98px) {
  #aiSerialModal .custom-file-preview__img {
    max-width: 120px;
    max-height: 100px;
  }
  #aiSerialModal .custom-file-preview__del {
    width: 20px;
    height: 20px;
    font-size: 12px;
  }
  #aiSerialModal .custom-file-preview__del i {
    font-size: 12px;
  }
  #aiSerialModal .modal-footer {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    gap: 1rem;
  }
  #aiSerialModal .modal-footer button {
    width: 100%;
    padding: 0.875rem 2rem !important;
  }
}
